diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 00000000..ddc4e22d --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,21 @@ + + +**PR Checklist** + + + +- [ ] This comment contains a description of changes (with reason) +- [ ] Referenced issue is linked +- [ ] Documentation in `docs` is updated + +**Description of changes** + + + +**Technical details** + + + +**Additional context** + + diff --git a/README.md b/README.md index 5f132233..22bfa2d3 100644 --- a/README.md +++ b/README.md @@ -38,4 +38,10 @@ bioRxiv 2023.06.01.542416; doi: https://doi.org/10.1101/2023.06.01.542416 ## Contributing -If you like this software, you can give us a star to boost our visibility! All direct contributions are also welcome. Feel free to post a new [issue](https://github.com/MannLabs/alphapeptstats/issues) or clone the repository and create a [pull request](https://github.com/MannLabs/scPortrait/pulls) with a new branch. For an even more interactive participation, check out the [discussions](https://github.com/MannLabs/scPortrait/discussions). +If you like this software, consider giving us a star to boost our visibility! For detailed guidelines on how to contribute, please refer to our [CONTRIBUTING.md](./docs/CONTRIBUTING.md). + +We welcome all types of contributions! You can: + +- Post a new [issue](https://github.com/MannLabs/alphapeptstats/issues) if you encounter a bug or have a feature request. +- Clone the repository, create a new branch, and submit a [pull request](https://github.com/MannLabs/scPortrait/pulls). +- Join the conversation in our [discussions](https://github.com/MannLabs/scPortrait/discussions) for more interactive participation. diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md new file mode 100644 index 00000000..b56fbfc9 --- /dev/null +++ b/docs/CONTRIBUTING.md @@ -0,0 +1,71 @@ +# Contributing guide + +Scanpy provides extensive [developer documentation][scanpy developer guide], most of which applies to this repo, too. +This document will not reproduce the entire content from there. Instead, it aims at summarizing the most important +information to get you started on contributing. + +We assume that you are already familiar with git and with making pull requests on GitHub. If not, please refer +to the [scanpy developer guide][]. + +## Installing dev dependencies + +In addition to the packages needed to _use_ this package, you need additional python packages to _run tests_ and _build +the documentation_. It's easy to install them using `pip`: + +```bash +git clone https://github.com/MannLabs/scPortrait +cd scPortrait +pip install -e '.[dev]' +``` + +## Code-style + +This project uses [pre-commit][] to enforce consistent code-styles. On every commit, pre-commit checks will either +automatically fix issues with the code, or raise an error message. + +To enable pre-commit locally, simply run + +```bash +pre-commit install +``` + +in the root of the repository. Pre-commit will automatically download all dependencies when it is run for the first time. + +Alternatively, you can rely on the [pre-commit.ci][] service enabled on GitHub. If you didn't run `pre-commit` before +pushing changes to GitHub it will automatically commit fixes to your pull request, or show an error message. + +If pre-commit.ci added a commit on a branch you still have been working on locally, simply use + +```bash +git pull --rebase +``` + +to integrate the changes into yours. + +While the [pre-commit.ci][] is useful, we strongly encourage installing and running pre-commit locally first to understand its usage. + +## Writing documentation + +Please write documentation for new or changed features and use-cases. This project uses [sphinx][] with the following features: + +- Google-style docstrings, where the __init__ method should be documented in its own docstring, not at the class level. +- example code +- automatic building with Sphinx + +Refer to [sphinx google style docstrings][] for detailed information on writing documentation. + +### Tutorials with jupyter notebooks + +The tutorials for this project are hosted in a dedicated repository: [scPortrait Notebooks](https://github.com/MannLabs/scPortrait-notebooks). + + + +[scanpy developer guide]: https://scanpy.readthedocs.io/en/latest/dev/index.html +[cookiecutter-scverse-instance]: https://cookiecutter-scverse-instance.readthedocs.io/en/latest/template_usage.html +[github quickstart guide]: https://docs.github.com/en/get-started/quickstart/create-a-repo?tool=webui +[pre-commit.ci]: https://pre-commit.ci/ +[pre-commit]: https://pre-commit.com/ +[sphinx]: https://www.sphinx-doc.org/en/master/ +[sphinx autodoc typehints]: https://github.com/tox-dev/sphinx-autodoc-typehints +[sphinx google style docstrings]: https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html +[scPortrait Notebooks]: (https://github.com/MannLabs/scPortrait-notebooks)