Skip to content

Latest commit

 

History

History
37 lines (34 loc) · 1.56 KB

CONTRIBUTING.md

File metadata and controls

37 lines (34 loc) · 1.56 KB

Contributing to plasTeX

##  Testing

We run our tests using pytest, although many of our tests were written long before pytest was written. As usual with pytest, no much will work as expected if you don't install the package you want to test. So the first step is to run pip install . in the toplevel folder of this repository, the one containing setup.py (as usual, depending on your python setup, pip could be called pip3, and you may need administration permissions if you want to make a system-wide install). If you want to quickly modify code and retest, it is more convenient to use "editable install", by running pip install -e . which creates a link to your working copy of plasTeX instead of copying it (see pip's documentation if needed). Once plasTeX is installed, you can run pytest from the toplevel folder.

Our continuous integration tests plasTeX using python 3.5 to 3.8. This can be done locally using tox. For this you need tox of course, but also various versions of python. One convenient way to ensure that is to use pyenv. After setting up pyenv and installing, say python 3.5.6, 3.6.8, 3.7.2 and 3.8.0 (using pyenv install 3.5.6 etc.), you can create, inside the toplevel folder of your working copy of plasTeX, a file .python-version containing

3.8.0
3.7.2
3.6.8
3.5.6

Then you can run tox to run our test suite against all those versions of python.