1
0
mirror of https://github.com/msberends/AMR.git synced 2026-03-19 19:02:27 +01:00
Commit Graph

171 Commits

Author SHA1 Message Date
Claude
3928a3de55 Fix {.help} markup to use correct cli link format [{.fun fn}](AMR::fn)
Replace all instances of {.help AMR::fn}() (incorrect format with manual
parentheses outside the link) with {.help [{.fun fn}](AMR::fn)} which is
the correct cli hyperlink syntax: the display text [{.fun fn}] renders the
function name with parentheses automatically, and (AMR::fn) is the link target.

Also update the plain-text fallback handler in aa_helper_functions.R to
extract the display text from the [text](topic) markdown link format,
so that non-cli environments show just the function name (e.g. `fn()`),
not the raw link markup.

Dynamic cases in amr_selectors.R and mo_property.R also updated.

https://claude.ai/code/session_01XHWLohiSTdZvCutwD7ag2b
2026-03-18 22:37:46 +00:00
Claude
10c00ff606 Implement cli::code_highlight() for R code examples in messages (issue #191)
Add highlight_code() helper that wraps cli::code_highlight() when cli >= 3.0.0
is available, falling back to plain code otherwise. Apply it to all inline
R code examples embedded in message/warning/stop strings across the package.

Also convert remaining backtick-quoted function and argument references in
messaging calls to proper cli markup: {.help AMR::fn}(), {.arg arg},
{.code expr}, and {.pkg pkg} throughout ab.R, ab_from_text.R, av_from_text.R,
amr_selectors.R, count.R, custom_antimicrobials.R, custom_microorganisms.R,
interpretive_rules.R, mo.R, mo_property.R, sir.R, sir_calc.R.

Fixes #191

https://claude.ai/code/session_01XHWLohiSTdZvCutwD7ag2b
2026-03-18 22:23:39 +00:00
60e8f2bae6 (v3.0.1.9026) fix ab_group(NA) 2026-03-06 12:41:27 +01:00
Matthijs Berends
4e3ea95fbd Claude/fix issue 245 (#262)
* fix: restore valid AB codes mangled by generalise_antibiotic_name() (#245)

When as.ab() received a vector containing both valid AB codes (like ETH,
PHN, PHE, STH, THA, MTH, THI1) and an untranslatable value, the fast
path at line 100 was skipped. The slow path then applied
generalise_antibiotic_name(), which rewrites "TH"->"T" and "PH"->"F",
mangling these short AB codes (e.g. ETH->"ET", PHN->"FN") so they could
no longer be found in the lookup table.

Fix: save the pre-generalised values before applying
generalise_antibiotic_name(), then restore any elements that were already
valid AB codes in their original form.

https://claude.ai/code/session_01Sujw89qa48NoUmMPDBJLz9

* fix: use toupper() in AB code restoration to handle lowercase input (#245)

Ensures that lowercase user input (e.g. 'eth', 'phn') is matched
case-insensitively against the uppercase AB codes in $ab, and that
the restored value is stored in uppercase to match the lookup table.

https://claude.ai/code/session_01Sujw89qa48NoUmMPDBJLz9

* revert: remove unnecessary toupper() since x is already uppercased

https://claude.ai/code/session_01Sujw89qa48NoUmMPDBJLz9

* Revise versioning and date bump requirements for PRs

Updated versioning instructions for pull requests to include date bump.

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-03-04 08:59:44 +01:00
2df2911cf4 (v3.0.1.9018) fixes #249
updates AB groups
2026-01-16 10:57:03 +01:00
adee419f1c v3.0.1 2025-09-20 17:14:07 +01:00
c7b2acbeb6 (v3.0.0.9029) fix for vignette and envir data 2025-09-10 16:19:30 +02:00
1922fb5ff2 (v3.0.0.9028) fix as.ab() warning 2025-09-10 15:06:51 +02:00
4d7c4ca52c (v3.0.0.9027) skimr update and as.ab warning - fixes #234, fixes #232 2025-09-10 13:32:52 +02:00
8dab0a3730 (v3.0.0.9007) allow any tidyselect language in as.sir() 2025-07-17 14:29:35 +02:00
72db2b2562 (v3.0.0.9003) eucast_rules fix, new tidymodels integration 2025-06-13 14:03:21 +02:00
38cebc1541 (v2.1.1.9279) fix documentation, add foreign S3 exports to functions 2025-05-16 16:55:29 +02:00
7d45ca9fbf (v2.1.1.9274) Improve is_sir_eligible, rename verbose MDRO output 2025-05-12 12:35:11 +02:00
3f9012dc47 (v2.1.1.9273) fix as.ab() / as.av() 2025-05-05 11:45:33 +02:00
a778eb9bcf (v2.1.1.9272) (v2.1.1.9271) add sensititre AB and animal codes 2025-05-04 16:40:08 +02:00
f340e257fa (v2.1.1.9256) unit tests 2025-04-26 21:29:50 +02:00
4e7fca3b38 (v2.1.1.9253) parallel computing 2025-04-26 15:47:00 +02:00
40d7a971c3 (v2.1.1.9236) documentation 2025-04-12 11:46:42 +02:00
36fd99e1f4 (v2.1.1.9235) New website! 2025-04-08 15:54:30 +01:00
1fdab84103 (v2.1.1.9233) chore: make all argument texts full sentences 2025-03-31 14:53:24 +02:00
63099cd81e (v2.1.1.9232) is.mic() iteration, documentation cleanup 2025-03-31 10:51:31 +02:00
49da312506 (v2.1.1.9228) repo cleaning 2025-03-28 11:17:49 +01:00
bb110646db (v2.1.1.9223) allow + ab 2025-03-20 22:56:32 +01:00
79f56ad8a4 (v2.1.1.9220) unit test 2025-03-19 16:13:43 +01:00
4dc4398ad1 (v2.1.1.9217) allow + in amr selectors 2025-03-18 16:35:22 +01:00
72f2e723fb (v2.1.1.9200) new argument capped_mic_handling, add Search to website 2025-03-14 17:01:50 +01:00
e134e01418 (v2.1.1.9198) support eucast expert rules 14 and 13.1 2025-03-14 10:10:35 +01:00
f7938289eb (v2.1.1.9186) replace antibiotics with antimicrobials! 2025-03-07 20:43:26 +01:00
07efc292bc (v2.1.1.9163) cleanup 2025-02-27 14:04:29 +01:00
22e66741cc (v2.1.1.9160) cleanup 2025-02-26 20:28:33 +01:00
0c3ea4b538 (v2.1.1.9159) new approach as.ab() 2025-02-26 19:23:54 +01:00
122bca0f95 (v2.1.1.9158) updated as.ab 2025-02-26 13:32:16 +01:00
195dfb4b91 (v2.1.1.9157) improved as.ab(), fixed knit_print of antibiogram 2025-02-26 13:27:20 +01:00
22afd918e6 (v2.1.1.9136) console colours, updated Suggests, added as.ab() improvement 2025-01-31 16:01:52 +01:00
08ddbaa930 (v2.1.1.9123) add EFF code to antibiotics data set 2025-01-15 16:14:09 +01:00
640888f408 (v2.1.1.9064) update all microbial taxonomy, add mycobank, big documentation update 2024-07-16 14:53:17 +02:00
9bf7584d58 (v2.1.1.9049) new 2024 breakpoints, add AMO, set NI instead of N 2024-06-14 22:39:01 +02:00
d214f74e25 allow column name for ab in as.sir() 2024-05-20 21:29:13 +02:00
08a27922a8 new SDD and N for as.sir() 2024-05-20 15:27:04 +02:00
b68f47d985 improved algorithm of as.ab() 2024-05-12 16:24:44 +02:00
7f18e66c4e unit test fix 2024-04-24 11:42:43 +02:00
25089e811e correct for high-level abx 2024-04-24 09:50:32 +02:00
bc4f8515e2 new Norwegian link 2024-03-03 23:24:57 +01:00
7be4dabbc0 support veterinary MIC/disk translation 2024-02-24 15:16:52 +01:00
ea2a4652e9 mouse-hover fixes 2023-07-12 15:27:43 +01:00
66eeeb4b88 cleanup 2023-07-11 14:29:40 +02:00
8df1cd8d97 interpretation fixes 2023-07-11 09:50:45 +02:00
acb534102b new species groups, updated clinical breakpoints 2023-07-08 17:30:05 +02:00
9591688811 documentation update 2023-05-27 10:39:22 +02:00
80cfc503c2 check for 2.0 2023-03-12 13:02:37 +01:00