From 4843ce24f7e5cf704f5b7bbfd31ec0fa907ebd38 Mon Sep 17 00:00:00 2001 From: larnsce Date: Sat, 31 Oct 2026 19:39:48 +0100 Subject: [PATCH 1/5] feat: site branding of washr 1.2.1 in the standard washr 1.2.1 puts a footer with the washr version and a publisher sentence, a navbar link, a community block and the Open Graph image on every package site (openwashdata/washr#145). The review standard mirrors the washr template and reads the organization values from the profiles, so both change in step, or the review flags every refreshed site. The template, the standards file, the fixture and the washr skill's site reference carry the new blocks; both profiles gain home_url, catalog_url, community_text and publisher_text, the GHE values to confirm in the first GHE review; the check script prints the two new advisory docs lines from washr and passes the publisher sentence to it; the floor is 1.2.1 and the version 1.8.0 throughout. The expected report gains two PASS lines, the 19 FAIL + 1 FLAG mapping to D1 to D17 is unchanged, and the cases footer-missing and footer-stale cover the failing lines. Prepared ahead of the CRAN release of washr 1.2.1, which the issue names as the point for the floor bump: the gate on CI needs washr 1.2.1 installable before this merges. Refs #95 Assisted-by: Claude claude-fable-5-1 Claude-Session: https://claude.ai/code/session_0154SimKL2w6hTuq4FaTKNCK --- .claude-plugin/marketplace.json | 4 +- .claude-plugin/plugin.json | 2 +- NEWS.md | 11 ++++ README.md | 5 +- fixtures/SCORECARD.md | 2 + fixtures/cases/footer-missing/expected.txt | 2 + .../cases/footer-missing/overlay/_pkgdown.yml | 42 +++++++++++++++ fixtures/cases/footer-stale/expected.txt | 1 + .../cases/footer-stale/overlay/_pkgdown.yml | 50 +++++++++++++++++ fixtures/expected/pkgreviewtest.md | 4 +- fixtures/pkgreviewtest/DESCRIPTION | 1 + fixtures/pkgreviewtest/_pkgdown.yml | 22 +++++++- skills/add-doi/SKILL.md | 2 +- skills/create-release/SKILL.md | 2 +- skills/pkgreview-core/VERSION | 2 +- skills/pkgreview-core/WASHR_FLOOR | 2 +- skills/pkgreview-core/check/pkgreview-check.R | 17 +++++- .../pkgreview-core/references/orgs/README.md | 10 +++- .../orgs/global-health-engineering.md | 10 +++- .../references/orgs/openwashdata.md | 10 +++- skills/pkgreview-core/references/standards.md | 53 +++++++++++++++---- .../references/templates/_pkgdown.yml | 46 ++++++++++++++-- skills/washr/SKILL.md | 14 ++--- skills/washr/references/pkgdown-site.md | 35 +++++++++--- 24 files changed, 305 insertions(+), 44 deletions(-) create mode 100644 fixtures/cases/footer-missing/expected.txt create mode 100644 fixtures/cases/footer-missing/overlay/_pkgdown.yml create mode 100644 fixtures/cases/footer-stale/expected.txt create mode 100644 fixtures/cases/footer-stale/overlay/_pkgdown.yml diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 8329c5e..7b0c171 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -5,13 +5,13 @@ }, "metadata": { "description": "The openwashdata package skills. Review: review-package, review-issue, create-next-issue, review-status, review-complete, review-upgrade, create-release, add-doi. Building a package: washr.", - "version": "1.7.0" + "version": "1.8.0" }, "plugins": [ { "name": "pkgreview", "description": "Review workflow for R data packages in registered organizations: issue-per-area review on dev, release and DOI skills, standard upgrades. The washr skill builds a data package with the washr R package. The skills read shared references from skills/pkgreview-core.", - "version": "1.7.0", + "version": "1.8.0", "source": "./", "strict": false, "skills": [ diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index d0cf429..83ec551 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,5 +1,5 @@ { "name": "pkgreview", - "version": "1.7.0", + "version": "1.8.0", "description": "Review workflow for R data packages in registered organizations (openwashdata, Global Health Engineering): issue-per-area review on dev, release and DOI skills, standard upgrades. The washr skill builds a data package with the washr R package." } diff --git a/NEWS.md b/NEWS.md index a99fba5..05e6013 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,6 +2,17 @@ One section per release. Skill, script, template, fixture, and process changes are recorded here; checklist wording changes are recorded in `docs/checklist-reconciliation.md` (repo rule 3), one row per item. Releases before 1.5.0 are described by their reconciliation sections and tag messages. +# pkgreview 1.8.0 + +The release that pairs with washr 1.2.1 (openwashdata/washr#145): every package site names washr and the organization it belongs to. No checklist item changed. + +- Template and standards file: the standard `_pkgdown.yml` gains the navbar link to the organization's website, the community block in the sidebar, the footer with the publisher sentence and the washr version, and the Open Graph image that `washr::use_brand()` writes; the standards file explains the blocks and names `washr::update_website()` for a file written by an older washr (#95). +- Organization profiles: four new keys, `home_url`, `catalog_url`, `community_text` and `publisher_text`, with the openwashdata values; the Global-Health-Engineering values wait for the first GHE review, as the funding text does (#50, #95). +- Check script: two advisory lines in the docs area from washr, the publisher sentence in the footer (verbatim, as the funding text) and the washr version the footer names against `Config/washr/version` in DESCRIPTION; NOT RUN for a profile without a publisher and for a package whose DESCRIPTION records no washr version (#95). +- The floor is 1.2.1 throughout (`WASHR_FLOOR`, both org profiles, the skill preflights, the README table); the gate and drift workflows keep installing washr from CRAN and need 1.2.1 there (#95). +- Fixtures: `pkgreviewtest` carries the three new blocks and records the washr version, so the expected report gains two PASS lines and the 19 FAIL + 1 FLAG mapping to D1 to D17 is unchanged; the cases `footer-missing` and `footer-stale` cover the failing lines (#95). +- `/washr`: the pkgdown site reference describes the new blocks, the four fields and `update_website()` (#95). + # pkgreview 1.7.0 The release that pairs with washr 1.2.0. The check script takes its metadata, docs, and tests lines from washr, the plugin gains the washr skill, and the review skills gain the unattended mode and the release practice items. No checklist item changed. diff --git a/README.md b/README.md index e9580fe..30145d0 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ Each review addresses 4 key areas: ## Requirements - R and RStudio -- R packages on the reviewer's machine: `washr` 1.2.0 or newer (keeps +- R packages on the reviewer's machine: `washr` 1.2.1 or newer (keeps DESCRIPTION, CITATION.cff, and inst/CITATION in sync, owns the site metadata, and decides the metadata, docs, and tests lines of the check script; packages in the registered orgs are scaffolded with it), plus @@ -99,7 +99,8 @@ and checked weekly by CI): |-----------|-------| | 1.0.0 to 1.4.0 | 1.0.1, with the caveats the skills carried | | 1.5.0 to 1.6.1 | >= 1.1.0 | -| 1.7.0 and later | >= 1.2.0 (the check script calls `washr::check_publication_readiness()`) | +| 1.7.0 | >= 1.2.0 (the check script calls `washr::check_publication_readiness()`) | +| 1.8.0 and later | >= 1.2.1 (the check script prints the footer items of washr 1.2.1) | ## Repository Structure diff --git a/fixtures/SCORECARD.md b/fixtures/SCORECARD.md index 0cefa3b..a064770 100644 --- a/fixtures/SCORECARD.md +++ b/fixtures/SCORECARD.md @@ -56,6 +56,8 @@ Note on the v1.6.1 line (issue #86): the check script reports invalid UTF-8 stri Note on the v1.7.0 swap (issues #66 and #87): the metadata, docs, and tests lines of the check script are no longer computed in the script. They are the rows of `washr::check_publication_readiness()` (washr 1.2.0), printed under the same line texts and tiers through the `WASHR_LINES` table of the script. The defects those lines catch (D1 and D2 in metadata, D6 and D7 in docs, D5 in tests) keep their mapping, and the count is unchanged: both expected reports under `fixtures/expected/` and the nine cases under `fixtures/cases/` are byte identical before and after the swap. The data lines, the PII FLAG, and the history FLAG (D18) are still the script's own. The history fixture gained an empty `NAMESPACE`, because washr reads a package root. +Note on the v1.8.0 footer lines (issue #95, washr 1.2.1): the check script prints two more advisory docs lines from washr, the publisher sentence in the footer and the washr version the footer names against `Config/washr/version` in DESCRIPTION. `pkgreviewtest` carries the navbar, community and footer blocks of the washr 1.2.1 template and records the version, so its expected report gains two PASS lines; the 19 FAIL + 1 FLAG mapping to D1 to D17 is unchanged, and D7 keeps its two planted deviations. The failing lines are covered by the cases `fixtures/cases/footer-missing/` and `fixtures/cases/footer-stale/`. + ## How to use this scorecard Run the full review workflow against `fixtures/pkgreviewtest` after every significant change to the checklists in `skills/pkgreview-core/references/checklists/` or to the review skills and commands. diff --git a/fixtures/cases/footer-missing/expected.txt b/fixtures/cases/footer-missing/expected.txt new file mode 100644 index 0000000..cfc456f --- /dev/null +++ b/fixtures/cases/footer-missing/expected.txt @@ -0,0 +1,2 @@ +- [FAIL] (advisory) _pkgdown.yml footer carries the publisher sentence from the org profile: the profile's publisher text was not found verbatim in the footer +- [FAIL] (advisory) _pkgdown.yml footer names the washr version recorded in DESCRIPTION: the footer has no washr line diff --git a/fixtures/cases/footer-missing/overlay/_pkgdown.yml b/fixtures/cases/footer-missing/overlay/_pkgdown.yml new file mode 100644 index 0000000..e05526b --- /dev/null +++ b/fixtures/cases/footer-missing/overlay/_pkgdown.yml @@ -0,0 +1,42 @@ +url: https://github.com/openwashdata/pkgreviewtest +template: + bootstrap: 5 + +navbar: + structure: + right: [search, home, github, lightswitch] + components: + home: + text: openwashdata.org + href: https://openwashdata.org + aria-label: openwashdata website + +home: + links: + - icon: github + text: GitHub repository + href: https://github.com/openwashdata/pkgreviewtest + sidebar: + structure: [links, citation, authors, dev, custom, community] + components: + custom: + title: Funding + text: This project was funded by the [Open Research Data Program of the ETH Board](https://ethrat.ch/en/eth-domain/open-research-data/). + community: + title: openwashdata + text: This package is part of [openwashdata](https://openwashdata.org). Browse the [data catalogue](https://openwashdata.org/pages/gallery/data/) or get the [newsletter](https://openwashdata.org/pages/newsletter/). + +authors: + footer: + roles: [cre, fnd] + text: "Crafted by" + sidebar: + roles: [cre, aut, ctb] + before: "So *who* does the work?" + after: "Thanks all!" + +reference: +- title: "Data" + desc: "Access the pkgreviewtest dataset" + contents: + - pkgreviewtest diff --git a/fixtures/cases/footer-stale/expected.txt b/fixtures/cases/footer-stale/expected.txt new file mode 100644 index 0000000..d95792f --- /dev/null +++ b/fixtures/cases/footer-stale/expected.txt @@ -0,0 +1 @@ +- [FAIL] (advisory) _pkgdown.yml footer names the washr version recorded in DESCRIPTION: footer names washr 1.0.0, DESCRIPTION records 1.2.1 diff --git a/fixtures/cases/footer-stale/overlay/_pkgdown.yml b/fixtures/cases/footer-stale/overlay/_pkgdown.yml new file mode 100644 index 0000000..a966f7d --- /dev/null +++ b/fixtures/cases/footer-stale/overlay/_pkgdown.yml @@ -0,0 +1,50 @@ +url: https://github.com/openwashdata/pkgreviewtest +template: + bootstrap: 5 + +navbar: + structure: + right: [search, home, github, lightswitch] + components: + home: + text: openwashdata.org + href: https://openwashdata.org + aria-label: openwashdata website + +home: + links: + - icon: github + text: GitHub repository + href: https://github.com/openwashdata/pkgreviewtest + sidebar: + structure: [links, citation, authors, dev, custom, community] + components: + custom: + title: Funding + text: This project was funded by the [Open Research Data Program of the ETH Board](https://ethrat.ch/en/eth-domain/open-research-data/). + community: + title: openwashdata + text: This package is part of [openwashdata](https://openwashdata.org). Browse the [data catalogue](https://openwashdata.org/pages/gallery/data/) or get the [newsletter](https://openwashdata.org/pages/newsletter/). + +authors: + footer: + roles: [cre, fnd] + text: "Crafted by" + sidebar: + roles: [cre, aut, ctb] + before: "So *who* does the work?" + after: "Thanks all!" + +footer: + structure: + left: [developed_by, publisher] + right: [washr, built_with] + components: + publisher: Published by [openwashdata](https://openwashdata.org), a project of [Global Health Engineering](https://ghe.ethz.ch/) at ETH Zurich. + washr: Package built with [washr](https://openwashdata.github.io/washr/) 1.0.0. + +reference: +- title: "Data" + desc: "Access the pkgreviewtest dataset" + contents: + - pkgreviewtest diff --git a/fixtures/expected/pkgreviewtest.md b/fixtures/expected/pkgreviewtest.md index ed0cbfb..24d33fe 100644 --- a/fixtures/expected/pkgreviewtest.md +++ b/fixtures/expected/pkgreviewtest.md @@ -3,7 +3,7 @@ Package: `(normalized)` Standard: mechanical subset of the pkgreview checklists Organization profile: --org=openwashdata (openwashdata.md) -Result: 18 PASS, 19 FAIL (4 required-tier), 1 FLAG, 3 NOT RUN +Result: 20 PASS, 19 FAIL (4 required-tier), 1 FLAG, 3 NOT RUN ## metadata @@ -49,6 +49,8 @@ Result: 18 PASS, 19 FAIL (4 required-tier), 1 FLAG, 3 NOT RUN - [FAIL] (advisory) _pkgdown.yml carries the Plausible analytics header - [FAIL] (advisory) _pkgdown.yml url is the Pages URL from the org profile: url: https://github.com/openwashdata/pkgreviewtest (expected https://openwashdata.github.io/pkgreviewtest/) - [PASS] (advisory) _pkgdown.yml carries the funding sidebar text from the org profile +- [PASS] (advisory) _pkgdown.yml footer carries the publisher sentence from the org profile +- [PASS] (advisory) _pkgdown.yml footer names the washr version recorded in DESCRIPTION: footer names washr 1.2.1, DESCRIPTION records 1.2.1 - [PASS] (advisory) _pkgdown.yml brand wiring matches the org profile: not wired; optional (openwashdata/brand via washr::use_brand()) - [NOT RUN] (advisory) docs/ untracked while the pkgdown workflow deploys the site: no .github/workflows/pkgdown.yaml; the required Website item covers the missing workflow diff --git a/fixtures/pkgreviewtest/DESCRIPTION b/fixtures/pkgreviewtest/DESCRIPTION index e95455c..717ca3c 100644 --- a/fixtures/pkgreviewtest/DESCRIPTION +++ b/fixtures/pkgreviewtest/DESCRIPTION @@ -24,6 +24,7 @@ LazyData: true Roxygen: list(markdown = TRUE) RoxygenNote: 7.3.2 Date: 2026-07-08 +Config/washr/version: 1.2.1 X-schema.org-keywords: open data, washdata, water points, Switzerland X-schema.org-spatialCoverage: Switzerland X-schema.org-temporalCoverage: 2018-01-01/2022-02-05 diff --git a/fixtures/pkgreviewtest/_pkgdown.yml b/fixtures/pkgreviewtest/_pkgdown.yml index 5ce77f5..327f33f 100644 --- a/fixtures/pkgreviewtest/_pkgdown.yml +++ b/fixtures/pkgreviewtest/_pkgdown.yml @@ -2,17 +2,29 @@ url: https://github.com/openwashdata/pkgreviewtest template: bootstrap: 5 +navbar: + structure: + right: [search, home, github, lightswitch] + components: + home: + text: openwashdata.org + href: https://openwashdata.org + aria-label: openwashdata website + home: links: - icon: github text: GitHub repository href: https://github.com/openwashdata/pkgreviewtest sidebar: - structure: [links, citation, authors, dev, custom] + structure: [links, citation, authors, dev, custom, community] components: custom: title: Funding text: This project was funded by the [Open Research Data Program of the ETH Board](https://ethrat.ch/en/eth-domain/open-research-data/). + community: + title: openwashdata + text: This package is part of [openwashdata](https://openwashdata.org). Browse the [data catalogue](https://openwashdata.org/pages/gallery/data/) or get the [newsletter](https://openwashdata.org/pages/newsletter/). authors: footer: @@ -23,6 +35,14 @@ authors: before: "So *who* does the work?" after: "Thanks all!" +footer: + structure: + left: [developed_by, publisher] + right: [washr, built_with] + components: + publisher: Published by [openwashdata](https://openwashdata.org), a project of [Global Health Engineering](https://ghe.ethz.ch/) at ETH Zurich. + washr: Package built with [washr](https://openwashdata.github.io/washr/) 1.2.1. + reference: - title: "Data" desc: "Access the pkgreviewtest dataset" diff --git a/skills/add-doi/SKILL.md b/skills/add-doi/SKILL.md index aeac4ab..7e14605 100644 --- a/skills/add-doi/SKILL.md +++ b/skills/add-doi/SKILL.md @@ -22,7 +22,7 @@ DOI; without it the reviewer has to work through the steps by hand. It is also the repair path for packages released before DOI integration existed. Prerequisites: the GitHub release exists, you are on `main`, no -uncommitted changes, R with `washr` 1.2.0 or newer installed. +uncommitted changes, R with `washr` 1.2.1 or newer installed. ## Step 1: Validate diff --git a/skills/create-release/SKILL.md b/skills/create-release/SKILL.md index 6a5704f..1266f90 100644 --- a/skills/create-release/SKILL.md +++ b/skills/create-release/SKILL.md @@ -40,7 +40,7 @@ stop; nothing is written on a partial preflight. ```bash Rscript -e 'floor <- readLines("${CLAUDE_SKILL_DIR}/../pkgreview-core/WASHR_FLOOR"); stopifnot(packageVersion("washr") >= floor)' ``` - The floor is recorded once in `pkgreview-core/WASHR_FLOOR` (1.2.0 at + The floor is recorded once in `pkgreview-core/WASHR_FLOOR` (1.2.1 at this writing). Otherwise: `install.packages("washr")`, then rerun the skill. Do not adapt the steps below to an older washr. - Organization profile. Derive the org from `git remote get-url origin`, diff --git a/skills/pkgreview-core/VERSION b/skills/pkgreview-core/VERSION index bd8bf88..27f9cd3 100644 --- a/skills/pkgreview-core/VERSION +++ b/skills/pkgreview-core/VERSION @@ -1 +1 @@ -1.7.0 +1.8.0 diff --git a/skills/pkgreview-core/WASHR_FLOOR b/skills/pkgreview-core/WASHR_FLOOR index 26aaba0..6085e94 100644 --- a/skills/pkgreview-core/WASHR_FLOOR +++ b/skills/pkgreview-core/WASHR_FLOOR @@ -1 +1 @@ -1.2.0 +1.2.1 diff --git a/skills/pkgreview-core/check/pkgreview-check.R b/skills/pkgreview-core/check/pkgreview-check.R index 99f4e53..e64ae20 100644 --- a/skills/pkgreview-core/check/pkgreview-check.R +++ b/skills/pkgreview-core/check/pkgreview-check.R @@ -100,7 +100,7 @@ pval <- function(k) if (!is.null(profile) && !is.null(profile[[k]]) && length(pr # four-part version such as 1.1.1.9000) that already exports the function # is accepted, so this script can be run against washr's dev branch ahead # of the release that carries the floor. -WASHR_FLOOR_FALLBACK <- "1.2.0" +WASHR_FLOOR_FALLBACK <- "1.2.1" floor_file <- file.path(script_dir, "..", "WASHR_FLOOR") washr_floor <- if (file.exists(floor_file)) trimws(readLines(floor_file, warn = FALSE)[1]) else WASHR_FLOOR_FALLBACK if (!requireNamespace("washr", quietly = TRUE)) @@ -202,6 +202,11 @@ if (!has("DESCRIPTION") || !has("NAMESPACE")) readiness_profile <- list(analytics = analytics) for (k in c("site_url_pattern", "funding_text", "keywords_required", "brand")) if (!is.null(pval(k))) readiness_profile[[k]] <- pval(k) +# The publisher sentence of the footer (washr 1.2.1, openwashdata/washr#145). +# A profile that says none passes nothing, so washr reports the item as not +# applicable instead of looking for the word none. +if (!is.null(pval("publisher_text")) && !identical(tolower(pval("publisher_text")), "none")) + readiness_profile$publisher_text <- pval("publisher_text") readiness <- local({ old <- options(washr.quiet = TRUE) on.exit(options(old)) @@ -271,6 +276,16 @@ WASHR_LINES <- list( else "_pkgdown.yml url is the Pages URL, not the repo URL"), wline("pkgdown_funding", "docs", "advisory", "_pkgdown.yml carries the funding sidebar text from the org profile"), + # The footer of washr 1.2.1 (openwashdata/washr#145): NOT RUN for an + # organization whose profile names no publisher, and for a package whose + # DESCRIPTION records no washr version yet (update_description() writes + # it); without _pkgdown.yml the presence line is the finding. + wline("pkgdown_publisher", "docs", "advisory", + "_pkgdown.yml footer carries the publisher sentence from the org profile", + na = if (pkgdown_present) "NOT RUN" else "omit"), + wline("pkgdown_washr_version", "docs", "advisory", + "_pkgdown.yml footer names the washr version recorded in DESCRIPTION", + na = if (pkgdown_present) "NOT RUN" else "omit"), wline("pkgdown_brand", "docs", "advisory", if (brand_none) "_pkgdown.yml carries no brand (the org profile defines none)" else "_pkgdown.yml brand wiring matches the org profile"), diff --git a/skills/pkgreview-core/references/orgs/README.md b/skills/pkgreview-core/references/orgs/README.md index cd012c6..66692df 100644 --- a/skills/pkgreview-core/references/orgs/README.md +++ b/skills/pkgreview-core/references/orgs/README.md @@ -37,6 +37,10 @@ Every profile carries this field table: | Package site URL pattern | The pkgdown `url:` value per package | | Analytics | Analytics header for `_pkgdown.yml`, or `none` | | Funding sidebar text | The `home.sidebar` custom component text | +| Website | The organization's website: the navbar link, the line under the README badges and the publisher url in the site metadata; or `none` | +| Data catalogue | The catalogue named as `includedInDataCatalog` in the site metadata, or `none` | +| Community sidebar text | The `home.sidebar` community component text, or `none` | +| Publisher footer text | The `footer.components.publisher` sentence, matched verbatim, or `none` | | Citation tooling | Tooling that keeps DESCRIPTION, CITATION.cff, and inst/CITATION in sync, with its version floor | | README template | The template the docs checklist item points at | | Discovery keywords (minimum) | The discovery keyword set for the metadata checklist item (`X-schema.org-keywords` in DESCRIPTION) | @@ -50,7 +54,9 @@ values under stable keys, read by the check script (`--org=`, or `--org-file=` for a stamped copy): `github_org`, `pages_domain`, `site_url_pattern` (with `` as the placeholder), `analytics` (`plausible` or `none`), `analytics_domain`, `funding_text` (matched -verbatim in `_pkgdown.yml`), `citation_tooling`, `readme_template`, +verbatim in `_pkgdown.yml`), `home_url`, `catalog_url`, `community_text`, +`publisher_text` (matched verbatim in the footer of `_pkgdown.yml`; each +`none` when the organization has no such value), `citation_tooling`, `readme_template`, `keywords_required` (the literal keywords every package must carry; the topic and the country or region stay reviewer judgment), `brand` (a source such as `openwashdata/brand`, or `none`), `zenodo_community`. The @@ -62,7 +68,7 @@ Open a PR to openwashdata/pkgreview adding `orgs/[org].md` with the field table filled in. Two constraints hold until the standard is extended: - Citation tooling: the checklists and the standards template currently - express only the washr flow (1.2.0 or newer). Registering an org with + express only the washr flow (1.2.1 or newer). Registering an org with different tooling requires reworking those files, which is a standard change with its own version bump (repo rule 1). - Analytics: the check script understands `analytics: plausible` and diff --git a/skills/pkgreview-core/references/orgs/global-health-engineering.md b/skills/pkgreview-core/references/orgs/global-health-engineering.md index c4200db..ff62169 100644 --- a/skills/pkgreview-core/references/orgs/global-health-engineering.md +++ b/skills/pkgreview-core/references/orgs/global-health-engineering.md @@ -12,7 +12,11 @@ so the two profiles are near equal. | Package site URL pattern | `https://global-health-engineering.github.io//` | | Analytics | Plausible: `` | | Funding sidebar text | This project was funded by the [Open Research Data Program of the ETH Board](https://ethrat.ch/en/eth-domain/open-research-data/). Verify during the first GHE review (openwashdata/pkgreview#50). | -| Citation tooling | washr >= 1.2.0: `washr::update_citation()`, `washr::update_description()`, `washr::update_metadata()`. Verify the output carries no openwashdata-specific branding (#48 decision 2) | +| Website | `https://ghe.ethz.ch/`: the navbar link, the line under the README badges and the publisher url in the site metadata. Verify during the first GHE review (openwashdata/pkgreview#50). | +| Data catalogue | none: Global Health Engineering has no data catalogue, so the site metadata carries no `includedInDataCatalog` | +| Community sidebar text | none: no community block in the sidebar | +| Publisher footer text | Published by [Global Health Engineering](https://ghe.ethz.ch/) at ETH Zurich. Verify during the first GHE review (openwashdata/pkgreview#50). | +| Citation tooling | washr >= 1.2.1: `washr::update_citation()`, `washr::update_description()`, `washr::update_metadata()`. Verify the output carries no openwashdata-specific branding (#48 decision 2) | | README template | washr README template | | Discovery keywords (minimum) | open data, global health, the topic, the country or region | | Brand | none: the openwashdata brand must not appear in a Global-Health-Engineering package, so `washr::use_brand()` is not run and `_pkgdown.yml` carries no `bslib.brand` line | @@ -29,6 +33,10 @@ site_url_pattern: https://global-health-engineering.github.io// analytics: plausible analytics_domain: global-health-engineering.github.io funding_text: This project was funded by the [Open Research Data Program of the ETH Board](https://ethrat.ch/en/eth-domain/open-research-data/). +home_url: https://ghe.ethz.ch/ +catalog_url: none +community_text: none +publisher_text: Published by [Global Health Engineering](https://ghe.ethz.ch/) at ETH Zurich. citation_tooling: washr readme_template: washr keywords_required: diff --git a/skills/pkgreview-core/references/orgs/openwashdata.md b/skills/pkgreview-core/references/orgs/openwashdata.md index 521148e..807c0bb 100644 --- a/skills/pkgreview-core/references/orgs/openwashdata.md +++ b/skills/pkgreview-core/references/orgs/openwashdata.md @@ -11,7 +11,11 @@ for reviews that predate org profiles (before v1.3.0). | Package site URL pattern | `https://openwashdata.github.io//` | | Analytics | Plausible: `` | | Funding sidebar text | This project was funded by the [Open Research Data Program of the ETH Board](https://ethrat.ch/en/eth-domain/open-research-data/). | -| Citation tooling | washr >= 1.2.0: `washr::update_citation()`, `washr::update_description()`, `washr::update_metadata()` | +| Website | `https://openwashdata.org`: the navbar link, the line under the README badges and the publisher url in the site metadata | +| Data catalogue | `https://openwashdata.org/pages/gallery/data/`: `includedInDataCatalog` in the site metadata | +| Community sidebar text | This package is part of [openwashdata](https://openwashdata.org). Browse the [data catalogue](https://openwashdata.org/pages/gallery/data/) or get the [newsletter](https://openwashdata.org/pages/newsletter/). | +| Publisher footer text | Published by [openwashdata](https://openwashdata.org), a project of [Global Health Engineering](https://ghe.ethz.ch/) at ETH Zurich. | +| Citation tooling | washr >= 1.2.1: `washr::update_citation()`, `washr::update_description()`, `washr::update_metadata()` | | README template | washr README template | | Discovery keywords (minimum) | open data, washdata, the topic, the country or region | | Brand | `_brand.yml` from [openwashdata/brand](https://github.com/openwashdata/brand), installed and wired into `_pkgdown.yml` with `washr::use_brand()` | @@ -28,6 +32,10 @@ site_url_pattern: https://openwashdata.github.io// analytics: plausible analytics_domain: openwashdata.github.io funding_text: This project was funded by the [Open Research Data Program of the ETH Board](https://ethrat.ch/en/eth-domain/open-research-data/). +home_url: https://openwashdata.org +catalog_url: https://openwashdata.org/pages/gallery/data/ +community_text: This package is part of [openwashdata](https://openwashdata.org). Browse the [data catalogue](https://openwashdata.org/pages/gallery/data/) or get the [newsletter](https://openwashdata.org/pages/newsletter/). +publisher_text: Published by [openwashdata](https://openwashdata.org), a project of [Global Health Engineering](https://ghe.ethz.ch/) at ETH Zurich. citation_tooling: washr readme_template: washr keywords_required: diff --git a/skills/pkgreview-core/references/standards.md b/skills/pkgreview-core/references/standards.md index 46e34c7..9087838 100644 --- a/skills/pkgreview-core/references/standards.md +++ b/skills/pkgreview-core/references/standards.md @@ -53,10 +53,13 @@ as optional follow-ups, and never let them block publication. `variable_type` value; the organization catalog parses it that way. - Vignettes live in `vignettes/articles/`, never directly in `vignettes/`. This keeps pkgdown rendering correct and avoids CRAN issues. -- `_pkgdown.yml` follows the standard configuration below, - including the analytics header and the funding sidebar from the - organization profile, and the brand wiring when the profile defines a - brand. Do not remove or reorganize these blocks. +- `_pkgdown.yml` follows the standard configuration below, including + the analytics header, the navbar link to the organization's website, + the funding and community blocks of the sidebar and the footer that + names the washr version and the publisher, all from the organization + profile, and the brand wiring when the profile defines a brand. Do not + remove or reorganize these blocks. `washr::update_website()` brings a + file written by an older washr up to date and keeps the rest. - The website is deployed by the pkgdown GitHub Actions workflow (`.github/workflows/pkgdown.yaml`) to the `gh-pages` branch on every push to `main`. `docs/` is ignored and never committed; a local @@ -78,7 +81,7 @@ as optional follow-ups, and never let them block publication. - After version or author changes, run `washr::update_citation()` so DESCRIPTION, CITATION.cff, and inst/CITATION stay in sync. It keeps a DOI already on file and owns the DOI badge in README.Rmd; do not edit - the badge by hand. washr 1.2.0 or newer is the floor for these calls. + the badge by hand. washr 1.2.1 or newer is the floor for these calls. - Raw data stays in `data-raw/`, processed `.rda` data in `data/`, and CSV/XLSX exports in `inst/extdata/`. @@ -120,10 +123,14 @@ the package. The `_pkgdown.yml` reference index lists every dataset. Replace `packagename` with the actual package name. `url` is the site base URL (canonical links, sitemap.xml, redirects), so it must be the Pages URL, -never the GitHub repo URL; the repo link lives in `home.links`. The two -commented `bslib` lines are written by `washr::use_brand()` when the -organization profile defines a brand (it rewrites the file through the -yaml package, which drops the comments); leave them out otherwise. +never the GitHub repo URL; the repo link lives in `home.links`. The +commented `bslib` and `opengraph` lines are written by `washr::use_brand()` +when the organization profile defines a brand; leave them out otherwise. +The navbar link, the community block and the publisher sentence carry the +openwashdata values; a package of another organization takes its +profile's `home_url`, `community_text` and `publisher_text`, and leaves a +block out when the profile says `none`. The washr line names the version +recorded in `Config/washr/version` of DESCRIPTION. ```yaml url: https://{{ORG_DOMAIN}}/packagename/ @@ -131,21 +138,37 @@ template: bootstrap: 5 # bslib: # brand: _brand.yml + # opengraph: + # image: + # src: https://raw.githubusercontent.com/{{ORG_NAME}}/brand/vX.Y.Z/assets/social-preview.png + # alt: {{ORG_NAME}}, social preview image includes: in_header: | +navbar: + structure: + right: [search, home, github, lightswitch] + components: + home: + text: openwashdata.org + href: https://openwashdata.org + aria-label: openwashdata website + home: links: - icon: github text: GitHub repository href: https://github.com/{{ORG_NAME}}/packagename sidebar: - structure: [links, citation, authors, dev, custom] + structure: [links, citation, authors, dev, custom, community] components: custom: title: Funding text: This project was funded by the [Open Research Data Program of the ETH Board](https://ethrat.ch/en/eth-domain/open-research-data/). + community: + title: openwashdata + text: This package is part of [openwashdata](https://openwashdata.org). Browse the [data catalogue](https://openwashdata.org/pages/gallery/data/) or get the [newsletter](https://openwashdata.org/pages/newsletter/). authors: footer: @@ -156,6 +179,14 @@ authors: before: "So *who* does the work?" after: "Thanks all!" +footer: + structure: + left: [developed_by, publisher] + right: [washr, built_with] + components: + publisher: Published by [openwashdata](https://openwashdata.org), a project of [Global Health Engineering](https://ghe.ethz.ch/) at ETH Zurich. + washr: Package built with [washr](https://openwashdata.github.io/washr/) 1.2.1. + reference: - title: "Data" desc: "Access the packagename dataset" @@ -179,6 +210,8 @@ package. - Full check: `R -e "devtools::check()"` - Refresh the site metadata after DESCRIPTION, dictionary, or citation changes: `R -e "washr::update_metadata()"` +- Bring `_pkgdown.yml` up to date after a washr release: + `R -e "washr::update_website()"` - Preview the website locally: `R -e "pkgdown::build_site()"` (writes the ignored `docs/`; the published site is built by the pkgdown workflow on the next push to `main`) diff --git a/skills/pkgreview-core/references/templates/_pkgdown.yml b/skills/pkgreview-core/references/templates/_pkgdown.yml index 3c6b024..b47b1ba 100644 --- a/skills/pkgreview-core/references/templates/_pkgdown.yml +++ b/skills/pkgreview-core/references/templates/_pkgdown.yml @@ -4,35 +4,59 @@ # organization (profiles: skills/pkgreview-core/references/orgs/). # `url` is the site base URL (canonical links, sitemap.xml, redirects), # so it must be the Pages URL, never the GitHub repo URL; the repo link -# lives in home.links below. +# lives in home.links below. The navbar link, the sidebar texts and the +# footer come from the org profile (home_url, funding_text, +# community_text, publisher_text): washr::setup_website() writes them +# from the Config/washr fields of DESCRIPTION, and washr::update_website() +# adds them to a file written by an older washr. url: https://ORGDOMAIN/packagename/ template: bootstrap: 5 # Brand: only when the org profile defines one. washr::use_brand() - # installs _brand.yml and writes these two lines itself (through the - # yaml package, which drops the comments in this file). Leave them out - # for an org whose profile says none. + # installs _brand.yml and writes these lines itself, the Open Graph + # image included (the social preview of the brand repository at the + # installed release). Leave them out for an org whose profile says none. # bslib: # brand: _brand.yml + # opengraph: + # image: + # src: https://raw.githubusercontent.com/ORGNAME/brand/vX.Y.Z/assets/social-preview.png + # alt: ORGNAME, social preview image # The in_header block is the analytics header from the org profile; # omit includes: entirely when the profile defines no analytics. includes: in_header: | +# The home component links the website of the org (home_url); omit the +# navbar block entirely when the profile defines none. +navbar: + structure: + right: [search, home, github, lightswitch] + components: + home: + text: openwashdata.org + href: https://openwashdata.org + aria-label: openwashdata website + home: links: - icon: github text: GitHub repository href: https://github.com/ORGNAME/packagename sidebar: - structure: [links, citation, authors, dev, custom] + structure: [links, citation, authors, dev, custom, community] components: custom: title: Funding # The text value comes from the org profile's funding sidebar # field; both currently registered orgs use the line below. text: This project was funded by the [Open Research Data Program of the ETH Board](https://ethrat.ch/en/eth-domain/open-research-data/). + # The community block comes from the org profile's community_text; + # omit it, and its name in structure, when the profile defines none. + community: + title: openwashdata + text: This package is part of [openwashdata](https://openwashdata.org). Browse the [data catalogue](https://openwashdata.org/pages/gallery/data/) or get the [newsletter](https://openwashdata.org/pages/newsletter/). authors: footer: @@ -43,6 +67,18 @@ authors: before: "So *who* does the work?" after: "Thanks all!" +# The footer names the washr version recorded in Config/washr/version of +# DESCRIPTION (washr::update_description() refreshes both) and the +# publisher from the org profile's publisher_text; omit publisher, and its +# name in structure, when the profile defines none. +footer: + structure: + left: [developed_by, publisher] + right: [washr, built_with] + components: + publisher: Published by [openwashdata](https://openwashdata.org), a project of [Global Health Engineering](https://ghe.ethz.ch/) at ETH Zurich. + washr: Package built with [washr](https://openwashdata.github.io/washr/) 1.2.1. + # Multi-dataset packages: list one entry per data object under contents, # each with its unique, descriptive name (see the data checklist); none of # them is named after the package. diff --git a/skills/washr/SKILL.md b/skills/washr/SKILL.md index ac58237..b967a98 100644 --- a/skills/washr/SKILL.md +++ b/skills/washr/SKILL.md @@ -24,11 +24,11 @@ the person to confirm. first step that is not done. With a step number (`3`) or name (`dictionary`), run Step 0 and go to that step. -The skill needs washr 1.2.0 or newer. It relies on what 1.2.0 added: +The skill needs washr 1.2.1 or newer. It relies on what 1.2.0 added: messages in three fixed kinds, a returned path from every function, `update_dictionary()`, `update_zenodo_json()`, the `Config/washr/` fields -in DESCRIPTION, and `check_publication_readiness()`. Do not adapt the -steps to an older washr. +in DESCRIPTION, and `check_publication_readiness()`, and on +`update_website()` from 1.2.1. Do not adapt the steps to an older washr. ## Rules, non-negotiable @@ -92,7 +92,7 @@ it. Report a step as done only after its "Verify" check passed. ## Step 0: Preflight - washr version: - `Rscript -e 'stopifnot(packageVersion("washr") >= "1.2.0")'`. + `Rscript -e 'stopifnot(packageVersion("washr") >= "1.2.1")'`. If it fails, stop and tell the person to run `install.packages("washr")`. `check_publication_readiness()` names the installed version in the first line of its report (Step 10). @@ -358,8 +358,10 @@ Leave `has_example` out when the person wants no example article. The call writes `_pkgdown.yml` from DESCRIPTION and builds the site into `docs/`, which takes a minute. An existing `_pkgdown.yml` is kept as it is, so a data object added later has to be added to its `reference` -index by hand, or the build stops. The file is explained in -`${CLAUDE_SKILL_DIR}/references/pkgdown-site.md`. +index by hand, or the build stops. A file written by an older washr is +brought up to date with `washr::update_website()`, which adds the +footer, the navbar link and the sidebar blocks and keeps the rest. The +file is explained in `${CLAUDE_SKILL_DIR}/references/pkgdown-site.md`. pkgdown reports "URLs not ok" while the site URL is missing from DESCRIPTION. Add it (the `url` line of `_pkgdown.yml`), then refresh the diff --git a/skills/washr/references/pkgdown-site.md b/skills/washr/references/pkgdown-site.md index 1799250..7dce344 100644 --- a/skills/washr/references/pkgdown-site.md +++ b/skills/washr/references/pkgdown-site.md @@ -3,9 +3,10 @@ `washr::setup_website()` writes `_pkgdown.yml` from the washr template and builds the site. Every value in the file comes from DESCRIPTION, so a wrong value is fixed in DESCRIPTION before the file is written. Once -`_pkgdown.yml` exists, washr keeps it as it is on every later run. The -standard configuration a review compares against is -`skills/pkgreview-core/references/templates/_pkgdown.yml`. +`_pkgdown.yml` exists, `setup_website()` keeps it as it is on every later +run; `washr::update_website()` brings a file written by an older washr +up to date (see below). The standard configuration a review compares +against is `skills/pkgreview-core/references/templates/_pkgdown.yml`. ## The blocks of `_pkgdown.yml` @@ -14,9 +15,12 @@ standard configuration a review compares against is | `url` | the Pages URL of the site, never the repository URL | the organisation of the repository in `URL`, or `Config/washr/pages-domain` | | `template: includes: in_header` | the Plausible analytics header | `Config/washr/analytics-domain`; left out when `none` | | `template: bslib: brand` | the brand wiring, added by `washr::use_brand()` | `Config/washr/brand-source` | +| `template: opengraph: image` | the social preview of the brand, added by `washr::use_brand()` | `Config/washr/brand-source` and `Config/washr/brand` | +| `navbar` | the link to the website of the organisation, before the GitHub icon | `Config/washr/home`; left out when `none` | | `home: links` | the link to the GitHub repository | the repository in `URL` | -| `home: sidebar` | the funding sentence | `Config/washr/funding`; left out when `none` | +| `home: sidebar` | the funding sentence and the community block | `Config/washr/funding` and `Config/washr/community`; each left out when `none` | | `authors` | the footer and sidebar roles | fixed in the template | +| `footer` | the publisher sentence and the washr version that last ran `update_description()` | `Config/washr/publisher` (left out when `none`) and `Config/washr/version` | | `reference` | one entry per data object in `data/` | the files in `data/` at the time of writing | Do not remove or reorganise these blocks. A data object added after the @@ -28,7 +32,8 @@ stops. `washr::update_description()` writes them once, with the openwashdata values for a package under openwashdata, and never overwrites a field that is set. For a package under another GitHub organisation it writes -the funding, analytics, community and brand fields as `none`. +the funding, analytics, Zenodo community, brand, publisher, website, +catalogue and community fields as `none`. | Field | What it sets | Value | |---|---|---| @@ -37,13 +42,29 @@ the funding, analytics, community and brand fields as `none`. | `Config/washr/doi-provider` | the DOI badge of the README | `zenodo`, or another provider for a generic DOI badge | | `Config/washr/zenodo-community` | the community in `.zenodo.json` | a Zenodo community, or `none` | | `Config/washr/brand-source` | the repository `use_brand()` copies from | a GitHub repository such as `openwashdata/brand`, or `none` | +| `Config/washr/publisher` | the publisher sentence in the footer | a sentence, Markdown allowed, or `none` | +| `Config/washr/home` | the website of the organisation: the navbar link, the line under the README badges, the publisher url in the metadata | a URL, or `none` | +| `Config/washr/catalog` | the data catalogue named in the metadata (`includedInDataCatalog`) | a URL, or `none` | +| `Config/washr/community` | the text of the community block in the sidebar | a text, Markdown allowed, or `none` | | `Config/washr/pages-domain` | the domain of the site | only written by hand, when the site is not served from `[org].github.io` | | `Config/washr/version` | the washr version that last ran `update_description()` | written by washr | | `Config/washr/brand` | the brand release that `use_brand()` installed | written by washr | The values are the person's or the organisation's. Do not write a -funding sentence, an analytics domain or a community the person did not -give. +funding sentence, an analytics domain, a publisher, a website, a +catalogue or a community the person did not give. + +## Updating the file after a washr release + +`washr::update_website()` adds to an existing `_pkgdown.yml` what the +template has gained since the file was written (the footer, the navbar +link, the sidebar blocks, the Open Graph image when the brand is +installed) and refreshes the washr version in the footer. It keeps the +reference index, hand edits, comments and the brand wiring, respects a +footer, navbar or sidebar written by hand, and leaves a current file +untouched. `update_description()` refreshes the version line on its +own. The function is the fix the readiness items `pkgdown_publisher` +and `pkgdown_washr_version` name. ## Deployment From 2e784a8dab5a527561e593fab9bd15007ab00d7c Mon Sep 17 00:00:00 2001 From: larnsce Date: Sat, 31 Oct 2026 20:13:30 +0100 Subject: [PATCH 2/5] ci: install washr from GitHub dev until CRAN serves the floor washr 1.2.1 is a GitHub-only release, carried by the next CRAN submission, so the gate and drift workflows take washr from the dev branch on GitHub as they did before 1.2.0 reached CRAN. The README says where reviewers install it from in the meantime. Refs #95 Assisted-by: Claude claude-fable-5-1 Claude-Session: https://claude.ai/code/session_0154SimKL2w6hTuq4FaTKNCK --- .github/workflows/gate.yaml | 10 ++++++++-- .github/workflows/washr-drift.yaml | 14 ++++++++++---- NEWS.md | 2 +- README.md | 4 +++- 4 files changed, 22 insertions(+), 8 deletions(-) diff --git a/.github/workflows/gate.yaml b/.github/workflows/gate.yaml index 0064d64..a2f902d 100644 --- a/.github/workflows/gate.yaml +++ b/.github/workflows/gate.yaml @@ -21,8 +21,14 @@ jobs: # The check script takes its metadata, docs, and tests lines from # washr::check_publication_readiness() (openwashdata/pkgreview#87), # so washr at or above skills/pkgreview-core/WASHR_FLOOR is needed. - - name: Install washr from CRAN - run: Rscript -e 'install.packages("washr")' + # CRAN serves a washr below the floor until 1.2.1 is released there + # (1.2.1 is a GitHub-only release, carried by the next CRAN + # submission), so washr comes from the dev branch on GitHub. Back to + # install.packages("washr") once CRAN serves the floor. + - name: Install washr from GitHub + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + run: Rscript -e 'install.packages("pak"); pak::pak("openwashdata/washr@dev")' - name: Fixture gate against the expected reports run: bash fixtures/run_gate.sh - name: Check-script case suite diff --git a/.github/workflows/washr-drift.yaml b/.github/workflows/washr-drift.yaml index a56d9a4..6818c22 100644 --- a/.github/workflows/washr-drift.yaml +++ b/.github/workflows/washr-drift.yaml @@ -1,6 +1,10 @@ -# washr API drift check (openwashdata/pkgreview#77): installs CRAN washr and +# washr API drift check (openwashdata/pkgreview#77): installs washr and # verifies every washr:: call the skills execute or instruct still exports, and -# reports the CRAN version against skills/pkgreview-core/WASHR_FLOOR. +# reports the installed version against skills/pkgreview-core/WASHR_FLOOR. +# CRAN serves a washr below the floor until 1.2.1 is released there (1.2.1 is +# a GitHub-only release, carried by the next CRAN submission), so washr comes +# from the dev branch on GitHub. Back to install.packages("washr") once CRAN +# serves the floor. name: washr-drift on: @@ -18,7 +22,9 @@ jobs: - uses: r-lib/actions/setup-r@v2 with: use-public-rspm: true - - name: Install washr from CRAN - run: Rscript -e 'install.packages("washr")' + - name: Install washr from GitHub + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + run: Rscript -e 'install.packages("pak"); pak::pak("openwashdata/washr@dev")' - name: Drift check run: Rscript scripts/washr_drift.R diff --git a/NEWS.md b/NEWS.md index 05e6013..196de07 100644 --- a/NEWS.md +++ b/NEWS.md @@ -9,7 +9,7 @@ The release that pairs with washr 1.2.1 (openwashdata/washr#145): every package - Template and standards file: the standard `_pkgdown.yml` gains the navbar link to the organization's website, the community block in the sidebar, the footer with the publisher sentence and the washr version, and the Open Graph image that `washr::use_brand()` writes; the standards file explains the blocks and names `washr::update_website()` for a file written by an older washr (#95). - Organization profiles: four new keys, `home_url`, `catalog_url`, `community_text` and `publisher_text`, with the openwashdata values; the Global-Health-Engineering values wait for the first GHE review, as the funding text does (#50, #95). - Check script: two advisory lines in the docs area from washr, the publisher sentence in the footer (verbatim, as the funding text) and the washr version the footer names against `Config/washr/version` in DESCRIPTION; NOT RUN for a profile without a publisher and for a package whose DESCRIPTION records no washr version (#95). -- The floor is 1.2.1 throughout (`WASHR_FLOOR`, both org profiles, the skill preflights, the README table); the gate and drift workflows keep installing washr from CRAN and need 1.2.1 there (#95). +- The floor is 1.2.1 throughout (`WASHR_FLOOR`, both org profiles, the skill preflights, the README table); washr 1.2.1 is a GitHub-only release that the next CRAN submission of washr carries, so the gate and drift workflows install washr from the dev branch on GitHub until CRAN serves the floor, as they did before 1.2.0 (#95). - Fixtures: `pkgreviewtest` carries the three new blocks and records the washr version, so the expected report gains two PASS lines and the 19 FAIL + 1 FLAG mapping to D1 to D17 is unchanged; the cases `footer-missing` and `footer-stale` cover the failing lines (#95). - `/washr`: the pkgdown site reference describes the new blocks, the four fields and `update_website()` (#95). diff --git a/README.md b/README.md index 30145d0..5256bea 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,9 @@ Each review addresses 4 key areas: - R packages on the reviewer's machine: `washr` 1.2.1 or newer (keeps DESCRIPTION, CITATION.cff, and inst/CITATION in sync, owns the site metadata, and decides the metadata, docs, and tests lines of the check - script; packages in the registered orgs are scaffolded with it), plus + script; packages in the registered orgs are scaffolded with it; until + CRAN serves 1.2.1, install it from GitHub with + `pak::pak("openwashdata/washr@v1.2.1")`), plus `desc`, `devtools`, `pkgdown`, and `usethis` for checks, site previews, and releases - GitHub CLI (`gh`) From e089fe4de4dec1efdd440e35064162f3bab4d4ce Mon Sep 17 00:00:00 2001 From: larnsce Date: Sun, 1 Nov 2026 10:22:17 +0100 Subject: [PATCH 3/5] docs: the publisher sentence under Citation and the logo of washr 1.2.2 washr 1.2.2 (openwashdata/washr#148) moved the publisher line from under the README badges to the Citation section and installs the brand's small logo as the package logo. The profiles, their README and the washr skill's references say so. Refs #95 Assisted-by: Claude claude-fable-5-1 Claude-Session: https://claude.ai/code/session_0154SimKL2w6hTuq4FaTKNCK --- skills/pkgreview-core/references/orgs/README.md | 2 +- .../references/orgs/global-health-engineering.md | 2 +- skills/pkgreview-core/references/orgs/openwashdata.md | 2 +- skills/washr/references/pkgdown-site.md | 3 ++- skills/washr/references/readme-sections.md | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/skills/pkgreview-core/references/orgs/README.md b/skills/pkgreview-core/references/orgs/README.md index 66692df..e0f771e 100644 --- a/skills/pkgreview-core/references/orgs/README.md +++ b/skills/pkgreview-core/references/orgs/README.md @@ -37,7 +37,7 @@ Every profile carries this field table: | Package site URL pattern | The pkgdown `url:` value per package | | Analytics | Analytics header for `_pkgdown.yml`, or `none` | | Funding sidebar text | The `home.sidebar` custom component text | -| Website | The organization's website: the navbar link, the line under the README badges and the publisher url in the site metadata; or `none` | +| Website | The organization's website: the navbar link, the publisher sentence under Citation in the README and the publisher url in the site metadata; or `none` | | Data catalogue | The catalogue named as `includedInDataCatalog` in the site metadata, or `none` | | Community sidebar text | The `home.sidebar` community component text, or `none` | | Publisher footer text | The `footer.components.publisher` sentence, matched verbatim, or `none` | diff --git a/skills/pkgreview-core/references/orgs/global-health-engineering.md b/skills/pkgreview-core/references/orgs/global-health-engineering.md index ff62169..060e3a0 100644 --- a/skills/pkgreview-core/references/orgs/global-health-engineering.md +++ b/skills/pkgreview-core/references/orgs/global-health-engineering.md @@ -12,7 +12,7 @@ so the two profiles are near equal. | Package site URL pattern | `https://global-health-engineering.github.io//` | | Analytics | Plausible: `` | | Funding sidebar text | This project was funded by the [Open Research Data Program of the ETH Board](https://ethrat.ch/en/eth-domain/open-research-data/). Verify during the first GHE review (openwashdata/pkgreview#50). | -| Website | `https://ghe.ethz.ch/`: the navbar link, the line under the README badges and the publisher url in the site metadata. Verify during the first GHE review (openwashdata/pkgreview#50). | +| Website | `https://ghe.ethz.ch/`: the navbar link, the publisher sentence under Citation in the README and the publisher url in the site metadata. Verify during the first GHE review (openwashdata/pkgreview#50). | | Data catalogue | none: Global Health Engineering has no data catalogue, so the site metadata carries no `includedInDataCatalog` | | Community sidebar text | none: no community block in the sidebar | | Publisher footer text | Published by [Global Health Engineering](https://ghe.ethz.ch/) at ETH Zurich. Verify during the first GHE review (openwashdata/pkgreview#50). | diff --git a/skills/pkgreview-core/references/orgs/openwashdata.md b/skills/pkgreview-core/references/orgs/openwashdata.md index 807c0bb..eaee8e2 100644 --- a/skills/pkgreview-core/references/orgs/openwashdata.md +++ b/skills/pkgreview-core/references/orgs/openwashdata.md @@ -11,7 +11,7 @@ for reviews that predate org profiles (before v1.3.0). | Package site URL pattern | `https://openwashdata.github.io//` | | Analytics | Plausible: `` | | Funding sidebar text | This project was funded by the [Open Research Data Program of the ETH Board](https://ethrat.ch/en/eth-domain/open-research-data/). | -| Website | `https://openwashdata.org`: the navbar link, the line under the README badges and the publisher url in the site metadata | +| Website | `https://openwashdata.org`: the navbar link, the publisher sentence under Citation in the README and the publisher url in the site metadata | | Data catalogue | `https://openwashdata.org/pages/gallery/data/`: `includedInDataCatalog` in the site metadata | | Community sidebar text | This package is part of [openwashdata](https://openwashdata.org). Browse the [data catalogue](https://openwashdata.org/pages/gallery/data/) or get the [newsletter](https://openwashdata.org/pages/newsletter/). | | Publisher footer text | Published by [openwashdata](https://openwashdata.org), a project of [Global Health Engineering](https://ghe.ethz.ch/) at ETH Zurich. | diff --git a/skills/washr/references/pkgdown-site.md b/skills/washr/references/pkgdown-site.md index 7dce344..f4404ee 100644 --- a/skills/washr/references/pkgdown-site.md +++ b/skills/washr/references/pkgdown-site.md @@ -16,6 +16,7 @@ against is `skills/pkgreview-core/references/templates/_pkgdown.yml`. | `template: includes: in_header` | the Plausible analytics header | `Config/washr/analytics-domain`; left out when `none` | | `template: bslib: brand` | the brand wiring, added by `washr::use_brand()` | `Config/washr/brand-source` | | `template: opengraph: image` | the social preview of the brand, added by `washr::use_brand()` | `Config/washr/brand-source` and `Config/washr/brand` | +| the package logo (`man/figures/logo.png`, shown beside the title; `pkgdown/assets/logo-dark.png` and the rule in `pkgdown/extra.css` for the dark theme) | the small logo of the brand, added by `washr::use_brand()` since washr 1.2.2 | the brand file | | `navbar` | the link to the website of the organisation, before the GitHub icon | `Config/washr/home`; left out when `none` | | `home: links` | the link to the GitHub repository | the repository in `URL` | | `home: sidebar` | the funding sentence and the community block | `Config/washr/funding` and `Config/washr/community`; each left out when `none` | @@ -43,7 +44,7 @@ catalogue and community fields as `none`. | `Config/washr/zenodo-community` | the community in `.zenodo.json` | a Zenodo community, or `none` | | `Config/washr/brand-source` | the repository `use_brand()` copies from | a GitHub repository such as `openwashdata/brand`, or `none` | | `Config/washr/publisher` | the publisher sentence in the footer | a sentence, Markdown allowed, or `none` | -| `Config/washr/home` | the website of the organisation: the navbar link, the line under the README badges, the publisher url in the metadata | a URL, or `none` | +| `Config/washr/home` | the website of the organisation: the navbar link, the publisher sentence under Citation in the README, the publisher url in the metadata | a URL, or `none` | | `Config/washr/catalog` | the data catalogue named in the metadata (`includedInDataCatalog`) | a URL, or `none` | | `Config/washr/community` | the text of the community block in the sidebar | a text, Markdown allowed, or `none` | | `Config/washr/pages-domain` | the domain of the site | only written by hand, when the site is not served from `[org].github.io` | diff --git a/skills/washr/references/readme-sections.md b/skills/washr/references/readme-sections.md index 8c15b3e..d212571 100644 --- a/skills/washr/references/readme-sections.md +++ b/skills/washr/references/readme-sections.md @@ -18,7 +18,7 @@ in the docs checklist | 7 | One block per dataset | both | heading with the dataset name, a sentence on what it contains, the dimensions, a preview of three rows, the variable table from the dictionary | | 8 | Example | person | only with `has_example = TRUE`: what the plot shows, and one plot of the data | | 9 | License | washr | the license of DESCRIPTION with a link to `LICENSE.md` | -| 10 | Citation | washr | the output of `citation("[package]")` | +| 10 | Citation | washr | the publisher sentence with the website of the organisation ("Published by openwashdata, .", since washr 1.2.2), then the output of `citation("[package]")` | ## The introduction From 416271ecafa5995ea3a14f680bae0685fbfc5a0f Mon Sep 17 00:00:00 2001 From: larnsce Date: Sun, 1 Nov 2026 10:22:29 +0100 Subject: [PATCH 4/5] docs: the logo at the README title in the sections table Refs #95 Assisted-by: Claude claude-fable-5-1 Claude-Session: https://claude.ai/code/session_0154SimKL2w6hTuq4FaTKNCK --- skills/washr/references/readme-sections.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/skills/washr/references/readme-sections.md b/skills/washr/references/readme-sections.md index d212571..549ab9d 100644 --- a/skills/washr/references/readme-sections.md +++ b/skills/washr/references/readme-sections.md @@ -9,7 +9,7 @@ in the docs checklist | Order | Section | Who | Content | |---|---|---|---| -| 1 | Title | washr | the package name | +| 1 | Title | washr | the package name, with the small logo of the brand right-aligned and linked to the website once `use_brand()` has installed it (washr 1.2.2) | | 2 | Badges | washr | license, R CMD check, and the DOI once there is one, between the `badges: start` and `badges: end` markers | | 3 | Introduction | person | one paragraph in place of "The goal of [package] is to ..." | | 4 | Installation | washr | the install line for the repository, and the chunk that loads the packages the README uses | From 7ed9516f5d0a65d7b2267e42715cd9ce23b18ce8 Mon Sep 17 00:00:00 2001 From: larnsce Date: Sun, 1 Nov 2026 14:10:32 +0100 Subject: [PATCH 5/5] feat: the dictionary schema item allows named columns after the five washr 1.3.0 keeps the columns a package added to its dictionary and accepts them in its readiness item (openwashdata/washr#151). The check script, the data checklist and the standards file follow; unnamed columns still fail, with a case for them. Refs #95, #39 Assisted-by: Claude claude-fable-5-1 Claude-Session: https://claude.ai/code/session_0154SimKL2w6hTuq4FaTKNCK --- NEWS.md | 1 + docs/checklist-reconciliation.md | 13 +++++++++++++ fixtures/cases/dictionary-schema/expected.txt | 2 +- .../cases/dictionary-unnamed-column/expected.txt | 1 + .../overlay/data-raw/dictionary.csv | 11 +++++++++++ skills/pkgreview-core/check/pkgreview-check.R | 14 +++++++++----- .../pkgreview-core/references/checklists/data.md | 2 +- skills/pkgreview-core/references/standards.md | 7 ++++--- 8 files changed, 41 insertions(+), 10 deletions(-) create mode 100644 fixtures/cases/dictionary-unnamed-column/expected.txt create mode 100644 fixtures/cases/dictionary-unnamed-column/overlay/data-raw/dictionary.csv diff --git a/NEWS.md b/NEWS.md index 196de07..0d53591 100644 --- a/NEWS.md +++ b/NEWS.md @@ -12,6 +12,7 @@ The release that pairs with washr 1.2.1 (openwashdata/washr#145): every package - The floor is 1.2.1 throughout (`WASHR_FLOOR`, both org profiles, the skill preflights, the README table); washr 1.2.1 is a GitHub-only release that the next CRAN submission of washr carries, so the gate and drift workflows install washr from the dev branch on GitHub until CRAN serves the floor, as they did before 1.2.0 (#95). - Fixtures: `pkgreviewtest` carries the three new blocks and records the washr version, so the expected report gains two PASS lines and the 19 FAIL + 1 FLAG mapping to D1 to D17 is unchanged; the cases `footer-missing` and `footer-stale` cover the failing lines (#95). - `/washr`: the pkgdown site reference describes the new blocks, the four fields and `update_website()` (#95). +- Check script and data checklist: the dictionary schema item accepts named columns after the five washr columns, as `washr::update_dictionary()` keeps them (openwashdata/washr#151, reconciliation row under v1.8.0); a new case covers an unnamed trailing column. # pkgreview 1.7.0 diff --git a/docs/checklist-reconciliation.md b/docs/checklist-reconciliation.md index 4facee2..2e1112b 100644 --- a/docs/checklist-reconciliation.md +++ b/docs/checklist-reconciliation.md @@ -550,3 +550,16 @@ profile, and the deprecated `--analytics` path, so the D1 to D17 mapping `fixtures/make_history_fixture.sh` writes an empty `NAMESPACE` next to DESCRIPTION, which changes no line. The gate workflow installs washr from CRAN before it runs the script. + +## Dictionary schema: named columns after the five (openwashdata/washr#151, v1.8.0) + +Date: 2026-11-01. washr 1.3.0 brings older dictionary layouts to the five +washr columns and keeps every further named column a package added, such +as `unit` or `allowed_values` (#39); its readiness item `dictionary_schema` +accepts those columns after the five. The check script and the data +checklist follow, so a package with such columns is not flagged for them. +The report line keeps its text. + +| Item | Decision | Before | After | +|------|----------|--------|-------| +| data.md: dictionary schema | reword | exactly the five washr columns in order | the five washr columns first, in order, further named columns allowed after them; unnamed columns still fail | diff --git a/fixtures/cases/dictionary-schema/expected.txt b/fixtures/cases/dictionary-schema/expected.txt index 42fcb4c..337c4f2 100644 --- a/fixtures/cases/dictionary-schema/expected.txt +++ b/fixtures/cases/dictionary-schema/expected.txt @@ -1 +1 @@ -- [FAIL] (advisory) Dictionary schema: five washr columns, UTF-8 without BOM, single-class variable_type: UTF-8 byte order mark at the start of the file; columns are [directory, file_name, variable_name, variable_type, description, extra], expected [directory, file_name, variable_name, variable_type, description]; variable_type is not a single class name for: id +- [FAIL] (advisory) Dictionary schema: five washr columns, UTF-8 without BOM, single-class variable_type: UTF-8 byte order mark at the start of the file; variable_type is not a single class name for: id diff --git a/fixtures/cases/dictionary-unnamed-column/expected.txt b/fixtures/cases/dictionary-unnamed-column/expected.txt new file mode 100644 index 0000000..0ee868c --- /dev/null +++ b/fixtures/cases/dictionary-unnamed-column/expected.txt @@ -0,0 +1 @@ +- [FAIL] (advisory) Dictionary schema: five washr columns, UTF-8 without BOM, single-class variable_type: unnamed columns after the five washr columns diff --git a/fixtures/cases/dictionary-unnamed-column/overlay/data-raw/dictionary.csv b/fixtures/cases/dictionary-unnamed-column/overlay/data-raw/dictionary.csv new file mode 100644 index 0000000..9a446c1 --- /dev/null +++ b/fixtures/cases/dictionary-unnamed-column/overlay/data-raw/dictionary.csv @@ -0,0 +1,11 @@ +directory,file_name,variable_name,variable_type,description, +data,pkgreviewtest.rda,id,character,Water point identifier, +data,pkgreviewtest.rda,region,character,Region where the water point is located, +data,pkgreviewtest.rda,waterSource,character,Type of water source, +data,pkgreviewtest.rda,status,character,, +data,pkgreviewtest.rda,installation_date,character,Date the water point was installed, +data,pkgreviewtest.rda,users_count,integer,TODO, +data,pkgreviewtest.rda,owner_phone,character,Phone number of the water point owner, +data,pkgreviewtest.rda,women_users,integer,Number of women among the water point users, +data,pkgreviewtest.rda,latitude,numeric,Latitude of the water point in decimal degrees, +data,pkgreviewtest.rda,longitude,numeric,Longitude of the water point in decimal degrees, diff --git a/skills/pkgreview-core/check/pkgreview-check.R b/skills/pkgreview-core/check/pkgreview-check.R index e64ae20..fca89f7 100644 --- a/skills/pkgreview-core/check/pkgreview-check.R +++ b/skills/pkgreview-core/check/pkgreview-check.R @@ -374,9 +374,11 @@ if (!file.exists(dict_path)) { "Dictionary descriptions present (no empty or placeholder)", if (any(bad)) paste("defective:", paste(dict$variable_name[bad], collapse = ", ")) else "") - # Dictionary schema (advisory): the five washr columns in order, UTF-8 - # without a BOM, one class name per variable_type value. These are the - # pathologies the org catalog parser found across pre-standard packages. + # Dictionary schema (advisory): the five washr columns first, in order, + # further named columns allowed (washr::update_dictionary() keeps them, + # openwashdata/washr#151), UTF-8 without a BOM, one class name per + # variable_type value. These are the pathologies the org catalog parser + # found across pre-standard packages. DICT_COLS <- c("directory", "file_name", "variable_name", "variable_type", "description") head_bytes <- readBin(dict_path, "raw", n = 3L) has_bom <- length(head_bytes) == 3L && identical(as.integer(head_bytes), c(0xEFL, 0xBBL, 0xBFL)) @@ -390,8 +392,10 @@ if (!file.exists(dict_path)) { schema_problems <- c( if (has_bom) "UTF-8 byte order mark at the start of the file", if (bad_utf8) "non-UTF-8 bytes in the file", - if (!identical(cols, DICT_COLS)) - sprintf("columns are [%s], expected [%s]", paste(cols, collapse = ", "), paste(DICT_COLS, collapse = ", ")), + if (!identical(cols[seq_along(DICT_COLS)], DICT_COLS)) + sprintf("columns are [%s], expected [%s] first", paste(cols, collapse = ", "), paste(DICT_COLS, collapse = ", ")), + if (length(cols) > length(DICT_COLS) && any(!nzchar(trimws(cols[-seq_along(DICT_COLS)])))) + "unnamed columns after the five washr columns", if (any(type_bad)) sprintf("variable_type is not a single class name for: %s", paste(unique(dict$variable_name[type_bad]), collapse = ", "))) diff --git a/skills/pkgreview-core/references/checklists/data.md b/skills/pkgreview-core/references/checklists/data.md index b9b78ae..9a9a893 100644 --- a/skills/pkgreview-core/references/checklists/data.md +++ b/skills/pkgreview-core/references/checklists/data.md @@ -25,7 +25,7 @@ block publication. ### Dictionary -- [ ] `data-raw/dictionary.csv` has exactly the five washr columns in order (`directory`, `file_name`, `variable_name`, `variable_type`, `description`), is UTF-8 without a byte order mark, and `variable_type` holds one class name per row (for example `Date`, not `c("POSIXct", "POSIXt")`); the organization catalog and `washr::update_metadata()` parse it with that schema +- [ ] `data-raw/dictionary.csv` has the five washr columns first, in order (`directory`, `file_name`, `variable_name`, `variable_type`, `description`), further named columns such as `unit` allowed after them, is UTF-8 without a byte order mark, and `variable_type` holds one class name per row (for example `Date`, not `c("POSIXct", "POSIXt")`); the organization catalog and `washr::update_metadata()` parse it with that schema ### Data quality diff --git a/skills/pkgreview-core/references/standards.md b/skills/pkgreview-core/references/standards.md index 9087838..18468bd 100644 --- a/skills/pkgreview-core/references/standards.md +++ b/skills/pkgreview-core/references/standards.md @@ -47,10 +47,11 @@ as optional follow-ups, and never let them block publication. - `data-raw/dictionary.csv` covers every variable in every dataset, each with a one-sentence plain-language description. The description is the most important field; it is written or confirmed by a human, never - invented by an agent. The file keeps the five washr columns + invented by an agent. The file keeps the five washr columns first (`directory`, `file_name`, `variable_name`, `variable_type`, - `description`), UTF-8 without a byte order mark, one class name per - `variable_type` value; the organization catalog parses it that way. + `description`), further named columns such as `unit` after them, UTF-8 + without a byte order mark, one class name per `variable_type` value; + the organization catalog parses it that way. - Vignettes live in `vignettes/articles/`, never directly in `vignettes/`. This keeps pkgdown rendering correct and avoids CRAN issues. - `_pkgdown.yml` follows the standard configuration below, including