Contributing to MiniAn

We’d love feedback and contribution from the community! Fork and clone MiniAn from source, make you changes and submit a PR! Below are some book-keeping notes.

Commit Messages

MiniAn is adopting conventional commit. You can use commitizen to check for the style or setup pre-commit hooks. We also use commitizen to automate the releasing process. All development should be done on separate branches and squash-merge to master.

Code Style

MiniAn use the black coding style. We also use a github action to enforce the style. So watch out for automatic commits and avoid headache in confilicting history.

Creating release

  1. pip install commitizen

  2. cz bump --dry-run and make note of new release tag

  3. cz changelog --unreleased-version <TAG> with the tag noted in last step

  4. edit CHANGELOG.md as desired

  5. cz bump

Packaging for PyPi

  1. pip install --upgrade build

  2. python3 -m build

  3. pip install --upgrade twine

  4. python3 -m twine upload dist/*

See also

packaging

Packaging for conda-forge

  1. fork and clone https://github.com/conda-forge/minian-feedstock

  2. conda config --add channels conda-forge

  3. conda install conda-build

  4. conda install conda-smithy

  5. conda-build recipes/minian

  6. create a PR to upstream

Build documentation

MiniAn use numpy style docstring. It also heavily rely on auto-generated notebooks and use a custom github-action-rtd workflow.

To build documentation locally run the following commands:

pip install -r requirements/requirements-doc.txt
cd docs
make html

This however does not include the auto-generated pages for pipeline.ipynb and cross-registration.ipynb. To include those, create a folder docs/source/artifact. Then copy the notebooks (preferably with output) and the img folder under there.