The main contents of the repository are organized as:
.
├── docs
│ └── source
└── plasticnet
├── classes
├── solvers
├── tests
└── utils
We use Conda to manage the development environment, with dependencies listed in .environment.yml.
If you don't have conda
installed and set up for Python 3.x, install it using the instructions on their site, and then install this package with
git clone https://github.com/donovanr/plasticnet.git
cd plasticnet
conda env create -f .environment.yml
conda env update -f .environment.test.yml
conda env update -f .environment.local.yml
conda activate plasticnet
conda develop .
We use:
- GitHub for code hosting and issue tracking
- Travis CI for testing
- Codecov for code coverage reporting
- Read the Docs for auto-generating and publishing the documentation
- pre-commit hooks for formatting and linting
The Travis configuration is in .travis.yml, and doesn't have anything fancy set up.
Tests are run automatically when commits are pushed to GitHub. To run the tests locally, issue pytest
in the main project directory.
Configuration for Codecov is in .codecov.yml.
Travis is set up to run pytest-cov
, and the resulting report is pushed to Codecov.
The configuration for pytest-cov
is in .coveragerc
Documentation config for Sphinx + autodoc lives in docs/source/conf.py.
Build configs live in .readthedocs.yml.
In the Read the Docs admin pane, you should choose the CPython 3.x
interpreter.
Docs are generated automatically when commits are pushed to GitHub. To generate the docs locally, from the main project directory, use
sphinx-build -b html docs/source docs/build
Pre-commit hooks are configured in .pre-commit-config.yaml, and need to be set up (once) with pre-commit install
.
The pre-commit hooks we use are: