This page is for CARWatch package contributors and maintainers. It is not needed to analyse a study or run the user tutorials. For those, see CARWatch tutorials.
Run these commands from the package root after changing package code:
The following command renders all end-to-end and gallery examples in temporary directories. It is a development and CI check, not a normal user workflow:
Interactive examples use launch = FALSE during
rendering. The script checks that each Shiny app can be constructed
without starting a server.
The README plot images are generated from a deterministic synthetic study:
The script loads the current package source and replaces the four PNG
files in docs/images/. Inspect the generated figures before
committing them.
CARWatch is validated against carwatch-python 1.0.0
during development. Regenerate checked-in fixtures from the adjacent
Python checkout when a supported semantic contract changes:
cd ../carwatch-python
uv run python ../carwatch-r/tools/generate_python_fixtures.py
uv run python ../carwatch-r/tools/check_python_test_inventory.py ../carwatch-r/testsThe inventory gate maps the reference tests to R contract suites.
CI checks R 4.3 and the current R release on Linux, macOS, and Windows. It runs package checks, tests, coverage, fixture validation, pkgdown, and Shiny smoke tests.
The Release GitHub Actions workflow separates CRAN
preparation from the public GitHub release.
Before submitting a version:
DESCRIPTION and
CITATION.cff.NEWS.md with
# carwatch <version> and update
cran-comments.md.main and wait for the normal
package checks.carwatch-source-package as a
downloadable source archive..tar.gz archive to win-builder and
CRAN manually, or use the command-line submission below. CRAN still
requires the maintainer to confirm the submission by email.The command-line route uses devtools after the local and
GitHub checks have passed. Start an interactive R session from the
package root:
Submit the current package source to win-builder’s R-devel environment:
Wait for the result sent to the maintainer email in
DESCRIPTION. After that check passes, submit the package to
CRAN from the same unchanged checkout:
submit_cran() builds a fresh source archive, reads the
maintainer details from DESCRIPTION and the submission text
from cran-comments.md, and uploads both through CRAN’s
submission form. It does not run the release checks and it does not
upload the archive produced by GitHub Actions. The function requires an
interactive R session; it cannot be run with
Rscript -e.
After a successful upload, confirm the email from CRAN.
submit_cran() also creates a temporary
CRAN-SUBMISSION file recording the submitted version,
commit, and time. Leave this file uncommitted until CRAN accepts the
release. Do not use devtools::release(); it is
deprecated.
After CRAN accepts the version, create and push its tag:
Replace 1.0.1 with the version in
DESCRIPTION. A tag must be exactly
v<version>. Pushing it reruns the release checks,
builds the source archive, creates the GitHub Release, and attaches the
archive. If any check fails, no GitHub Release is published.
CRAN submission itself is intentionally not performed by the workflow. It is a reviewed submission with an email-confirmation step, whereas the GitHub release can be reproduced safely from the accepted tag.