Contributing¶
Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.
Get Started!¶
Ready to contribute? Here’s how to set up cellpack
for local development.
Fork the
cellpack
repo on GitHub.Clone your fork locally:
git clone git@github.com:{your_name_here}/cellpack.git
Install the project in editable mode by following installation instructions here. (It is also recommended to work in a virtual environment):
cd cellpack/ pip install -r requirements/linux/requirements.txt pip install -e .[dev]
Create a branch for local development:
git checkout -b {your_development_type}/short-description
Ex: feature/read-tiff-files or bugfix/handle-file-not-found
Now you can make your changes locally.When you’re done making changes, check that your changes pass linting and tests, including testing other Python versions with make:
make build
Commit your changes and push your branch to GitHub:
git add . git commit -m "Resolves gh-###. Your detailed description of your changes." git push origin {your_development_type}/short-description
Submit a pull request through the GitHub website.
Contributing cheat sheet¶
pip install -e .[dev]
This will install your package in editable mode with all the required development dependencies (i.e.
tox
).make build
This will run
tox
which will run all your tests and lint your code.make clean
This will clean up various Python and build generated files so that you can ensure that you are working in a clean environment.
make docs
This will generate and launch a web browser to view the most up-to-date documentation for your Python package.
Suggested Git Branch Strategy¶
main
is for the most up-to-date development, very rarely should you directly commit to this branch. GitHub Actions will run on every push and on a CRON to this branch but still recommended to commit to your development branches and make pull requests to main. If you push a tagged commit with bumpversion, this will also release to PyPI.Your day-to-day work should exist on branches separate from
main
. Even if it is just yourself working on the repository, make a PR from your working branch tomain
so that you can ensure your commits don’t break the development head. GitHub Actions will run on every push to any branch or any pull request from any branch to any other branch.It is recommended to use “Squash and Merge” commits when committing PR’s. It makes each set of changes to
main
atomic and as a side effect naturally encourages small well defined PR’s.
Deploying¶
A reminder for the maintainers on how to deploy. Make sure all your changes are committed. Then run:
bumpver update --patch # possible: major / minor / patch
git push --tags
This will release a new package version on Git + GitHub and publish to PyPI.