How to contribute
November 17, 2025 ยท View on GitHub
PyPSA-SPICE is an open-source repository and thus your contributions are welcome and appreciated!
If you are considering using this model builder, please reach out to us at modelling@agora-thinktanks.org{:target="_blank"}. We would be happy to help you get started.
If you encounter a bug, please create a new issue{:target="_blank"}. For new ideas or feature requests, you can start a conversation in the discussions{:target="_blank"} section of the repository. For troubleshooting, please check the troubleshooting guide for more information.
Code style
If your contributions involve code changes, please follow the steps below to format your code before creating a pull request. This will help us review your changes more efficiently!
- Fork the repository on GitHub
- Clone your fork:
git clone https://github.com/<your-username>/pypsa-spice.git - Fetch the upstream tags
git fetch --tags https://github.com/agoenergy/pypsa-spice/pypsa-spice.git - Install with dependencies in editable mode:
pip install -e .[dev] - Setup linter and formatter, e.g
pre-commit install(see Pre-commit) - Open a new branch and write your code
- Push your changes to your fork and create a pull request on GitHub
Pre-commit
We use pre-commit to maintain consistent code style and catch common errors before commits. The pre-commit package is included in the pypsa-spice environment. To enable automatic formatting before each commit (recommended), run this command once:
pre-commit install
This will automatically check the changes which are staged before you commit them.