Contributing#
We happily welcome contributions of any kind! Please refer to the guide below on how to contribute.
Bug reports#
If you find any bugs, please report them at solldavid/TwistPy#issues.
When reporting a bug, please include the following information:
TwistPy version, Python version, operating system.
If this is a new bug that did not exist in previous versions, please state in which version it last worked.
If possible, provide a minimal example to reproduce the bug.
New feature suggestion#
Open an issue at solldavid/TwistPy#issues with tag enhancement.
Explain in detail what your new feature should include.
Keep the scope as narrow as possible, to make it easier to implement.
Add examples or improve documentation#
We are always happy to include new examples in the gallery and improve our documentation!
Adding new features: Step-by-step instructions for developers#
Fork the repository.
If you have not done so already, install
pre-commit
,black
andflake8
:
>> pip install pre-commit black flake8
Install pre-commit hooks. The repository comes with a pre-commit configuration to reformat the code with
black
and check the code withflake8
before each commit.
>> pre-commit install
Create a new branch for local development, based at the main branch:
>> git checkout -b name-of-your-branch main
Now you can make your changes locally.
Add a test for your changes.
Make sure that all tests pass using pytest.
Add your name to the list of contributors in
/docs/source/contributors.rst
.Push to your fork.
>> git add .
>> git commit -m "Commit message"
>> git push origin name-of-your-branch
Remember to add -u
when pushing the branch for the first time.
Submit a pull request via the GitHub website.
Continuous Integration#
CI is implemented with GitHub Actions with workflows that are run upon each commit to the repository for testing, linting, and documentation building.
Style Guide#
We use a default line length of 88 characters, which is the default of the
black
formatter. Note that this line length is not enforced for docstrings.Source code must follow the PEP8 coding standards.
For better readability, docstrings need to be in numpydoc format. Please refer to the numpydoc style guide!
Use type hints whenever possible!