Contributing
Contributing
Pull requests correcting errors or expanding options are welcome. To contribute you should fork this repository to your account and clone locally and make your changes before creating a Merge Request. You should then install the package in editable mode with all optional dependencies. It is recommended that you use a Python Virtual Environment (my preference for working with these is virtualenvwrapper but other options abound such as uv or Conda, the choice is yours).
pre-commit and linting
This package is developed using various linting tools which are applied
before each commit is made using the amazing pre-commit. Various pre-commit hooks are
implemented and configured via the .pre-commit-config.yaml.
- pre-commit-hook checks various aspects of Python, Yaml and Markdown files.
- markdownlint-cli2 lints Markdown files.
- Black the opinionated Python formatter.
- codespell for checking spelling
- numpydoc-validation checks docstrings conform to the Numpydoc specification.
- mypy for typehints checking.
- prettier for formatting everything other than Python.
- Pylint for even more Python linting.
- ruff the blazing fast Python linter.
pre-commit and linting are enabled in the GitLab CI pipelines. To ensure your pull request passes these you should
install and enable pre-commit. If you followed the steps above pre-commit should be installed in your Virtual
Environment. Install it with...
Now whenever you make a commit pre-commit will run and check the contributions. In some instances the hooks can
automatically fix errors, but you may find you have to correct some yourself. The output is generally informative
directing you to the relevant line and what the error is.