The code and documentation of LinChemIn is contained in this repository. To contribute to this project or any of the elements of LinChemIn 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}/linchemin.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/linchemin.git
-
Create a dedicated branch:
cd linchemin 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 linchemin conda activate linchemin
-
Install linchemin in editable mode:
pip install -e .[dev]
-
Implement your changes and once you are ready run the tests:
# this can take quite long cd linchemin/tests python -m pytest
And add style checks (be aware that running isort might change your files!):
cd linchemin # sorting the imports python -m isort src/linchemin # checking flake8 python -m flake8 --ignore E501 src/linchemin
-
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.