Contributing to RegionMatchο
Thank you for your interest in contributing to RegionMatch β weβre very happy youβre here! π±
RegionMatch is developed at the Climate Service Center Germany (GERICS), Helmholtz-Zentrum Hereon, and released as open-source software because we believe that transparent, reusable tools are essential for climate services and research.
Whether you want to report a bug, improve the documentation, or contribute code: your input is very welcome.
π¬ Getting in touchο
The easiest way to start is via the GitLab issue tracker:
π https://gitlab.dkrz.de/ch1187/plugins4freva/regionmatch
Please feel free to open an issue if you:
have a question about the plugin
found a bug or unexpected behaviour
miss a feature
want to discuss an idea before implementing it
π§βπ» Contributing codeο
Development workflowο
The source code is hosted on GitLab. To contribute:
Create a GitLab account (if you donβt have one yet)
Fork the repository to your own account
Implement your changes in your fork
Open a merge request against the main repository
If you are unsure about anything along the way, donβt hesitate to open an issue and ask β weβre happy to help.
Repository: https://gitlab.dkrz.de/ch1187/plugins4freva/regionmatch
Local setupο
Clone your fork:
git clone https://gitlab.dkrz.de/<your-user>/regionmatch.git
cd regionmatch
Create and activate a virtual environment:
python -m venv venv
source activate venv/bin/activate # or venv/Scripts/Activate.bat on Windows
Install the package in development mode
pip install -e ./regionmatch/[dev]
π Development helpersο
Makefile shortcutsο
Several common development tasks are bundled in the Makefile located in the repository root. On Linux, you can run:
make help
to get an overview of available commands.
π¨ Code style and quality checksο
To keep the codebase readable and maintainable, we rely on automated tools:
Black β code formatting
blackdoc β formatting of docstrings and documentation
Flake8 β general code quality
isort β import ordering
mypy β static type checking
reuse β license compliance
cffconvert β validation of
CITATION.cff
These checks are automatically run via pre-commit hooks.
Setting up pre-commit (recommended)ο
pre-commit install
From now on, formatting and checks will run automatically before each commit.
You can also run them manually:
pre-commit run --all-files
Skipping checks (git commit --no-verify) is possible, but note that the CI pipeline will fail if formatting issues remain.
π Licenses and copyrightο
When adding new files, please ensure that license headers are set correctly. We use reuse to manage and validate licensing information.
A helper script is provided:
python .reuse/add_license.py <shortcut> <file>
Available shortcuts:
codeβ for Python source filesdocsβ for documentation filessuppβ for other supporting files
If youβre unsure which license applies, feel free to ask the maintainers.
π Contributing to the documentationο
The documentation is built with Sphinx and hosted on Read the Docs.
To build the docs locally:
cd docs
pip install -r requirements.txt ../[docs]
make html
You can then open the documentation locally at:
docs/_build/html/index.htm
Documentation sources live in the docs/ folder and can be edited directly.
π Updating the plugin templateο
RegionMatch was originally generated using the Freva plugin template:
https://gitlab.dkrz.de/ch1187/plugins4freva/freva-plugin-template.git
If you need to update the project skeleton, please refer to the template repository for detailed instructions.
Thanks again for your interest in contributing β we really appreciate your help in making RegionMatch better! π