Skip to content

Prepare package for CRAN submission and open-source CI/CD - #1

Open
AleKoure wants to merge 12 commits into
mainfrom
cran-readiness
Open

Prepare package for CRAN submission and open-source CI/CD#1
AleKoure wants to merge 12 commits into
mainfrom
cran-readiness

Conversation

@AleKoure

@AleKoure AleKoure commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

Prepares bslibdash for CRAN submission and adds standard open-source
CI/CD tooling.

Changes

  1. Fix LICENSE to CRAN's required short MIT template
  2. Remove dead vendored assets (~700KB unused tests/lib/**) and a stray runtime log.sqlite
  3. Add DESCRIPTION metadata (URL/BugReports/testthat edition), align Language to en-GB
  4. Refactor sidebar_bslib.R to remove <<- (lintr compliance)
  5. Fix remaining lintr findings in tests/testthat; scope .lintr to package-shipped code
  6. Add GitHub Actions: R-CMD-check (macOS/Windows/Ubuntu, release/devel/oldrel), lintr, covr
  7. Add pkgdown site (reference index + deploy workflow) and README badge
  8. Add cran-comments.md for the CRAN submission

Validation

  • R CMD check --as-cran: 0 errors, 0 warnings, 0 notes
  • Full testthat suite: all passing
  • lintr::lint_package(): 0 lints
  • spelling::spell_check_package(): no errors

AleKoure and others added 11 commits August 21, 2026 16:09
CRAN requires the file referenced by 'License: MIT + file LICENSE' to
be the short 2-line YEAR/COPYRIGHT HOLDER template, with the full
license text living in LICENSE.md instead. The previous LICENSE also
had a copyright holder inconsistent with LICENSE.md and DESCRIPTION's
cph entry (Novartis Pharma AG).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- tests/lib/** (~700KB of vendored jquery/bootstrap3/datatables/
  crosstalk/highlight.js) is not referenced by any test in the suite
  and should not ship as part of the package sources.
- inst/shiny/examples/10_bslib_dashboard_page/.log/log.sqlite is a
  runtime log database produced by running the example app; it should
  never have been committed (the directory is already covered by
  .Rbuildignore, but was still tracked in git).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add URL and BugReports fields pointing at the GitHub repo/issues.
- Add Config/testthat/edition: 3, and bump the testthat Suggests
  requirement to >= 3.0.0 to match.
- Correct Language from en-US to en-GB: the roxygen/vignette prose
  consistently uses British spelling (colour, behaviour, customise,
  etc.), so the DESCRIPTION field was inconsistent with the actual
  content.
- Expand inst/WORDLIST with legitimate proper nouns, package names and
  technical terms so spelling::spell_check_package() is clean.
- man/bslibdash-package.Rd is regenerated by roxygen2 to include the
  new URL/BugReports links in its 'Useful links' section.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace the flush_nav() closure that mutated result/nav_buf via <<-
with an inline loop that reassigns local variables directly. Same
behaviour, verified against the full test-dashboard_sidebar.R suite
(63 passing tests), but avoids the superassignment operator flagged by
lintr's assignment_linter.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Strip trailing whitespace, switch to double quotes, fix hanging
  indentation, and shorten an over-long test_that() label across
  tests/testthat/*.R.
- Collapse a multi-line \$-chain in test-dashboard_sidebar.R to a
  single line to sidestep an indentation_linter ambiguity around
  continued dollar-chains.
- Exclude inst/shiny/examples, tests/manual and vignettes from .lintr:
  these are demo/manual-only content, not checked by R CMD check, and
  don't warrant the same strict style enforcement as R/ and
  tests/testthat/.

After this commit, lintr::lint_package() returns zero lints.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Standard r-lib/actions workflows (v2):
- R-CMD-check.yaml: runs R CMD check --as-cran on macOS-latest (release),
  windows-latest (release), and ubuntu-latest (devel/release/oldrel-1),
  on every push to main and every pull request.
- lint.yaml: runs lintr::lint_package() with LINTR_ERROR_ON_LINT=true
  using the project's .lintr config.
- test-coverage.yaml: runs covr::package_coverage() and uploads a
  cobertura report to Codecov.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- _pkgdown.yml defines a curated reference index (Page layout, Sidebar
  navigation, Body content, Cards and boxes, KPI tiles, Header widgets,
  Feedback and inputs, Theming, Package) covering all 33 documented
  .Rd topics — verified via tools::parse_Rd() that every topic's
  aliases are represented.
- pkgdown.yaml (r-lib/actions) builds and deploys the site to the
  gh-pages branch on push to main and on release.
- _pkgdown.yml is added to .Rbuildignore (not part of the built
  package).
- README gains an R-CMD-check badge alongside the existing lifecycle
  and license badges.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Documents test environments (local Windows R 4.5.2, GitHub Actions
matrix, win-builder to be run before final submission) and confirms
R CMD check --as-cran results: 0 errors, 0 warnings, 0 notes. No
reverse dependencies exist since this is a new package.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Collapse the multi-line htmltools::tagQuery() chain into a single
line to satisfy lintr's indentation_linter, which was flagging
inconsistent continuation indentation on the chained \()/\()
calls.
Align LICENSE, LICENSE.md, and the DESCRIPTION cph entry with the
copyright holder GitHub used when the repository was initialized,
rather than the previously (incorrectly) substituted 'Novartis Pharma AG'.
Tighten the tone and structure to match tidyverse-style READMEs: add
an Installation section, a concise Features list, and a 'Getting
help' section. Replace vignette() calls with links to the pkgdown
site (articles + reference index) now that the site is the canonical
place to read documentation, instead of pointing at in-package
vignettes.
@AleKoure AleKoure self-assigned this Aug 21, 2026
bslibdash already powers a number of internal dashboards; the API is
mostly settled, so 'experimental' undersold its actual maturity.
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