Instructions for good practises when developing python code. Make sure you have installed the developer requirements:
pip install -r requirements.txt
We use pytest for unit testing. Simply use the pytest command:
pytest
Before being accepted into master all code should have well writen documentation. Please use Google Style Python Docstrings.
We are using mkdocs. The docs can be generated locally as follows:
mkdocs serve
Adding and updating existing documentation is highly encouraged.
Docker is great for reprodicible research. You can pull the latest docker image to run our code:
docker pull patrickohara/pctsp:latest
Alternatively you can build the docker file as follows:
docker build -t patrickohara/pctsp:latest .
To re-build the base SCIP image:
docker build -t patrickohara/scip:latest -f scip.dockerfile .
Keeps the code neat and tidy. We use pylint and mypy.
You can change pylint settings in the .pylintrc
file.
Some of the smaller linting issues can be cured by running the black formatter:
black */
We are moving towards adding type hints so you may optionally add types to your code. In which case you do not need to include types in your google style docstrings.