Skip to content

rundatatests

rundatatests

Module for data tests

Functions

run_datatests

run_datatests(config_file, data_folder)

Run data tests

Parameters:

  • config_file (str) –

    path to file with data test configuration

  • data_folder (str) –

    data to test

Source code in niceml/scripts/rundatatests.py
def run_datatests(config_file: str, data_folder: str):
    """
    Run data tests

    Args:
        config_file: path to file with data test configuration
        data_folder: data to test
    """
    with open(config_file, "r") as file:
        config = yaml.load(file, Loader=yaml.SafeLoader)

    test_process = config["tests"]
    test_process(data_folder, data_folder)

run_datatests_cmd

run_datatests_cmd(config_file, data_folder)

Command to run data tests

Source code in niceml/scripts/rundatatests.py
@click.command()
@click.argument("config_file")
@click.argument("data_folder")
def run_datatests_cmd(config_file: str, data_folder: str):
    """Command to run data tests"""
    run_datatests(config_file, data_folder)