Contributing#
This is a personal helpers package. Keep the public surface small: cf.io, cf.data, cf.pl, cf.stats, cf.ext.
Scanpy’s developer documentation covers git, tests, and docstrings. The notes below are cellfish-specific.
Install#
cd cellfish
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev,plot,doc]"
Tests:
pytest
Adding an algorithm#
Create
src/cellfish/ext/<tool>/__init__.pyplus one implementation file.Keep compute and plotting together; reuse
cf.plfor fonts, palettes, and grids.Put optional dependencies in
pyproject.tomlextras and import them inside functions.Add a smoke test with a tiny simulated object.
Do not add
plot/_<tool>.py, and do not change layer 1 unless two tools share the logic.
Layer 1 (io / data / plot / stats) must not import ext.
Documentation#
This project uses Sphinx with MyST markdown, Napoleon docstrings, and autosummary — the same layout as scMagnify.
New public functions need a docstring (numpy or google style) and an entry in
docs/api/.Tutorials live in
docs/tutorials/anddocs/notebooks/.Citations use
{cite:p}Key`` oncedocs/references.bibhas the entry.
If you refer to objects from other packages, add them to intersphinx_mapping in docs/conf.py.
If a missing link is outside your control, add it to nitpick_ignore.
Build locally#
pip install -e ".[doc,plot]"
cd docs
make html
python -m webbrowser -t _build/html/index.html
Generated autosummary pages land in docs/api/generated/ and are not committed.
Code style#
Optional pre-commit and ruff are listed in pyproject.toml. Do not expand layer 1 to absorb paper-specific palettes or figure panels.