How to contribute to btclib¶
Thank you for investing your time in contributing to our project. We are glad you are reading this, because we need volunteer developers to help this project come to fruition.
If you haven’t already:
see the README file to get an overview of the project
read our Code of Conduct to keep our community approachable and respectable
come find us on Slack.
In this guide you will get an overview of the contribution workflow from opening an issue, creating a PR, reviewing, and merging the PR.
New contributor guide¶
Here are some resources to help you get started with open source contributions:
Development tools are required to develop and test btclib; they can be installed with:
python -m pip install --upgrade -r requirements-dev.txt
Developers might also consider installing btclib in editable way:
python -m pip install --upgrade -e ./
Finally, additional packages are needed to build the documentation:
python -m pip install --upgrade -r docs/requirements.txt
As an annotated python3 project, btclib is very strict on code formatting (isort, black, pylint, bandit, flake8, and sourcery) and proper type definition (mypy): warnings are not tolerated and should be taken care of. This might be annoying at first, but enforcing formatting rules can be done easily once you’re finished with coding or, even better, automatically taken care of while coding if you configure your development environment. Type definition improves code readability and helps in spotting bugs.
These requirements are easily checked (and partially fixed) if you test the impact of your contribution with tox.
Finally, even when it comes to mark-down (i.e., *.md files), please use markdownlint-cli2.
[To do: document how to do it in VS Code]
Create a new issue¶
Did you find a bug? Do not open up a GitHub issue if the bug is a security vulnerability, and instead refer to our security policy.
For any other problem, search first if an
Solve an issue¶
Scan through our existing issues to find one that interests you. As a general rule, we don’t assign issues to anyone. If you find an issue to work on, you are welcome to open a PR with a fix.
Work locally on your fork of btclib, until you are satisfied. Ensure that tox has no issue with your modified codebase.
Commit your update¶
Commit the changes to your fork once you are happy with them.
When you’re finished with the changes, create a pull request (PR).
Don’t forget to link PR to issue if you are solving one.
Enable the checkbox to allow maintainer edits so the branch can be updated for a merge. Once you submit your PR, team members will review your proposal. We may ask questions or request additional information.
We may ask for changes to be made before a PR can be merged, either using suggested changes or pull request comments. You can apply suggested changes directly through the UI. You can make any other changes in your fork, then commit them to your branch.
As you update your PR and apply changes, mark each conversation as resolved.
If you run into any merge issues, checkout this git tutorial to help you resolve merge conflicts and other issues.
Your PR is merged¶
Congratulations :tada::tada: The btclib team thanks you :sparkles:.
Once your PR is merged, your contributions will be publicly visible on the contributors page.