-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #78 from fametrano/pr
tested Python 3.11, fixed OpenSSL 3.x issue, and more
- Loading branch information
Showing
128 changed files
with
340 additions
and
200 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
# 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](./README.md) file to get an overview of the project | ||
- read our [Code of Conduct](./CODE_OF_CONDUCT.md) to keep our community approachable and respectable | ||
- come find us on [Slack](https://bbt-training.slack.com/archives/C01CCJ85AES). | ||
|
||
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: | ||
|
||
- [Finding ways to contribute to open source on GitHub](https://docs.github.com/en/get-started/exploring-projects-on-github/finding-ways-to-contribute-to-open-source-on-github) | ||
- [Set up Git](https://docs.github.com/en/get-started/quickstart/set-up-git) | ||
- [GitHub flow](https://docs.github.com/en/get-started/quickstart/github-flow) | ||
- [Collaborating with pull requests](https://docs.github.com/en/github/collaborating-with-pull-requests) | ||
|
||
## Getting started | ||
|
||
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 python project, btclib is very strict on code formatting | ||
([isort](https://pycqa.github.io/isort/), | ||
[black](https://github.com/psf/black), | ||
[pylint](https://pylint.pycqa.org/en/latest/), | ||
[bandit](https://github.com/PyCQA/bandit), | ||
[flake8](https://flake8.pycqa.org/en/latest/), | ||
and [check-manifest](https://pypi.org/project/check-manifest/)) | ||
and proper type definition | ||
([mypy](https://mypy-lang.org/)): | ||
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, especially if you properly setup your development environment. | ||
Type definition improves code readability and helps in spotting bugs. | ||
|
||
Moreover, [unit tests](https://github.com/pytest-dev/pytest/) must pass at any time with 100% [coverage](https://coverage.readthedocs.io/) of both the | ||
library and the test suite. | ||
|
||
These requirements are easily checked (and partially fixed) if you test | ||
the impact of your contribution with [tox](https://tox.wiki/). | ||
|
||
We also like the contribution of [sourcery](https://sourcery.ai/): you might too. | ||
|
||
Finally, even when it comes to mark-down (*.md files), | ||
please use [markdownlint](https://github.com/DavidAnson/markdownlint). | ||
|
||
\[To do: document how to do it in VS Code\] | ||
|
||
### Issues | ||
|
||
#### 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](README.md). | ||
|
||
For any other problem, | ||
[search](https://docs.github.com/en/github/searching-for-information-on-github/searching-on-github/searching-issues-and-pull-requests) | ||
first if an [issue](https://github.com/btclib-org/btclib/issues) (or a [fixing pull request](https://github.com/btclib-org/btclib/pulls), also known as a PR) already exists. | ||
If a related issue/PR does not exist, | ||
please open a new issue. | ||
|
||
#### Solve an issue | ||
|
||
Scan through our [existing issues](https://github.com/btclib-org/btclib/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. | ||
|
||
### Make Changes | ||
|
||
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. | ||
|
||
### Pull Request | ||
|
||
When you're finished with the changes, create a pull request (PR). | ||
|
||
- Don't forget to | ||
[link PR to issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue) | ||
if you are solving one. | ||
- Enable the checkbox to | ||
[allow maintainer edits](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork) 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](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/incorporating-feedback-in-your-pull-request) | ||
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. | ||
- [Sourcery](https://sourcery.ai/) might suggest changes, please accept them. | ||
- As you update your PR and apply changes, mark each conversation as | ||
[resolved](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/commenting-on-a-pull-request#resolving-conversations). | ||
- If you run into any merge issues, checkout this | ||
[git tutorial](https://github.com/skills/resolve-merge-conflicts) | ||
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](https://github.com/btclib-org/btclib/graphs/contributors). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,36 @@ | ||
# Release | ||
|
||
1. Run tox to verify that we pass all the tests (at least on our local machine) | ||
01. Run tox to verify that you pass all the tests (at least on your local machine) | ||
|
||
2. Set appropriate version inside btclib/__init__.py and docs/source/conf.py | ||
01. Set appropriate version inside btclib/__init__.py and docs/source/conf.py | ||
|
||
3. Follow docs/README.rst and test that the documentation builds without problems | ||
01. Follow docs/README.rst and test that the documentation builds without problems | ||
|
||
4. Add every major change since the previous version to HISTORY.md, if it wasn't already added. | ||
01. Add every major changes since the previous version to HISTORY.md, if they were not already there. | ||
|
||
5. Push to Github. Verify that the documentation builds without failing on [read the docs](https://readthedocs.org/projects/btclib/builds/). | ||
Also check that the [website](https://btclib.org) and the [documentation](https://btclib.readthedocs.io/en/latest/) are displayed correctly in a browser | ||
01. Push to GitHub. | ||
|
||
6. Build the package distribution files: | ||
Verify that the documentation builds without failing on | ||
[read the docs](https://readthedocs.org/projects/btclib/builds/). | ||
|
||
```rm -r btclib.egg-info/ build/ dist/ && python setup.py sdist bdist_wheel``` | ||
|
||
7. Push the package files to PyPi: | ||
Also check that the [website](https://btclib.org) and the | ||
[documentation](https://btclib.readthedocs.io/en/latest/) are displayed correctly in a browser. | ||
|
||
01. Build the package distribution files: | ||
|
||
```rm -r btclib.egg-info/ build/ dist/ && python setup.py sdist bdist_wheel``` | ||
|
||
01. Push the package files to PyPi: | ||
|
||
```twine upload dist/*``` | ||
|
||
8. Create a new release on Github: | ||
01. Create a new release on GitHub: | ||
|
||
Use the version as the title, and the history as the description. | ||
Also upload the files in the dist/ folder as release attachments. | ||
|
||
Use the version as the title, and the history as the description. Also upload the files in the dist/ folder | ||
as the release attachments | ||
|
||
9. Prepare for a new generic version: | ||
01. Prepare for a new generic version: | ||
|
||
Choose a new version without specifying the day (es. if the previous release was 2022.2.9, choose 2022.3)\ | ||
Then set the version in btclib/__init__.py and docs/source/conf.py to this new version. \ | ||
Use this new version name in HISTORY.md, specifying that it is in development | ||
Choose a new version without specifying the day (es. if the previous release was 2022.2.9, choose 2022.3). | ||
Then set the version in btclib/__init__.py and docs/source/conf.py to this new version. | ||
Use this new version name in HISTORY.md, specifying that it is in development. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Security policy | ||
|
||
If you have found a security vulnerability, | ||
please do not open up a GitHub issue; instead, | ||
please provide responsible disclosure emailing _security at btclib dot org_. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/usr/bin/env python3 | ||
|
||
# Copyright (C) 2020-2022 The btclib developers | ||
# Copyright (C) 2020-2023 The btclib developers | ||
# | ||
# This file is part of btclib. It is subject to the license terms in the | ||
# LICENSE file found in the top-level directory of this distribution. | ||
|
@@ -11,8 +11,8 @@ | |
"__init__ module for the btclib package." | ||
|
||
name = "btclib" | ||
__version__ = "2022.7.20" | ||
__version__ = "2022.12.31" | ||
__author__ = "The btclib developers" | ||
__author_email__ = "[email protected]" | ||
__copyright__ = "Copyright (C) 2017-2022 The btclib developers" | ||
__copyright__ = "Copyright (C) 2017-2023 The btclib developers" | ||
__license__ = "MIT License" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.