Development¶
This chapter descibes how to develop on ppci.
Source code¶
The sourcecode repository of the project is located at these locations:
- https://bitbucket.org/windel/ppci
- https://pikacode.com/windel/ppci/
- https://mercurial.tuxfamily.org/ppci/ppci
To check out the latest code and work use the development version use these commands to checkout the source code and setup ppci such that you can use it without having to setup your python path.
$ mkdir HG
$ cd HG
$ hg clone https://bitbucket.org/windel/ppci
$ cd ppci
$ sudo python setup.py develop
Running the testsuite¶
To run the unit tests with the compiler, use pytest:
$ python -m pytest -v test/
Or use the unittest module:
$ python -m unittest discover -s test
In order to test ppci versus different versions of python, tox is used. To run tox, simply run in the root directory:
$ tox
Building the docs¶
The docs can be build locally by using sphinx. Sphinx can be invoked directly:
$ cd docs
$ sphinx-build -b html . build
Alternatively the tox docs environment can be used:
$ tox -e docs
Release procedure¶
Determine the version numbers of this release and the next.
Switch to the release branch and merge the default branch into the release branch.
$ hg update release $ hg merge default $ hg commit
Check the version number in ppci/__init__.py
Make sure all tests pass and fix them if not.
$ tox
Tag this release with the intended version number and update to this tag.
$ hg tag x.y.z $ hg update x.y.z
Package and upload the python package. The following command creates a tar gz archive as well as a wheel package.
$ python setup.py sdist bdist_wheel upload
Switch back to the default branch and merge the release branch into the default branch.
$ hg update default $ hg merge release $ hg commit
Increase the version number in ppci/__init__.py.
Code metrics¶
Code coverage is reported to the codecov service:
Other code metrics are listed at openhub: