From c487bd3b38c5337dec1c7a3d3665d87e2422c12b Mon Sep 17 00:00:00 2001 From: Blampey Quentin Date: Fri, 9 Feb 2024 17:33:28 +0100 Subject: [PATCH] improve contributing.md --- CONTRIBUTING.md | 39 +++++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 455c05d3..3d3793e0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,26 +2,41 @@ Contributions are welcome as we aim to continue improving the pipeline. For instance, you can contribute by: -- Reporting a bug -- Reporting some difficulties in using the pipeline +- Opening an issue - Discussing the current state of the code -- Submitting a fix -- Proposing new features +- Making a Pull Request (PR) -## Pull Requests +If you want to open a PR, follow the following instructions. -To add some new code to **sopa**, you should: +## Installing `sopa` in editable mode + +When contributing, installing `sopa` in editable mode is recommended. Also, we recommend installing the 'dev' extra. + +For this, use one of the two following lines: + +```sh +# with pip +pip install -e '.[dev]' -1. Install the dependencies. -2. Create your personal branch from `dev`. -3. Make sure you read the coding guidelines below. -4. Implement your changes. -5. Create a pull request on `dev` with explanations about your developed features. Then, wait for discussion and validation of your pull request. +# or with poetry +poetry install -E dev +``` ## Coding guidelines - Use the `black` formatter and `isort`. Their usage should be automatic as they are in the `pyproject.toml` file. Depending on your IDE, you can choose to format your code on save. +- Run `flake8` inside the whole `sopa` directory, i.e. `flake8 sopa` - Follow the [PEP8](https://peps.python.org/pep-0008/) style guide. - Provide meaningful names to all your variables and functions. - Document your functions and type your function inputs/outputs. -- Try as much as possible to follow the same coding style as the rest of the repository. \ No newline at end of file +- Try as much as possible to follow the same coding style as the rest of the repository. + +## Pull Requests + +To add some new code to **sopa**, you should: + +1. Fork the repository +2. Install `sopa` in editable mode with the 'dev' extra (see above) +3. Create your personal branch from `dev` +4. Implement your changes +5. Create a pull request on the `dev` branch. Add explanations about your developed features, and wait for discussion and validation of your pull request