We use pytest (version > 3.0) and mock for testing. Tests can be run from the top-level directory using:
pytest
To run the complete suite of tests in their own environment, you can use tox
. This is done with:
pip install tox
tox
We use sphinx to build the documentation. To do this, navigate into pyQuil's top-level directory and run:
make html
To view the docs navigate to the newly-created docs/_build
directory and open
the index.html
file in a browser. Note that we use the Read the Docs theme for
our documentation, so this may need to be installed using pip install sphinx_rtd_theme
.
Working with the ANTLR parser involves some extra steps, see pyquil/_parser/README.md.
Note that you only need to install ANTLR if you want to change the grammar, simply running the parser involves no extra steps beyond installing PyQuil as usual.