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

345 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
Claude
0cc154257a Qualify all {.help} tags with AMR:: and convert backtick ?func references
- Add AMR:: namespace prefix and trailing () to all {.help} cli markup
  so they render as clickable help links (e.g. {.help AMR::as.sir}())
- Convert `?funcname` backtick-quoted help references to {.help AMR::funcname}()
  in aa_helper_functions.R, custom_eucast_rules.R, interpretive_rules.R,
  key_antimicrobials.R, mo.R, plotting.R, resistance_predict.R, and sir.R
- Skipped `?proportion` in sir_calc.R as 'proportion' is not exported

https://claude.ai/code/session_01XHWLohiSTdZvCutwD7ag2b
2026-03-18 20:06:52 +00:00
Claude
ad31fba556 Modernise messaging infrastructure with cli support
Rewrites message_(), warning_(), stop_() to use cli::cli_inform(),
cli::cli_warn(), and cli::cli_abort() when the cli package is available,
with a fully functional plain-text fallback for environments without cli.

Key changes:
- New cli_to_plain() helper converts cli inline markup ({.fun}, {.arg},
  {.val}, {.field}, {.cls}, {.pkg}, {.href}, {.url}, etc.) to readable
  plain-text equivalents for the non-cli fallback path
- word_wrap() simplified: drops add_fn, ANSI re-index algorithm, RStudio
  link injection, and operator spacing hack; returns pasted input unchanged
  when cli is available
- stop_() no longer references AMR_env$cli_abort; uses pkg_is_available()
  directly; passes sys.call() objects to cli::cli_abort() call= argument
- Removed add_fn parameter from message_(), warning_(), and word_wrap()
- All call sites across R/ updated: add_fn arguments removed, some paste0-
  based string construction converted to cli glue syntax ({.fun as.mo},
  {.arg col_mo}, {n} results, etc.)
- cli already listed in Suggests; no DESCRIPTION dependency changes needed

https://claude.ai/code/session_01XHWLohiSTdZvCutwD7ag2b
2026-03-18 12:10:17 +00:00
c0a394008e (v3.0.1.9027) Fixes #252 and add documentation update regarding #253 2026-03-06 13:10:33 +01:00
60e8f2bae6 (v3.0.1.9026) fix ab_group(NA) 2026-03-06 12:41:27 +01:00
adee419f1c v3.0.1 2025-09-20 17:14:07 +01:00
4d7c4ca52c (v3.0.0.9027) skimr update and as.ab warning - fixes #234, fixes #232 2025-09-10 13:32:52 +02:00
d94bdd2c6a (v3.0.0.9008) fix ggplot_sir(), support lighter green for SDD 2025-07-17 17:05:41 +02:00
80f08f91da (v2.1.1.9285) mdro fix 2025-05-21 16:51:40 +02:00
38cebc1541 (v2.1.1.9279) fix documentation, add foreign S3 exports to functions 2025-05-16 16:55:29 +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
58d7aa8790 (v2.1.1.9199) fix eucast 2025-03-14 13:43:22 +01:00
07efc292bc (v2.1.1.9163) cleanup 2025-02-27 14:04:29 +01:00
22afd918e6 (v2.1.1.9136) console colours, updated Suggests, added as.ab() improvement 2025-01-31 16:01:52 +01:00
681fe011fe (v2.1.1.9082) algorithm updates 2024-09-30 18:46:55 +02:00
ac1c40d8bb (v2.1.1.9081) HUGE microorganisms update for fungi! 2024-09-29 22:17:56 +02:00
1ca40e8d67 (v2.1.1.9079) fix for uti in as.sir() 2024-09-24 15:34:12 +02:00
ddb23b6e73 (v2.1.1.9071) update veterinary SIR interpretation, add only_fungi 2024-09-19 11:44:56 +02:00
573c0346ed (v2.1.1.9070) fix for mo_current mo (no-verify) 2024-07-19 18:05:49 +02:00
7258a491b9 (v2.1.1.9068) fix for mo_url() and as.mo() for synonyms 2024-07-17 14:29:55 +02:00
7f344836ea (v2.1.1.9064) unit tests 2024-07-16 15:55:58 +02: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
0d8a91db49 rename pre-commit hook to pre-commit checks (no-check) 2024-04-23 10:55:48 +02: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
0c46f61260 MO group fixes 2023-07-12 15:04:48 +01:00
66eeeb4b88 cleanup 2023-07-11 14:29:40 +02:00
a4e2e25e3f reftbl in plots, speedup for as.sir() and mo_validate 2023-07-10 16:43:46 +02:00
70c601ca11 breakpoints UTI interpretation fix 2023-07-10 13:41:52 +02:00
acb534102b new species groups, updated clinical breakpoints 2023-07-08 17:30:05 +02:00
2d97cca6d9 fix reference_df endless loop 2023-06-26 13:52:02 +02:00
1d9ee39cc7 fix for mo codes 2023-06-22 15:24:18 +02:00
Dr. Matthijs Berends
f065945d7b Update clinical breakpoints and fix some as.mo() bugs (#117)
* Updates clinical breakpoints EUCAST/CLSI 2023, fixes #102, fixes #112, fixes #113, fixes #114, fixes #115
* docs
* implement ecoffs
* unit tests
2023-06-22 15:10:59 +02:00
9591688811 documentation update 2023-05-27 10:39:22 +02:00
766db4e21f as.mo fix 2023-05-26 19:20:21 +02:00
c6135d2082 updated microorganism codes 2023-05-26 16:10:01 +02:00
0bcf55d3b6 improve as.mo() 2023-05-24 15:55:53 +02:00
91fa73dedf add oxygen tolerance 2023-05-11 21:56:27 +02:00
bf08d136a0 fix coercing NA to custom codes, fixes #107 2023-05-08 13:04:18 +02:00
cabffb22fd anaerobic codes 2023-04-17 11:26:19 +02:00
1a02d302d4 Fix translatable strings 2023-04-15 09:32:13 +02:00
147f9112e9 Fix some WHONET codes 2023-04-14 11:12:26 +02:00
80cfc503c2 check for 2.0 2023-03-12 13:02:37 +01:00
262598b8d7 support for old rsi arguments 2023-03-11 14:24:34 +01:00