mirror of
https://github.com/msberends/AMR.git
synced 2026-11-15 22:20:47 +01:00
(v3.0.1.9100) Fix unit test on wrapped warnings; taxonomy build never touches the version number
- test-data-microorganisms.R: warnings are wrapped to the console width, so the expected patterns now allow a line break between words (failed on GitHub Actions since v3.0.1.9097) - reproduction_of_microorganisms_CLAUDE.md, step 4: the agent never changes the version number or date, the human sets them when merging Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1a7f01bfb0
commit
6d54d581b2
4 files changed
+11
-8
No files matched your search
+1
-1
@@ -1,5 +1,5 @@
|
||||
Package: AMR
|
||||
Version: 3.0.1.9099
|
||||
Version: 3.0.1.9100
|
||||
Date: 2026-10-03
|
||||
Title: Antimicrobial Resistance Data Analysis
|
||||
Description: Functions to simplify and standardise antimicrobial resistance (AMR)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# AMR 3.0.1.9099
|
||||
# AMR 3.0.1.9100
|
||||
|
||||
Planned as v3.1.0, mid October 2026.
|
||||
|
||||
|
||||
@@ -230,9 +230,11 @@ something (then fix the script)? Never weaken a test just to make it pass.
|
||||
1. Update `TAXONOMY_VERSION` in `R/aa_globals.R` with the values from step 1.
|
||||
2. Run `devtools::document()`.
|
||||
3. `NEWS.md`: add one short bullet under `### Updates` (e.g. "Updated taxonomy of microorganisms to
|
||||
GBIF/COL <release>, LPSN and MycoBank of <month year>"), no full stop at the end. The version
|
||||
number in `DESCRIPTION` and on line 1 of `NEWS.md` is set by the git pre-commit hook; check after
|
||||
the first commit that it was bumped exactly once for this PR, following `CLAUDE.md`.
|
||||
GBIF/COL <release>, LPSN and MycoBank of <month year>"), no full stop at the end.
|
||||
4. **Never touch the version number or date**: not the `Version:` or `Date:` field in `DESCRIPTION`,
|
||||
not line 1 of `NEWS.md`, and no version prefix in commit messages. This overrides the PR section
|
||||
of `CLAUDE.md` for this PR: the human sets the version when merging. The git pre-commit hook only
|
||||
acts on `main`, so it leaves them unchanged on this branch.
|
||||
|
||||
## Step 5: findings report for the human
|
||||
|
||||
|
||||
@@ -181,15 +181,16 @@ test_that("MO codes: codes of earlier releases are translated, never guessed", {
|
||||
mo_name_without_suffix(translated$fullname)
|
||||
)
|
||||
|
||||
# warnings are wrapped to the console width, so the patterns allow a line break between words
|
||||
# regression: in October 2026, the code of Trichophyton (F_TRCHP, v3.0.1) was guessed as Talaromyces
|
||||
expect_warning(x <- as.mo("F_TRCHP_RBRM", info = FALSE), "earlier AMR package version")
|
||||
expect_warning(x <- as.mo("F_TRCHP_RBRM", info = FALSE), "earlier AMR package\\s+version")
|
||||
expect_identical(mo_name(x, language = NULL), "Trichophyton rubrum")
|
||||
expect_identical(suppressWarnings(mo_genus("F_TRCHP", language = NULL)), "Trichophyton")
|
||||
|
||||
# codes from before v2.0.0 and unknown codes are never guessed (decision by Matthijs S. Berends, 3 October 2026)
|
||||
expect_warning(x <- as.mo("B_ESCH_COL", info = FALSE), "not supported")
|
||||
expect_warning(x <- as.mo("B_ESCH_COL", info = FALSE), "not\\s+supported")
|
||||
expect_true(is.na(x))
|
||||
expect_warning(x <- as.mo(c("B_ESCHR_COL", "B_ESCHR_COLI"), info = FALSE), "unknown MO code")
|
||||
expect_warning(x <- as.mo(c("B_ESCHR_COL", "B_ESCHR_COLI"), info = FALSE), "unknown\\s+MO\\s+code")
|
||||
expect_identical(as.character(x), c(NA, "B_ESCHR_COLI"))
|
||||
|
||||
# regression: until October 2026, a MycoBank target that was not in the data set replaced a valid GBIF target by NA
|
||||
|
||||
Reference in new issue
Block a user