Continuous integration#
We use continuous integration services on GitHub to automatically check if new pull requests do not break anything and meet code quality standards such as a common coding style.
Code quality checks#
We use pre-commit for code quality checks. These checks run automatically before you make a new commit.
To set up pre-commit, follow these steps:
Install pre-commit:
pip install pre-commit
Set up pre-commit:
pre-commit install
Once installed, pre-commit will automatically run our code quality checks on the files you changed whenever you make a new commit.
You can find our pre-commit configuration in .pre-commit-config.yaml. Additional configurations can be found in setup.cfg.
Note
If you want to exclude some line of code from being checked, you can add a # noqa (no quality assurance) comment at the end of that line.
Unit testing#
We use pytest for unit testing. To check if your code passes all tests locally, you need to install the development version of sktime and all extra dependencies.
Install the development version of sktime with developer dependencies:
pip install -e .[dev]
This installs an editable development version of sktime which will include the changes you make.
Note
For trouble shooting on different operating systems, please see our detailed installation instructions.
To run all unit tests, run:
make test
or if you don’t have make installed:
pytest ./sktime
Test coverage#
We use coverage, the pytest-cov plugin, and codecov for test coverage.
Infrastructure#
This section gives an overview of the infrastructure and continuous integration services we use.
Platform |
Operation |
Configuration |
|---|---|---|
Build/test/ distribute on Linux, MacOS and Windows, run code quality checks |
||
Build/deploy documentation |
||
Test coverage |
Additional scripts used for building, unit testing and distribution can be found in build_tools/.