You are here to help BitShares and the python-bitshares library? Awesome, feel welcome and read the following sections in order to know how to ask questions and how to work on something.
All members of our community are expected to follow our Code of Conduct. Please make sure you are welcoming and friendly in all of our spaces.
Feel free to get in contact with the developer community on Telegram.
When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.
Please note we have a code of conduct, please follow it in all your interactions with the project.
To familiarize yourself with the code and procedures, we recommend to get started with:
- review a Pull Request
- fix an Issue
- update the documentation
- make a website
- write a tutorial
This project makes heavy use of git flow. If you are not familiar with it, then the most important thing for you to understand is that:
pull requests need to be made against the develop
branch!
We strictly use connventional commits!
Upon submission of a pull request, you will be asked to sign the Contributor License Agreement digitally through a github-connected service.
If you've noticed a bug or have a question, [search the issue tracker][https://github.com/bitshares/python-bitshares/issues] to see if someone else in the community has already created a ticket. If not, go ahead and [make one][https://github.com/bitshares/python-bitshares/issues/new]!
If this is something you think you can fix, then fork the repository and create a branch with a descriptive name.
A good branch name would be (where issue #325 is the ticket you're working on):
git checkout -b 325-new-fancy-feature
Make sure to add a unit tests for your your code contribution in
tests/
. You may use other unit tests as template for your own tests.
Individual unit tests can be run by:
python3 -m unittests tests/test_NEWFEATURE.py
The entire test suite can be run in a sandbox through
tox
-
Ensure the bug was not already reported by [searching all issues][https://github.com/bitshares/python-bitshares/issues].
-
If you're unable to find an open issue addressing the problem, [open a new one][https://github.com/bitshares/python-bitshares/issues/new]. Be sure to include a title and clear description, as much relevant information as possible, and a code sample or an executable test case demonstrating the expected behavior that is not occurring.
-
If possible, use the relevant bug report templates to create the issue. Simply copy the content of the appropriate template into a .py file, make the necessary changes to demonstrate the issue, and paste the content into the issue description.
At this point, you're ready to make your changes! Feel free to ask for help; everyone is a beginner at first
Your patch should follow the same conventions & pass the same code
quality checks as the rest of the project.
Codeclimate
will give you feedback in this regard. You can check & fix codeclimate's
feedback by running it locally using Codeclimate's CLI, via
codeclimate analyze
.
Pull requests are supposed to go against the develop
branch, only!
At this point, you should switch back to your develop
branch and make
sure it's up to date with python-bitshares's develop
branch:
git remote add upstream [email protected]:bitshares/python-bitshares.git
git checkout develop
git pull upstream develop
Then update your feature branch from your local copy of develop, and push it!
git checkout 325-new-fancy-feature
git rebase develop
git push --set-upstream origin 325-new-fancy-feature
Finally, go to GitHub and make a Pull Request :D
Travis CI will run our test suite against all supported Rails versions. We care about quality, so your PR won't be merged until all tests pass. It's unlikely, but it's possible that your changes pass tests in one Rails version but fail in another. In that case, you'll have to setup your development environment (as explained in step 3) to use the problematic Rails version, and investigate what's going on!
If a maintainer asks you to "rebase" your PR, they're saying that a lot of code has changed, and that you need to update your branch so it's easier to merge.
To learn more about rebasing in Git, there are a lot of good git rebasing resources but here's the suggested workflow:
git checkout 325-new-fancy-feature
git pull --rebase upstream develop
git push --force-with-lease 325-new-fancy-feature
A PR can only be merged into develop
by a maintainer if:
- Pull request goes against
develop
branch. - It is passing CI.
- It has been approved by at least two maintainers. If it was a maintainer who opened the PR, only one extra approval is needed.
- It has no requested changes.
- It is up to date with current
develop
. - Did the contributor sign the CLA
Any maintainer is allowed to merge a PR if all of these conditions are met.
Create a new pull request with release/<YYYYmmdd>
. Push the branch.
When merged into master, release tagging and publishing will be triggered
throught github actions.