Skip to content

Cran resubmission - #4

Merged
bmaitner merged 7 commits into
masterfrom
cran-resubmission
Oct 19, 2026
Merged

bmaitner merged 7 commits into
masterfrom
cran-resubmission

Conversation

@bmaitner

Copy link
Copy Markdown
Contributor

No description provided.

bmaitner and others added 5 commits October 19, 2026 01:25
This is the error that got NSR archived from CRAN: on the Windows check
machines the API could not be reached, NSR_metadata() assigned NULL results
into a list and then named three elements, breaking the examples and the
vignette. It now gives a message and returns NULL, stopping after the first
failed request.

nsr_core()'s exists() checks no longer look outside the function, so a
same-named object in the user's workspace can't be mistaken for a reply.

New tests put every exported API function through an unreachable API, an
HTTP error, an empty reply and no internet access, with the request mocked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rWCVP was archived on CRAN on 2025-11-28, so CRAN can't install it. It was
only a fallback source for the WGSRPD polygons that rWCVPdata provides, and
rWCVPdata is available through Additional_repositories.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Same workflow as RTNRS and RGNRS, plus the drat repository for rWCVPdata.
Adds the status badge to the README.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dev/release_checks.R follows glyospalettes': docs and figures, the
--as-cran incoming checks, URL and spelling checks, tarball size, and the
remote builders, run section by section before a CRAN submission. It adds
the API-down checks that got 0.1.0 archived and all three Windows
builders. dev/ is in .Rbuildignore.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bmaitner
bmaitner requested a balanced review from Copilot October 19, 2026 12:58

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Code review skipped — your organization has no extra usage available to pay for this review.

If your organization's extra usage balance is empty, an organization admin can add extra usage credits at claude.ai/admin-settings/usage. If its monthly spend limit was reached, an admin can raise it on the same page. If neither applies, contact Anthropic support.

Once extra usage is available, someone with write access to this repository can comment @claude review on this pull request to trigger a review.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

Static review found no blocking issues in the focused failure-handling and release changes; runtime checks were not executed.

No open issues 🎉

1 file not reviewed
  • man/NSR_metadata.Rd: Generated file
What changed in this PR

Prepares NSR for CRAN resubmission by handling API failures gracefully and adding release checks.

Changes:

  • Return NULL when metadata retrieval fails and restrict response lookup to local variables.
  • Add mocked API-failure tests and cross-platform CI.
  • Remove the archived rWCVP dependency and update release documentation.
File Description
tests/​testthat/​test-NSR_api_failure.R Tests API failures without network access.
README.md Adds CI status badge.
R/​NSR_metadata.R Stops gracefully when metadata retrieval fails.
R/​NSR_core.R Prevents inherited objects from masquerading as responses.
R/​local_regions.R Removes rWCVP fallback and clarifies installation guidance.
R/​local_build.R Updates dependency guidance.
NEWS Records failure-handling fixes.
man/​NSR_metadata.Rd Documents failure return behavior.
dev/​release_checks.R Adds pre-release verification steps.
DESCRIPTION Removes rWCVP from suggested dependencies.
cran-comments.md Explains resubmission fixes and check results.
.Rbuildignore Excludes release tooling from package builds.
.github/​workflows/​R-CMD-check.yaml Adds cross-platform package checks.

Review effort: Balanced

R CMD check on GitHub Actions warned "Missing or unexported object:
'TNRS::TNRS_local'" and "Missing object imported by a ':::' call:
'TNRS:::tnrs_cache_dir'". Both exist only in TNRS 0.4.0; CRAN has 0.3.6,
so CRAN's checks would warn the same way. The local check passed only
because TNRS 0.4.0 is installed here.

TNRS_local() is now looked up at run time, with a clear error naming the
version needed when the installed TNRS lacks it. TNRS's cache directory
is computed from TNRS's own rule instead of calling its unexported
tnrs_cache_dir(). R CMD check now passes against TNRS 0.3.6.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The new regression test can overwrite and delete an existing object in the developer’s workspace.

No open issues 🎉

1 previously missed issue

In code that hasn't changed since last review

Medium severity devtools::test() overwrites and removes existing global results_json

tests/​testthat/​test-NSR_api_failure.R:69

When devtools::test() runs in a session with an existing global results_json, this overwrites its value and the deferred rm() removes the binding. The developer's original object is lost. Save and restore the previous value, and remove the temporary binding only if none existed before the test.

1 file not reviewed
  • man/NSR_metadata.Rd: Generated file

Review effort: Balanced

Under devtools::test(), the test overwrote a developer's own
results_json and then removed it. It now puts back what was there, and
removes the binding only if there was none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

Static review found no blocking issues in the focused failure-handling, compatibility, testing, or release changes.

No open issues 🎉

1 file not reviewed
  • man/NSR_metadata.Rd: Generated file

Review effort: Balanced

@bmaitner
bmaitner merged commit a625bdb into master Oct 19, 2026
6 checks passed
@bmaitner
bmaitner deleted the cran-resubmission branch October 19, 2026 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants