When contributing to this repository, please first discuss the change you wish to make via an issue. Feature additions, bug fixes, etc. should all be addressed with a pull request (PR).
Please note we have a code of conduct, please follow it in all your interactions with the project.
- Download the dependencies in the developer requirements file.
- Add unit tests for features being added or bugs being fixed.
- Include any new method/function in the corresponding docs file.
- Run
pytest
to verify all unit tests pass. - Identify the unnecessary imports in the
- source code by running
pylint xgi/ --disable=all --enable W0611
- notebooks by running
nbqa pylint . --disable=all --enable W0611
- source code by running
- Remove these unnecessary imports.
- Sort the import statements in the
- source code by running
isort .
- notebooks by running
nbqa isort .
to sort any new import statements in the source code and tutorials.
- source code by running
- Format the source code and notebooks by running
black .
for consistent styling. - Submit Pull Request with a list of changes, links to issues that it addresses (if applicable)
- You may merge the Pull Request in once you have the sign-off of at least one other developer, or if you do not have permission to do that, you may request the reviewer to merge it for you.
- Make sure that the Github Actions workflow runs without any errors.
- Using the
github-changelog
package (a dependency in the release requirements file), runchangelog -m xgi-org xgi [last release tag]
to get the merged pull requests with their links. Paste this into the changelog file under a new heading and edit to make more legible. Associate a GitHub username with each pull request. - Increase the version number in __init__.py and conf.py to the new version agreed upon by the core developers. The versioning scheme we use is SemVer.
- Commit these changes.
- Create a new release on GitHub by selecting "Releases", then clicking "Draft a new release". Click "Choose a tag" and type "v" followed by the version number and then click "Create new tag". The release title will be this same string. Paste the contents of the CHANGELOG into the "Describe this release" field. Click "Publish release".
- Run
python setup.py sdist
from the main folder. This will create a zipped file to upload to PyPI and save it to the "dist" folder. - Using
twine
(a dependency in the release requirements file), runtwine upload dist/xgi-[version number].tar.gz
. Enter your username and password. - The new version is now on PyPI.
This Contributing Statement is adapted from this template by @PurpleBooth.