This section contains information for developers. In case you want to improve, debug, extend the project you may find here some useful information.
To run a particular test execute a command similar like this:
$ pipenv run python -m unittest tests/cloudio/test_cloudio_attribute.pyTo execute all tests:
$ pipenv run python -m unittest discover -s tests/cloudioTo run the test coverage execute the following commands:
$ pipenv run coverage run --source=./src -m unittest discover -s tests/cloudio
$ pipenv run coverage report -mTo update the coverage image shown on the readme page execute the following command:
$ pipenv run coverage-badge -f -o docs/images/coverage.svgPrior to upload a new Python package be sure to create first a new release of the project:
- Update development branch
- Run tests with coverage
- Increment version number
- Update
CHANGELOG.mdfile - Check content of
setup.pyand change accordingly - Generate distribution packages
- Push to master branch
$ cd <into project>
# Install package needed for deployment (coverage, build, twine, etc.)
$ pipenv install --dev
# Build the package
$ pipenv run python -m build
# Optional: Send to test server
$ pipenv run twine upload --repository testpypi dist/*
# Upload to official server
$ pipenv run twine upload --repository pypi dist/{<project-name>-x.y.z}*.whl
$ pipenv run twine upload --repository pypi dist/{<project-name>-x.y.z}.tar.gzIf you want to use for example the cloudio-glue-python package from your locally cloned
git repository, use a command similar like:
$ pipenv install --dev -e ../cloudio-glue-pythonIf it does not work with a relative path, try with an absolute path. The folder you are
referencing must contain a setup.cfg or setup.py file.