Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nox-based tests. #362

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Jun 21, 2024

  1. Nox-based tests.

    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").
    sergey-serebryakov committed Jun 21, 2024
    Configuration menu
    Copy the full SHA
    4ddf153 View commit details
    Browse the repository at this point in the history