Contributing#
We welcome anyone interested in contributing to this project, be it with new ideas, suggestions, by filing bug reports or contributing code.
A Discord server hosts every tool in the PyPSA ecosystem. We have there public voice and text channels that are suitable to organise projects, ask questions, share news, or chat with the community.
You are invited to submit pull requests / issues to our Github repository.
For major next development goals, you can consult our vision and roadmap project or check the list of possible enhancements.
For linting, formatting and checking your code contributions against our guidelines (e.g. we use Black as code style and aim for REUSE compliance, use pre-commit:
Installation
conda install -c conda-forge pre-commitorpip install pre-commit- Usage:
To automatically activate
pre-commiton everygit commit: Runpre-commit installTo manually run it:
pre-commit run --all
Contributing examples#
Nice examples are always welcome.
You can even submit your Jupyter notebook (.ipynb) directly
as an example.
For contributing notebooks (and working with notebooks in git
in general) we have compiled a workflow for you which we suggest
you follow:
Locally install this precommit hook for git
This obviously has to be done only once. The hook checks if any of the notebooks you are including in a commit contain a non-empty output cells.
Then for every notebook:
Write the notebook (let’s call it
foo.ipynb) and place it inexamples/foo.ipynb.Ask yourself: Is the output in each of the notebook’s cells relevant for to example?
Yes: Leave it there. Just make sure to keep the amount of pictures/… to a minimum.
No: Clear the output of all cells, e.g. Edit -> Clear all output in JupyterLab.
Provide a link to the documentation: Include a file
foo.nblinklocated indoc/examples/foo.nblinkwith this contentLink your file in the documentation:
Either
Include your
examples/foo.nblinkdirectly into one of the documentations toctrees; orTell us where in the documentation you want your example to show up
Commit your changes. If the precommit hook you installed above kicks in, confirm your decision (‘y’) or go back (‘n’) and delete the output of the notebook’s cells.
Create a pull request for us to accept your example.
For the reasoning and details behind this workflow, see atlite/issues#38.
The support for the the .ipynb notebook format in our documentation
is realised via the extensions nbsphinx and nbsphinx_link.