Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
7a11bb2
feat(update_citation): cite the source article
larnsce Sep 28, 2026
d138b21
Merge branch 'feat/cff-source-article' into dev
larnsce Sep 28, 2026
8fb8fbf
chore: increment version number to 1.1.1.9000
larnsce Oct 1, 2026
09e4543
feat: move messages to cli and return written paths
larnsce Oct 1, 2026
eb875c0
Merge branch 'feat/cli-messaging' into dev
larnsce Oct 1, 2026
07ede88
fix(use_brand): build ignore the brand file and logos
larnsce Oct 1, 2026
4aca68a
docs: name the R-universe install option
larnsce Oct 1, 2026
067922b
Merge branch 'fix/brand-buildignore' into dev
larnsce Oct 1, 2026
fb2e266
feat: write .zenodo.json from DESCRIPTION
larnsce Oct 1, 2026
f5a1d6d
feat: add update_dictionary()
larnsce Oct 1, 2026
c44ce24
fix(use_brand): wire _pkgdown.yml as a text edit
larnsce Oct 1, 2026
0186d05
ci: scaffold a fixture package and run the pkgreview check
larnsce Oct 1, 2026
08426e3
Merge branch 'ci/scaffold-check' into dev
larnsce Oct 1, 2026
71bb54c
Merge branch 'feat/update-dictionary' into dev
larnsce Oct 1, 2026
f8d96f9
Merge branch 'feat/zenodo-json' into dev
larnsce Oct 1, 2026
1cfb4d5
docs: list update_dictionary and update_zenodo_json
larnsce Oct 1, 2026
1571d0e
feat: add check_publication_readiness()
larnsce Oct 1, 2026
3b15987
Merge branch 'feat/readiness-gate' into dev
larnsce Oct 1, 2026
6dca5f1
feat(readiness): check .zenodo.json and wire the gate in
larnsce Oct 1, 2026
1d3b2e6
ci: install the packages the README template loads
larnsce Oct 1, 2026
c56ff39
feat: read organisation values from DESCRIPTION
larnsce Oct 1, 2026
e66e2d5
Merge branch 'feat/config-fields' into dev
larnsce Oct 1, 2026
9c3f86a
test: compare the dictionary bytes without the CR of Windows
larnsce Oct 1, 2026
e65f93e
fix: close the findings of the release candidate review
larnsce Oct 1, 2026
d1d6798
Merge branch 'fix/review-findings' into dev
larnsce Oct 1, 2026
59fe1d5
chore(release): washr 1.2.0
larnsce Oct 1, 2026
dc7c1de
Merge branch 'release/1.2.0' into dev
larnsce Oct 1, 2026
b9a3c83
ci: raise the pkgreview floor to v1.6.1
larnsce Oct 1, 2026
d2dd3b8
feat(readme): plain text citation and versioned download links for ll…
larnsce Oct 18, 2026
bcd213b
Merge branch 'feat/llms-readme' into dev
larnsce Oct 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@
^CRAN-SUBMISSION$
^dev$

