Skip to content

Add package scaffolding and CI - #8

Merged
nickreich merged 1 commit into
mainfrom
nr/scaffolding/1
Sep 2, 2026
Merged

nickreich merged 1 commit into
mainfrom
nr/scaffolding/1

Conversation

@nickreich

Copy link
Copy Markdown
Member

Supersedes #6, which GitHub locked closed after a force-push to an unrelated history. Same branch, same content.

Sets up an empty but checkable package, so the CI pipeline is validated before
any code depends on it.

This is the first of a stack of six PRs porting
alloscore to a hubverse-native
alloscore2. Each layer is self-contained and passes R CMD check on its own;
Imports grows only as code actually uses each package, so there are no
"declared but unused" NOTEs along the way.

Contents

DESCRIPTION, NAMESPACE, NEWS.md, LICENSE.md, five GitHub Actions
workflows with SHA-pinned actions, .lintr, air.toml, codecov.yml,
_pkgdown.yml, .Rbuildignore and the .github community files, all adapted
from hubEvals. The only R file is the package doc.

What this is meant to prove

  • the check matrix runs on all five platforms
  • lintr::lint_package() and air format . --check gate as intended
  • the pkgdown site builds, and hubStyle installs via Config/Needs/website
  • Codecov reporting is wired up

Heavier dependency resolution (arrow, hubUtils, hubExamples from
r-universe) is first exercised in PRs 2 and 3.

Three deliberate deviations from the hubEvals template

  • Licence is GPL (>= 3), not MIT. alloscore2 is a derivative work of
    aaronger/alloscore, which is GPL-3, so the licence cannot be changed without
    the original author's consent. Aaron Gerding is recorded in DESCRIPTION as
    aut, cph.
  • Docs publish to GitHub Pages, not Netlify. reichlab repositories do not
    use Netlify, so the inherited pkgdown-netlify-preview.yaml is replaced with
    the standard r-lib pkgdown.yaml, matching reichlab/distfromq. It still
    builds the site on every PR and deploys to gh-pages on push to main.
    Actions stay SHA-pinned, which distfromq's copy does not do.
  • .lintr relaxes two linters. The allocation literature's notation is part
    of this package's public API — F is a predictive cdf, Q a quantile
    function, K a budget, O and U over- and under-prediction costs, Lambda
    a marginal expected benefit — and eps_K and qs_OK are documented argument
    and column names inherited from the original package. object_name_linter and
    T_and_F_symbol_linter flag all of those, so both are relaxed rather than
    renaming public API. indentation_linter is disabled because it disagrees
    with Air, which owns formatting here. The reasoning is in a comment at the top
    of the file.

Verified locally

R CMD check: Status: OK. lintr::lint_package(): 0 lints.
air format . --check: clean.

Sets up an empty but checkable package so that the CI pipeline itself is
validated before any code depends on it.

Contents: `DESCRIPTION`, `NAMESPACE`, licence, `NEWS.md`, the five hubverse
workflows with SHA-pinned actions, `.lintr`, `air.toml`, `codecov.yml`,
`_pkgdown.yml` and the `.github` community files, all adapted from `hubEvals`.

What this proves: the check matrix runs on all five platforms, `lintr` and
`air format --check` gate as intended, and the pkgdown Netlify preview builds.
Heavier dependency resolution (`arrow`, `hubUtils`, `hubExamples` from
r-universe) first gets exercised in the following PRs, as each adds only the
`Imports` it actually uses.

Two deliberate deviations from the hubEvals template it is adapted from: the
licence is GPL-3 rather than MIT, because this package is a derivative work of
`aaronger/alloscore`; and docs publish to GitHub Pages via the standard r-lib
`pkgdown.yaml`, matching reichlab/distfromq, rather than through hubEvals'
Netlify PR-preview workflow, which reichlab does not use.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@nickreich
nickreich merged commit 1353a4b into main Sep 2, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant