Development
Instructions on how build and deploy picozero.
Pre-requisites
To build and deploy picozero, you need to install the dependencies
pip3 install twine sphinx
Build
Update version numbers in the
setup.py
,picozero/__init__.py
, anddocs/conf.py
filesAdd release to
docs/changelog.rst
Run
setup.py
and create a source distributionpython3 setup.py sdist
Upload to PyPI
twine upload dist/*
Push all changes to
master
branchCreate a release in github and upload
picozero-#-#-#.tar.gz
source file to the release
Documentation
The documentation site is built using Sphinx.
Install sphinx using
pip3 install sphinx
To test the documentation build, run the following command from the docs directory
$ ./make html
The website will be built in the directory docs/_build/html.
Documentation can be viewed at picozero.readthedocs.io and is automatically built and deployed on push to github.
Tests
The tests are designed to be run on a Raspberry Pi Pico.
Install the picozero package
Install the micropython-unittest package
Copy the
test_picozero.py
file to the PicoRun the
test_picozero.py
file
If a test fails, it is helpful to be able to see verbose error messages. To see error messages, you need to modify the lib/unittest.py
file on the Pico.
Locate the following code in the run_class
function:
# Uncomment to investigate failure in detail
#raise
Uncomment raise
:
# Uncomment to investigate failure in detail
raise