Repository navigation
Assert stillZero() results in license and NEWS tests - #275
Merged
Merged
Conversation
Three bare stillZero() calls in test_BiocCheck.R asserted nothing. Wrap them in expect_true(). The first used "GPL-3.0", which is not in R's license database (R spells it "GPL-3"), so checkLicenseForRestrictiveUse() raised an 'unknown license' NOTE that went unnoticed. Test "GPL-3" for no conditions, and add a test that "GPL-3.0" gives exactly one NOTE. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Nothing blocking. The three |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## devel #275 +/- ##
=======================================
Coverage 70.21% 70.21%
=======================================
Files 15 15
Lines 2793 2793
=======================================
Hits 1961 1961
Misses 832 832 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
The checkNEWS tests left NEWS.md and inst/NEWS.Rd in the session's temporary package folder, so a second run of test_BiocCheck.R in the same R session found three NEWS files and failed the new stillZero() assertion. Remove them at the end of the section. Drop the GPL-3.0 test added in the previous commit: the analyze_licenses section already asserts one NOTE for GPL-3.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Claude Code reviewed this change at 46f7660 for the author: 4 findings, 2 fixed.
Drafted with Claude Opus 5.5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three bare
stillZero()calls ininst/tinytest/test_BiocCheck.Rasserted nothing, becausestillZero()returns a logical rather than recording a test. Noted as out of scope in #274.Changes
expect_true(): two aftercheckLicenseForRestrictiveUse()and one aftercheckNEWS()with a plainNEWSfile."GPL-3.0". That isn't in R's license database, where it is spelledGPL-3, so the check raised an "unknown license" NOTE that went unnoticed. The test now uses"GPL-3". Theanalyze_licensessection already asserts that"GPL-3.0"gives exactly one NOTE.checkNEWS()tests now delete theNEWS.mdandinst/NEWS.Rdfiles they create. Otherwise a second run of the file in the same R session finds three NEWS files and fails the new assertion.tools:::analyze_licenses()gives the same result on R-devel and R 4.6.2:GPL-3.0is unverified, whileGPL-3andGPL (>= 3)are verified and don't restrict use.The bare call at
inst/tinytest/test_checkDESCRIPTION.R:58is the body of a multi-lineexpect_true(), so it is already asserted and was left as is.Checks
inst/tinytest/test_BiocCheck.Rpasses 169 of 169 on R-devel (2026-12-02 r91021) with Bioc 3.25, including when run twice in one R session.🤖 Generated with Claude Code