Testing and CI#

This page is for contributors who want to validate changes to cellucid-r.

Running tests locally#

From within the cellucid-r/ directory, you can run tests with testthat.

Option B: R CMD check (closer to CRAN/Bioc behavior)#

From a shell:

R CMD check cellucid-r

What the tests cover (high level)#

The existing tests validate:

  • core files are written (dataset_identity.json, manifests, points)

  • embedding normalization matches the Python implementation

  • categorical codes and generated nullable outlier quantiles use their exact reserved markers, while gene and continuous-observation inputs are finite-only

  • connectivity export writes edge pairs and chooses the right dtype

  • vector fields are exported and scaled correctly

Optional dependencies in tests#

Some features/tests require Matrix. Tests typically skip gracefully if it’s missing.

CI#

The checked-in R-CMD-check.yaml workflow runs R CMD check on current macOS, Windows, Ubuntu R-devel, Ubuntu R-release, and Ubuntu oldrel-1. Its dependency setup installs the package requirements, including Matrix, before the check.

See the publishing guide for workflow expectations:

  • cellucid-r/publishing.md