Development
Contributions welcome!
Here are some notes about common tools and tasks you’ll run into when working on unleash-client-python.
Tooling
Testing
Activate your virtualenv solution (e.g. source activate YOUR_VIRTUALENV).
Run linting & tests:
make test
Running Tox locally
Install Python versions for each supported version.
Deactivate your local virtualenv (if it’s activated).
Run
pyenv local 3.10.X 3.9.Y 3.8.Z 3.7.12
(inserting appropriate patch versions).Run
make install
to get latest local dependencies.Run
make tox
to run tox.
Using devcontainer
This SDK ships with a devcontainer to make local (or cloud!) environment fast & easy!
Upgrading the Client Specification Tests
This SDK implements tests for the Unleash Client Specifications,
when adding a new feature set that’s covered by the client specs, it’s a good idea to also upgrade the client specifications.
This can be done by updating the CLIENT_SPEC_VERSION
constant found in UnleashClient/constants.py
.
This constant should match the latest tag in the Client Specifications repository.
Release
Land all your PRs on main!
If new configuration is added, update Flask-Unleash config.
Update changelog.md and other documentation.
Create tag on main branch.
Create new Release in Github and paste in changelog.
Github Actions workflow will automagically publish to Pypi and build documentation.
Publish new Flask-Unleash package (if necessary).
Snippets
Serving docs from WSL!
docker run -d --name unleash-docs --rm -v `pwd`/_build/html:/web -p 8080:8080 halverneus/static-file-server:latest