Contributing¶
Contributions are welcome, and they are greatly appreciated! Every little helps, and credit will always be given.
You can contribute in many ways:
Types of Contributions¶
Report Bugs¶
Report bugs on the issues page. If you are reporting a bug, please include:
Any details about your local setup that might be helpful in troubleshooting.
Detailed steps to reproduce the bug.
Fix Bugs¶
Look through the GitHub issues for bugs. Anything tagged with “bug” is open to whoever wants to implement it.
Implement Features¶
Look through the GitHub issues for features. Anything tagged with “enhancement” is open to whoever wants to implement it.
Write Documentation¶
This module could always use more documentation, whether as part of the official docs, in docstrings, or other.
Submit Feedback¶
The best way to send feedback is to file a ticket on the issues page. If you are proposing a feature:
Explain how it would work.
Keep the scope as narrow as possible, to make it easier to implement.
Remember that this is a volunteer-driven project, and that contributions are welcome 🙂
Get Started!¶
Ready to contribute? Here’s how to set up deezer-python
for local development.
Fork the repo on GitHub.
Clone your fork locally:
$ git clone git@github.com:your_name_here/deezer-python.git
Install the dependencies with Poetry
$ poetry install -E tornado -E docs
Create a branch for local development:
$ git checkout -b name-of-your-bugfix-or-feature
Now you can make your changes locally.
When you’re done making changes, check that your changes pass our tests and that the doc builds. The easiest way to do that is by running tox environments:
$ poetry run tox -e lint,docs,py38
It will run our linters (flake8 and black), build the docs and run the tests
Commit your changes, quoting GitHub issue in the commit message, if applicable, and push your branch to GitHub:
$ git add . $ git commit -m "feat(something): your detailed description of your changes" $ git push origin name-of-your-bugfix-or-feature
Note: the commit message should follow the conventional commits specs, this is to enable the automation of releases. We run
commitlint
on CI which will validate the commit messages.Submit a pull request on GitHub.
Obtain an API token¶
If you want to work on a feature that requires authentication, you’ll need to obtain an API token to perform authenticated requests using the oauth.py
script. The script will take you through the OAuth flow, display and save the API token at the end.
First, you’ll need to have a dedicated app in the Deezer developer portal, create one with the following redirect URL after authentication: http://localhost:8080/oauth/return
.
Once created, get the application ID as well as the secret key and call the script with them:
$ python oauth.py --app-id APP_ID --app-secret SECRET_KEY
Authorise the app in your browser. You should then should be redirected to a simple HTML page with your API token. The script also save the API token locally in the .env
file. This is convenient to generate cassettes when writing new tests locally.
Pull Request Guidelines¶
Feel free to open the pull request as soon as possible, but please be explicit if it’s still a work in progress, we recommend draft pull requests. Please try to:
Include tests for feature or bug fixes.
Update the documentation if for any significant API changes.
Ensure tests are passing on continuous integration.
Create a New Release¶
The deployment should be automated and can be triggered from the Semantic Release workflow in GitHub. The next version will be based on the commit logs. This is done by python-semantic-release via a GitHub action.