^PKGREVIEW_FLOOR$
65 changes: 65 additions & 0 deletions .github/workflows/scaffold-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Scaffold check (#129). Builds a fixture data package with washr in the order
# the vignette documents, runs every re-runnable step a second time, and runs
# the pkgreview check script on the result. A change in washr that drops a
# required item of the review standard turns this workflow red. The pkgreview
# version comes from the PKGREVIEW_FLOOR file; raise it when pkgreview
# releases.
on:
push:
branches: [main, dev]
pull_request:
branches: [main, dev]
schedule:
- cron: '0 6 * * 1'
workflow_dispatch:

name: scaffold-check

permissions: read-all

jobs:
scaffold-check:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
# fs to openxlsx: the processing script template. dplyr to
# kableExtra: the README template.
extra-packages: >
any::fs, any::here, any::readr, any::readxl, any::openxlsx,
any::dplyr, any::stringr, any::gt, any::kableExtra,
local::.

- name: Fetch the pkgreview check script at the recorded floor
run: |
ref="$(cat PKGREVIEW_FLOOR)"
mkdir -p "$RUNNER_TEMP/pkgreview"
curl -fsSL "https://github.com/openwashdata/pkgreview/archive/refs/tags/${ref}.tar.gz" \
| tar -xz --strip-components=1 -C "$RUNNER_TEMP/pkgreview"
echo "pkgreview ${ref}"

- name: Scaffold the fixture and run every step twice
run: Rscript dev/scaffold-check/scaffold.R "$RUNNER_TEMP/scaffoldcheck"

- name: Run the pkgreview check script
run: |
set -o pipefail
Rscript "$RUNNER_TEMP/pkgreview/skills/pkgreview-core/check/pkgreview-check.R" \
"$RUNNER_TEMP/scaffoldcheck" --org=openwashdata | tee "$RUNNER_TEMP/report.md"

- name: Add the report to the job summary
if: always()
run: |
if [ -f "$RUNNER_TEMP/report.md" ]; then cat "$RUNNER_TEMP/report.md" >> "$GITHUB_STEP_SUMMARY"; fi
5 changes: 3 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: washr
Title: Publication Toolkit for Water, Sanitation and Hygiene (WASH) Data
Version: 1.1.1
Date: 2026-09-09
Version: 1.2.0
Date: 2026-10-01
Authors@R: c(
person("Mian", "Zhong", , "mzhong@ethz.ch", role = "aut",
comment = c(ORCID = "0009-0009-4546-7214")),
Expand All @@ -21,6 +21,7 @@ URL: https://openwashdata.github.io/washr/
BugReports: https://github.com/openwashdata/washr/issues
Imports:
cffr (>= 1.0.1),
cli (>= 3.6.0),
desc (>= 1.4.3),
jsonlite,
pkgdown (>= 2.0.7),
Expand Down
6 changes: 6 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Generated by roxygen2: do not edit by hand

S3method("[",washr_readiness)
S3method(format,washr_readiness)
S3method(print,washr_readiness)
export(check_publication_readiness)
export(setup_ci)
export(setup_dictionary)
export(setup_rawdata)
Expand All @@ -8,7 +12,9 @@ export(setup_roxygen)
export(setup_website)
export(update_citation)
export(update_description)
export(update_dictionary)
export(update_metadata)
export(update_zenodo_json)
export(use_brand)
importFrom(lifecycle,deprecated)
importFrom(utils,head)
153 changes: 153 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,156 @@
# washr 1.2.0

The release that makes washr the engine of a guided workflow. Every
function now reports through cli and returns what it wrote, a readiness
report says what a package still lacks before publication, and the values
that were fixed to openwashdata live in DESCRIPTION, so another group can
publish with its own. Three exports are new: `check_publication_readiness()`,
`update_dictionary()` and `update_zenodo_json()`. This release also brings
the changes of 1.1.1 to CRAN, which was released on GitHub only.

## New

- `check_publication_readiness()` reads the package and reports, item by
item, whether it is ready for publication: metadata, data dictionary,
documentation and the check workflow. Each gap names the step and the
washr function that closes it. The result is a data frame with one row
per item (`id`, `area`, `check`, `status`, `detail`, `fix`), so review
tools such as pkgreview can consume it. Nothing is written to the package
(#82).

- `update_dictionary()` brings `data-raw/dictionary.csv` in line with the
data after it changed. It adds a row for each new variable, removes the
row of a variable that no longer exists, refreshes the types, and keeps
every description and every column you added yourself, such as `unit` or
`allowed_values`. A file whose content is current is left untouched. The
"already exists" error of `setup_dictionary()` now points to it (#13).

- `update_zenodo_json()` writes `.zenodo.json` from DESCRIPTION, and
`update_citation()` calls it. Zenodo reads the file when it archives a
GitHub release, so a data package is filed as a Dataset in the
openwashdata community, with its creators, ORCID iDs, license and
keywords, without edits by hand. Set `Config/washr/zenodo-community` in
DESCRIPTION for another community (#56).

- `update_citation()` cites the source article of a package that republishes
data from a publication. List the article DOI in DESCRIPTION as
`X-schema.org-isBasedOn`, and separate several DOIs with commas. Each DOI
is looked up at doi.org and written as a `references` entry in
CITATION.cff, with a message that asks users to cite both the data package
and the article. `inst/CITATION` holds both entries under the same header,
so `citation()` prints both. The package stays the work that GitHub's
"Cite this repository" shows. A DOI that cannot be looked up keeps its
entry from the existing CITATION.cff, so a run without a network
connection changes nothing. References that do not come from the field
are dropped, because DESCRIPTION is their canonical source. Before, the
function had no way to keep such a reference, and a hand-written second
entry in `inst/CITATION` was lost on the second run (#134).

- `update_metadata()` writes the same DOIs as schema.org `isBasedOn` in the
JSON-LD (#134).

- `options(washr.quiet = TRUE)` silences the messages of washr and of the
usethis helpers it calls, for use in scripts. Warnings and errors are
never silenced (#84).

- The README of `setup_readme()` says in plain text which version to cite
with which DOI, links the authors page of the site and `CITATION.cff`,
and names the source article of republished data. Its download links
point at the release tag of the version in DESCRIPTION, so a citation of
a version leads to the same files later; a development version links the
main branch. pkgdown 2.2.0 builds the `llms.txt` of a site from the
README, so AI tools now read the same. `check_publication_readiness()`
gains two items: `readme_citation` (README.md names the DOI of
CITATION.cff) and `pkgdown_llm_docs` (`_pkgdown.yml` keeps the
`llms.txt` of the site) (#137).

## Changed

- washr reads the facts of a package from DESCRIPTION, so a group other
than openwashdata publishes with its own values by editing that file.
The organisation and the repository come from `URL`, the license from
`License`. The values with no standard field are `Config/washr/` fields
that `update_description()` writes once and never overwrites: `funding`,
`analytics-domain`, `doi-provider`, `zenodo-community` and
`brand-source`, plus `pages-domain` for a site that is not served from
`<organisation>.github.io`. A field set to `none` switches its feature
off. The README template, the `_pkgdown.yml` template, the DOI badge,
`.zenodo.json`, `use_brand()` and `check_publication_readiness()` read
them. For an openwashdata package the output is unchanged (#81).

- `update_description()` takes the GitHub organisation from the repository
already listed in `URL` when `github_user` is not given, and no longer
adds a second repository under openwashdata. It records the washr
version that ran in `Config/washr/version`. For a package under another
organisation it writes the funding, analytics, community and brand
fields as `none` and lists them (#81).

- `use_brand()` installs the brand at the latest release tag of the brand
repository and records the tag in DESCRIPTION as `Config/washr/brand`.
Before, it copied from the main branch, which can carry changes no
release describes. A second run with no new tag changes no file, and a
run after a brand release reports the old and the new tag. Pass
`ref = "main"` to try unreleased brand changes (#128).

- Messages now go through cli in every function, with three kinds of lines:
a success line for a file that was written, an info line for something
that was kept or skipped, and an arrow line for the next step that is left
to the user. Errors name the function that was called and carry a hint on
how to fix the cause. washr no longer calls the `usethis::ui_*()`
functions, which usethis has superseded (#84).

- Every function returns what it wrote, invisibly, and the documentation
says so. `setup_rawdata()`, `setup_dictionary()`, `setup_readme()`,
`setup_website()` and `update_description()` return the path of their
file, `setup_roxygen()` and `update_citation()` return the paths of
theirs. Before, most of them returned `NULL` or an internal object (#84).

## Fixed

- Every function acts on the package in the working directory. Before,
the usethis helpers wrote into the package of an earlier call when only
the working directory had changed since, so files of one package could
land in another within the same R session.

- The repository in `URL` is recognised in every common form: with a
trailing slash, a `.git` suffix, a fragment or a `www.` prefix. Before,
such a URL gave a wrong bug report link or a second repository entry.

- `setup_readme(force = TRUE)` removes the existing `README.Rmd` only once
it can write the new one. Before, it deleted the file and then stopped
when `data/` held no data object.

- `use_brand()` adds `_brand.yml` and the logo directory to `.Rbuildignore`.
Before, `R CMD check` reported both as non-standard top-level files after
the brand was installed (#133).

- `use_brand()` wires `_pkgdown.yml` to the brand by adding its lines to
the file. Comments and long values stay as they were written. Before, the
file was rewritten through the yaml package, which dropped the comments
and folded the funding text over two lines, so the review standard no
longer found it. The rewrite remains as the fallback for a `template`
block that already carries bslib settings (#129).

## Dependencies

- cli is a new import. washr uses it for every message and no longer calls
the `usethis::ui_*()` functions, which usethis has superseded (#84).

## Documentation and tests

- The vignette explains packages with more than one dataset, and how a
group outside openwashdata sets its own values (#81, #103).

- The README and the vignette name the openwashdata R-universe as a third
way to install washr, next to CRAN and GitHub, and say what each source
gives you (#131).

- A new workflow, `scaffold-check`, builds a fixture data package with every
washr step on each push, runs the steps a second time to confirm that no
file changes, and runs the pkgreview check script on the result. The
pkgreview version it checks against is recorded in `PKGREVIEW_FLOOR`
(#129).

# washr 1.1.1

A patch release with three fixes. The first two stopped a scaffolded package
Expand Down
1 change: 1 addition & 0 deletions PKGREVIEW_FLOOR
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v1.6.1
Loading
Loading