Thank you for helping to improve scMaSigPro. This guide explains how to report a problem and how to propose a change.
Reporting a problem
Bug reports, questions and suggestions go to the issue tracker of BioBam/scMaSigPro. For a bug, include a small example that reproduces it (the bundled splat.sim data set is often enough), the full error message and the output of sessionInfo().
Proposing a change
The package is developed in spriyansh/scMaSigPro, where the checks run; BioBam/scMaSigPro receives its main branch at each release.
- Fork spriyansh/scMaSigPro and create a branch from
main. - Make one change per pull request, with its tests, its documentation and a NEWS bullet.
- Open the pull request against
mainof spriyansh/scMaSigPro and say what changes and why, and whether any result changes. - The maintainer reviews it and merges it as one squashed commit.
For a larger change, open an issue first, so that the approach is agreed before the code is written.
Checks
Every pull request to main runs these GitHub Actions workflows:
-
R-CMD-check.yaml:R CMD check --as-cran, with the tests and the vignettes, on macOS, Windows and Ubuntu with the released R and on Ubuntu with R-devel. It must pass. -
test-coverage.yaml: the tests under covr, with the coverage in the log. It must pass. For branches of spriyansh/scMaSigPro it uploads the coverage to Codecov, which reports the coverage of the package (target 80 %) and of the lines that the pull request changes (target 85 %); pull requests from forks get no upload. -
pkgdown.yaml: builds the website. It must pass. -
r-universe.yml: builds the package as R-universe does and runs BiocCheck. -
lint.yaml: lintr with the settings of.lintr. It is advisory: it lists lints without failing.
Before you open the pull request, run in the package directory:
devtools::document() # man/ and NAMESPACE; commit what changes
styler::style_pkg(indent_by = 4)
lintr::lint_package()
devtools::test()
spelling::spell_check_package()
devtools::check()Style
- R code follows the Bioconductor style: styler with 4-space indentation and lines of at most 80 characters, as
.lintrsets. Pipeline steps are namedsc.<verb>(), accessors and plots in camelCase and other functions in snake_case. - Documentation is written with roxygen2 in Markdown.
man/andNAMESPACEare generated bydevtools::document(); never edit them by hand. - Documentation, messages and NEWS are in British English. A correct word that
spelling::spell_check_package()does not know goes intoinst/WORDLIST. -
NEWS.mdgets one short bullet per change, under the heading of the next version, saying what the code does now. - The Bioconductor package guidelines apply, since the package is prepared for Bioconductor.
Tests
The tests use testthat (edition 3). devtools::test() runs them all and devtools::test(filter = "show") runs one file. Outside devtools, set NOT_CRAN=true so that the snapshot tests run.
test-reproduce-masigpro.R and test-equivalence-masigpro.R compare scMaSigPro with maSigPro: with family = gaussian(), link = "identity" and offset = FALSE the results must be identical. They are skipped when maSigPro is not installed, so install it before you change the fitting code:
BiocManager::install("maSigPro")
devtools::test(filter = "masigpro")tests/testthat/fixtures/golden-v0.0.4.rds holds the results of a fixed set of analyses. A change that alters results on purpose regenerates it with tests/testthat/fixtures/make-golden.R and says in the pull request which results moved; never edit the file by hand.
Code from other packages
scMaSigPro implements the maSigPro method from its publication (Conesa et al. 2006, Bioinformatics 22:1096), not from maSigPro’s source code. Do not copy or adapt code from maSigPro: write it from the published method and compare with maSigPro by its results only, as the tests above do. The same applies to code from any other package; cite the method you implement.
Code of conduct
Everyone taking part in this project follows the code of conduct.
By contributing, you agree that your contribution is distributed under the licence of the package, the GNU General Public License, version 2 or later.
