A simple Python script to demonstrate the subdivision of a planar object into triangles.
Install dependencies
pyvenv env
source env/bin/activate
pip install -r requirements.txt
Build and install package
python setup.py build
python setup.py install
Further information about specific parts of the software development process.
python
ftom triangulation import main
main.start()
quit()
Or shorter:
python
from triangulation import main; main.start(); quit()
Start
source env/bin/activate
Stop
deactivate
In the root directory you can execute all tests by calling the following command:
pytest
Generate an API documentation based on the docstrings in the source code in read-the-docs style:
cd docs
make html
Here are some notes for myself to understand my development process and the references I used.
Create and launch virtual environment
pyvenv env
source env/bin/activate
Install dependencies:
pip install --upgrade pip
pip install matplotlib pytest sphinx sphinx_rtd_theme sphinxcontrib-napoleon
pip freeze > requirements.txt
Autogenerate API documentation template (in root directory):
sphinx-apidoc -f -o docs/source triangulation
Test new changes by building, installing an then testing in one command:
python setup.py build && python setup.py install && pytest