Thanks for your interest in contributing to the wavy.fm Python library! The project is still in its early stages, so we apologize if this document is skipping some important stuff. If you have any questions, you can reach out via the GitHub issues on this repository, or through Discord.
This project is maintained officially by wavy.fm and by the Developer Working Group.
You can use either pipenv
or virtualenv
to initialize the developer environment. I personally prefer pipenv for
this.
# Pipenv creates the environment and fetches the dependencies
pipenv install --dev
pipenv shell
# Alternatively, using virtualenv
virtualenv venv
./venv/bin/activate
pip install -e .
pip install mock==2.0.0 flake8
To run the unit tests and lint, use
# With pipenv
pipenv run tests
pipenv run lint
# With virtualenv
python -m unittest discover -v tests
flake8 . --count --show-source --statistics
Some tests require valid app credentials to run, and are not run in CI. To enable them, set these in your environment variables (substituting with valid credentials):
WAVYFM_RUN_INTEGRATION_TESTS=1
WAVYFM_CLIENT_ID='pub_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
WAVYFM_CLIENT_SECRET='priv_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
Then run the tests like described before.