diff --git a/CLAUDE.html b/CLAUDE.html index c1cb9a88b..be35e3314 100644 --- a/CLAUDE.html +++ b/CLAUDE.html @@ -73,7 +73,7 @@ pkgdown::build_site() # Code coverage report -covr::package_coverage() +covr::package_coverage()

From the shell:

# CRAN check from parent directory
 R CMD check AMR
@@ -221,13 +221,18 @@ _pkgdown.yml # pkgdown website configuration

All PRs are squash-merged, so each PR lands as exactly one commit on the default branch. Version numbers are kept in sync with the cumulative commit count since the last released tag. Therefore exactly one version bump is allowed per PR, regardless of how many intermediate commits are made on the branch.

Computing the correct version number

-

Run the following from the repo root to determine the version string to use:

-
currenttag=$(git describe --tags --abbrev=0 | sed 's/v//')
-currenttagfull=$(git describe --tags --abbrev=0)
-defaultbranch=$(git branch | cut -c 3- | grep -E '^master$|^main$')
-currentcommit=$(git rev-list --count ${currenttagfull}..${defaultbranch})
-currentversion="${currenttag}.$((currentcommit + 9001 + 1))"
-echo "$currentversion"
+

First, ensure git and gh are installed — both are required for the version computation and for pushing changes. Install them if missing before doing anything else:

+
which git || apt-get install -y git
+which gh   || apt-get install -y gh
+# Also ensure all tags are fetched so git describe works
+git fetch --tags
+

Then run the following from the repo root to determine the version string to use:

+
currenttag=$(git describe --tags --abbrev=0 | sed 's/v//')
+currenttagfull=$(git describe --tags --abbrev=0)
+defaultbranch=$(git branch | cut -c 3- | grep -E '^master$|^main$')
+currentcommit=$(git rev-list --count ${currenttagfull}..${defaultbranch})
+currentversion="${currenttag}.$((currentcommit + 9001 + 1))"
+echo "$currentversion"

The + 1 accounts for the fact that this PR’s squash commit is not yet on the default branch. Set both of these files to the resulting version string (and only once per PR, even across multiple commits):

  1. DESCRIPTION — the Version: field

  2. diff --git a/CLAUDE.md b/CLAUDE.md index 76ccbce25..2dceee299 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -171,8 +171,19 @@ intermediate commits are made on the branch. #### Computing the correct version number -Run the following from the repo root to determine the version string to -use: +**First, ensure `git` and `gh` are installed** — both are required for +the version computation and for pushing changes. Install them if missing +before doing anything else: + +``` bash +which git || apt-get install -y git +which gh || apt-get install -y gh +# Also ensure all tags are fetched so git describe works +git fetch --tags +``` + +Then run the following from the repo root to determine the version +string to use: ``` bash currenttag=$(git describe --tags --abbrev=0 | sed 's/v//') diff --git a/articles/AMR.html b/articles/AMR.html index 311805166..95c2a9ce0 100644 --- a/articles/AMR.html +++ b/articles/AMR.html @@ -91,7 +91,7 @@ website update since they are based on randomly created values and the page was written in R Markdown. However, the methodology remains unchanged. This page was -generated on 04 April 2026.

    +generated on 05 April 2026.

    Introduction

    @@ -147,21 +147,21 @@ make the structure of your data generally look like this:

    -2026-04-04 +2026-04-05 abcd Escherichia coli S S -2026-04-04 +2026-04-05 abcd Escherichia coli S R -2026-04-04 +2026-04-05 efgh Escherichia coli R diff --git a/articles/AMR.md b/articles/AMR.md index e0a02d679..965faa757 100644 --- a/articles/AMR.md +++ b/articles/AMR.md @@ -3,7 +3,7 @@ **Note:** values on this page will change with every website update since they are based on randomly created values and the page was written in [R Markdown](https://rmarkdown.rstudio.com/). However, the -methodology remains unchanged. This page was generated on 04 April 2026. +methodology remains unchanged. This page was generated on 05 April 2026. ## Introduction @@ -51,9 +51,9 @@ structure of your data generally look like this: | date | patient_id | mo | AMX | CIP | |:----------:|:----------:|:----------------:|:---:|:---:| -| 2026-04-04 | abcd | Escherichia coli | S | S | -| 2026-04-04 | abcd | Escherichia coli | S | R | -| 2026-04-04 | efgh | Escherichia coli | R | S | +| 2026-04-05 | abcd | Escherichia coli | S | S | +| 2026-04-05 | abcd | Escherichia coli | S | R | +| 2026-04-05 | efgh | Escherichia coli | R | S | ### Needed R packages diff --git a/articles/PCA.html b/articles/PCA.html index 430424175..28a5668c3 100644 --- a/articles/PCA.html +++ b/articles/PCA.html @@ -200,7 +200,7 @@ function:

    #> [1] "Caryophanales" "Enterobacterales" "Lactobacillales" "Pseudomonadales" #> Importance of components: #> PC1 PC2 PC3 PC4 PC5 PC6 PC7 -#> Standard deviation 2.1539 1.6807 0.6138 0.33879 0.20808 0.03140 9.577e-17 +#> Standard deviation 2.1539 1.6807 0.6138 0.33879 0.20808 0.03140 1.232e-16 #> Proportion of Variance 0.5799 0.3531 0.0471 0.01435 0.00541 0.00012 0.000e+00 #> Cumulative Proportion 0.5799 0.9330 0.9801 0.99446 0.99988 1.00000 1.000e+00
    #> Groups (n=4, named as 'order'):
    diff --git a/articles/PCA.md b/articles/PCA.md
    index 21efe5903..fb76acece 100644
    --- a/articles/PCA.md
    +++ b/articles/PCA.md
    @@ -119,7 +119,7 @@ summary(pca_result)
     #> [1] "Caryophanales"    "Enterobacterales" "Lactobacillales"  "Pseudomonadales"
     #> Importance of components:
     #>                           PC1    PC2    PC3     PC4     PC5     PC6       PC7
    -#> Standard deviation     2.1539 1.6807 0.6138 0.33879 0.20808 0.03140 9.577e-17
    +#> Standard deviation     2.1539 1.6807 0.6138 0.33879 0.20808 0.03140 1.232e-16
     #> Proportion of Variance 0.5799 0.3531 0.0471 0.01435 0.00541 0.00012 0.000e+00
     #> Cumulative Proportion  0.5799 0.9330 0.9801 0.99446 0.99988 1.00000 1.000e+00
     ```
    diff --git a/articles/datasets.html b/articles/datasets.html
    index b97cf35a7..2ac181944 100644
    --- a/articles/datasets.html
    +++ b/articles/datasets.html
    @@ -80,7 +80,7 @@