Development Guide¶
Setup¶
Follow these steps to configure your machine for CompChemUtils development.
Fork
CompChemUtils(look for the “Fork” button).Clone your fork locally:
git clone git@gitlab.com:YOURGITLABNAME/ccu.gitInstall
poetry(optional):pipx install poetryInstall the development environment with all extras. with
poetry:poetry install --with=dev,vcs,docs,format-lint,type_checkwith
pip:python3 -m pip install .[dev,vcs,docs,format-lint,type_check]Install the
pre-commithooks (optional):pre-commit install --hook-type pre-commitCreate a branch for local development:
git checkout -b name-of-your-bugfix-or-feature
Now you can make your changes locally.
Merge Request Guidelines¶
If you need some code review or feedback while you’re developing the code, please create a merge request. Before your changes can be merged, please ensure that:
Tests are passing (run
nox).Documentation is updated when there’s new API, functionality, etc.
New functionality is accompanied by the appropriate unit tests.
Add a note to
CHANGELOG.rstabout the changes.Add yourself to
AUTHORS.rst.The correct branch is targeted.
main: bug fixes and documentation changes for the current versiondevelopment: new features and any breaking changes
Commit your changes and push your branch to GitLab:
git add . git commit -m "Your detailed description of your changes." git push origin name-of-your-bugfix-or-feature
Submit a merge request through the GitLab website.
Tips¶
To run a subset of tests:
nox -s envname
To view all testing environments:
nox -l
To run all the test environments in parallel:
nox -p auto
To format the code (ruff):
nox -s format_fix
To build the documentation:
nox -s docs