Continuous integration#
predictably uses Github Actions continuous integration (CI) services
to ensure contributions meet the project’s standards. See the sections below to
see how the project automatically validates code quality, and builds and tests
your changes.
Code quality checks#
predictably uses pre-commit.ci to help maintain
the project’s coding style, by automating the code quality
checks spelled out in the .pre-commit-config.yaml in the project’s root directory.
These checks run automatically when you open a Pull Request or push a new commit
to an existing Pull Request.
When starting your development in your own local clone of the repository,
you should use your command line tool to run pre-commit install. This
will setup pre-commit locally, and trigger the repositories pre-commit hooks
to run prior committing your code locally.
Note
The project also continues to make use of the deprecated pre-commit github action, because it makes it easy cancel other continuous integration steps (including unit testing). This duplicates the code quality portion of the CI routine, but enables the longer unit testing portion of the CI routine to be cancelled whenever the code quality portion fails. A contribution that enables Github Action workflows to be cancelled when pre-commit.ci fails, would be greatly appreciated.
Unit testing#
predictably uses pytest for unit testing.
To check if your code passes all tests locally, follow predictably’s
development installation instructions, which will install
pytest along with other development tools.
With pytest installed, you can navigate to your local project’s root directory
and run:
pytest ./predictably
or if you have make installed:
make test
Infrastructure#
This section gives an overview of the infrastructure and continuous
integration services predictably uses.
Platform |
Operation |
Project Configuration |
|---|---|---|
Build/test/ distribute on Linux, MacOS and Windows |
||
Automate code quality validation |
||
Build/deploy documentation |
||
Test coverage |
Additional scripts used for code quality, building, unit testing and distribution can be found in build_tools/.