# 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. 1. Fork the `cellpack` repo on GitHub. 2. Clone your fork locally: ```bash git clone git@github.com:{your_name_here}/cellpack.git ``` 3. Install the project in editable mode by following installation instructions [here](./docs/INSTALL.md). (It is also recommended to work in a virtual environment): ```bash cd cellpack/ pip install -r requirements/linux/requirements.txt pip install -e .[dev] ``` 4. Create a branch for local development: ```bash 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. 5. When you're done making changes, check that your changes pass linting and tests, including testing other Python versions with make: ```bash make build ``` 6. Commit your changes and push your branch to GitHub: ```bash git add . git commit -m "Resolves gh-###. Your detailed description of your changes." git push origin {your_development_type}/short-description ``` 7. Submit a pull request through the GitHub website. ### Contributing cheat sheet 1. `pip install -e .[dev]` This will install your package in editable mode with all the required development dependencies (i.e. `tox`). 2. `make build` This will run `tox` which will run all your tests and lint your code. 3. `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. 4. `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 1. `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. 2. 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 to `main` 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. 3. 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: ```bash bumpver update --patch # possible: major / minor / patch git push --tags ``` This will release a new package version on Git + GitHub and publish to PyPI.