Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit adds nox-based tests for MLCube and its runners in multiple versions of python environments. Some of the tests are: - Standard unit tests. - Various consistency checks. - Test MLCube by running various MLCube example cubes. [Introduction] Run various MLCube and MLCube runner tests. Some tests run for multiple python versions, others just for one. Some do not take too much time (e.g., unit test), others require some time (e.g., MLCube examples or minified benchmarks). This is based on `nox` (https://nox.thea.codes/). [Prerequisites] No need to use MLCube python environment - nox will be creating new environments for each test session installing all required dependencies. Only nox package needs to be installed. In addition, python versions specified in this file or on a command line needs to be discoverable by NOX. One option is to ensure they are all in `PATH` environment variable. [Example NOX commands] ```bash nox --list # List all available test sessions. nox -t unit # Run all unit tests for all python versions. nox -t unit -p 3.10 # Run all unit tests for python 3.10. nox # Run all default test sessions (see below for more details). ``` [Default sessions] Only three test suits are executed by default - `mlcube_unit`, `runner_unit` and `test_versions`. All other test sessions need to be explicitly specified on a command line. [Environment variables] - `MLCUBE_PYTHON_VERSIONS`: Comma-separated list of python versions to run nox sessions with (e.g., "3.8,3.9,3.10").
- Loading branch information