First off, thanks for taking the time to contribute! 🎉👍
The following is a set of guidelines for contributing to pumas, which are hosted in the Syngenta Organization on GitHub. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
The code and documentation of pumas is contained in this repository. To contribute to this project or any of the elements of pumas we recommend you start by reading this contributing guide.
If you would like to contribute to the package, we recommend the following development setup.
-
Create a copy of the repository via the "Fork" button.
-
Clone the linchemin repository:
git clone git@github.com:${GH_ACCOUNT_OR_ORG}/pumas.git
-
Add remote linchemin repo as an "upstream" in your local repo, so you can check/update remote changes.
git remote add upstream git@github.com:syngenta/pumas.git
-
Create a dedicated branch:
cd pumas git checkout -b a-super-nice-feature-we-all-need
-
Create and activate a dedicated conda environment (any other virtual environment management would work):
conda env create pumas conda activate pumas
-
Install pumas in editable mode:
pip install -e .[dev]
-
Implement your changes and once you are ready run the tests:
# this can take quite long cd pumas/tests python -m pytest
And add style checks (be aware that running isort might change your files!):
cd pumas # sorting the imports python -m isort src/pumas # checking black python -m black src/pumas # checking flake8 python -m flake8 --ignore E501 src/pumas
-
Once the tests and checks passes, but most importantly you are happy with the implemented feature, commit your changes.
# add the changes git add # commit them git commit -s -m "feat: implementing super nice feature." -m "A feature we all need." # check upstream changes git fetch upstream git rebase upstream/main # push changes to your fork git push -u origin a-super-nice-feature-we-all-need
-
From your fork, open a pull request via the "Contribute" button, the maintainers will be happy to review it.