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

69 Commits

Author SHA1 Message Date
Claude
3e4983ff93 Replace single-quoted literals in messaging calls with cli markup
Converted bare 'value' strings inside stop_(), warning_(), message_()
to appropriate cli markup:
- {.val}: option values ('drug', 'dose', 'administration', 'SDD', 'logbook')
- {.cls}: class names ('sir', 'mo')
- {.field}: column names ('mo' in mo_source)
- {.code}: object/dataset names ('clinical_breakpoints')

Files changed: ab_from_text.R, av_from_text.R, sir.R, sir_calc.R, mo_source.R

https://claude.ai/code/session_01XHWLohiSTdZvCutwD7ag2b
2026-03-18 23:36:53 +00:00
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
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
4798d2c55e Replace {.fun} with {.help} for all exported functions in messaging
All function names referenced via {.fun …} in cli-style messages are
exported in NAMESPACE, so {.help …} is the appropriate markup — it
renders as a clickable help link rather than plain function styling.

https://claude.ai/code/session_01XHWLohiSTdZvCutwD7ag2b
2026-03-18 16:06:30 +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
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
63099cd81e (v2.1.1.9232) is.mic() iteration, documentation cleanup 2025-03-31 10:51:31 +02:00
92c4fc0f94 (v2.1.1.9125) replace 'antibiotic selectors' with 'antimicrobial selectors' 2025-01-17 12:09:39 +01:00
1ca40e8d67 (v2.1.1.9079) fix for uti in as.sir() 2024-09-24 15:34:12 +02:00
640888f408 (v2.1.1.9064) update all microbial taxonomy, add mycobank, big documentation update 2024-07-16 14:53:17 +02:00
7be4dabbc0 support veterinary MIC/disk translation 2024-02-24 15:16:52 +01: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
dad25302f2 make rsi work in more cases, documentation update 2023-02-22 14:38:57 +01:00
eef00069fd add all options to documentation 2023-01-23 20:07:57 +01:00
19fd0ef121 sort sir history 2023-01-23 15:01:21 +01:00
Dr. Matthijs Berends
98e62c9af2 Replace RSI with SIR 2023-01-21 23:47:20 +01:00
593d740b84 documentation, file permissions 2023-01-19 12:54:53 +01:00
84ed8c32bb documentation 2023-01-06 19:21:04 +01:00
f619fb683b support new mo codes 2022-12-27 15:16:15 +01:00
85e2fbe4a3 remove warnings from unit tests 2022-10-19 11:47:57 +02:00
Dr. Matthijs Berends
cd2acc4a29 New mo algorithm, prepare for 2.0 2022-10-05 09:12:22 +02:00
4d050aef7c styled, unit test fix 2022-08-28 10:31:50 +02:00
952d16de33 new, automated website 2022-08-21 16:37:20 +02:00
1c891cc90c (v1.8.1.9003) set_mo_source() fix 2022-05-09 20:36:44 +02:00
25cef46c59 (v1.8.0) prerelease 1.8.0 2021-12-23 18:56:28 +01:00
f406319503 (v1.7.0.9000) package size 2021-05-30 22:14:38 +02:00
8fda473e49 (v1.5.0.9015) unit test fix, grouped first isolates 2021-02-04 16:48:16 +01:00
2eca8c3f01 (v1.5.0.9014) only_rsi_columns, is.rsi.eligible improvement 2021-02-02 23:57:35 +01:00
286eaa9699 (v1.5.0.9010) MDRO vignette update, get_episode for < day 2021-01-24 14:48:56 +01:00
4eab095306 (v1.5.0.9006) major documentation update 2021-01-18 16:57:56 +01:00
afc325c314 (v1.4.0.9050) ab selectors base R 2020-12-27 20:32:40 +01:00
8b52f9b1be (v1.4.0.9047) unit tests 2020-12-27 00:30:28 +01:00
acbd0cf7ca (v1.4.0.9046) get_episode 2020-12-27 00:07:00 +01:00
df37584189 (v1.4.0.9044) mo tibble printing, mo_shortname() fix 2020-12-24 23:29:10 +01:00
128ebcfd62 (v1.4.0.9043) documentation update 2020-12-22 00:51:17 +01:00
ee70883246 (v1.4.0.9042) auto dark theme website 2020-12-21 22:46:29 +01:00
81af41da3a (v1.4.0.9041) updates based on review 2020-12-17 16:22:25 +01:00
15c732703d (v1.4.0.9015) bugfix 2020-11-10 16:35:56 +01:00
5a607abb36 (v1.4.0.9011) message formatting 2020-10-27 15:56:51 +01:00
4e9ccb4435 (v1.4.0.9001) is_gram_positive(), is_gram_negative(), parameter hardening 2020-10-19 17:09:19 +02:00
28e77680c5 (v1.4.0) matching score update 2020-10-08 11:16:03 +02:00
baf510183c (v1.3.0.9038) prefinal 1.4.0 2020-10-04 19:26:43 +02:00
c19095a3d5 (v1.3.0.9026) eucast expert rules 3.2 2020-09-24 00:30:11 +02:00
4e40e42011 (v1.3.0.9022) mo_matching_score(), poorman update, as.rsi() fix 2020-09-18 16:05:53 +02:00
c4b87fe241 (v1.3.0.9014) as.mo() speed improvement 2020-09-03 12:31:48 +02:00
6ab468362d (v1.2.0.9034) code cleaning 2020-07-13 09:17:24 +02:00
76fc8e1b14 (v1.2.0.9026) move to github 2020-07-08 14:48:06 +02:00