Loading experiments/create_experiment_config.py +4 −4 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ def _patch_value(line: str, value) -> str: return ':'.join(line_split) def create_experiment_setup(experiment, lab) -> list[str]: def create_experiment_setup(experiment, lab) -> list[Path]: default_cfg_path = HERE.joinpath(f"selection/{experiment}/config/{experiment}.yml") with open(default_cfg_path) as f: Loading Loading @@ -68,9 +68,9 @@ def create_experiment_setup(experiment, lab) -> list[str]: output_path.mkdir(parents=True, exist_ok=True) bg_noise_path.parent.mkdir(parents=True, exist_ok=True) cfgs.append(cat_cfg) cfgs.append(cfg_path) # Return the lsit of configs that were generated. Not strictly necessary, but makes testing easier. # Return the list of configs that were generated. Not strictly necessary, but makes testing easier. return cfgs Loading tests/test_experiments.py +3 −4 Original line number Diff line number Diff line Loading @@ -36,7 +36,6 @@ from pathlib import Path import pytest from numpy.random import random, seed from create_items_p800 import create_items from ivas_processing_scripts import main as generate_test from ivas_processing_scripts.audiotools import audio from ivas_processing_scripts.audiotools.audiofile import concat, write Loading @@ -49,7 +48,7 @@ from tests.constants import ( NCHAN_TO_FILE, TESTS_DIR, ) from experiments import create_experiment_config from experiments import create_experiment_config, create_items_p800 BG_NOISE_NAME = "background_noise_cat.wav" Loading Loading @@ -132,7 +131,7 @@ def test_categories(exp_name): setup_input_files_for_config(config, cat) create_items(exp_name) create_items_p800.create_items(exp_name) @pytest.mark.parametrize("exp_name", ["P800-1"]) Loading Loading
experiments/create_experiment_config.py +4 −4 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ def _patch_value(line: str, value) -> str: return ':'.join(line_split) def create_experiment_setup(experiment, lab) -> list[str]: def create_experiment_setup(experiment, lab) -> list[Path]: default_cfg_path = HERE.joinpath(f"selection/{experiment}/config/{experiment}.yml") with open(default_cfg_path) as f: Loading Loading @@ -68,9 +68,9 @@ def create_experiment_setup(experiment, lab) -> list[str]: output_path.mkdir(parents=True, exist_ok=True) bg_noise_path.parent.mkdir(parents=True, exist_ok=True) cfgs.append(cat_cfg) cfgs.append(cfg_path) # Return the lsit of configs that were generated. Not strictly necessary, but makes testing easier. # Return the list of configs that were generated. Not strictly necessary, but makes testing easier. return cfgs Loading
tests/test_experiments.py +3 −4 Original line number Diff line number Diff line Loading @@ -36,7 +36,6 @@ from pathlib import Path import pytest from numpy.random import random, seed from create_items_p800 import create_items from ivas_processing_scripts import main as generate_test from ivas_processing_scripts.audiotools import audio from ivas_processing_scripts.audiotools.audiofile import concat, write Loading @@ -49,7 +48,7 @@ from tests.constants import ( NCHAN_TO_FILE, TESTS_DIR, ) from experiments import create_experiment_config from experiments import create_experiment_config, create_items_p800 BG_NOISE_NAME = "background_noise_cat.wav" Loading Loading @@ -132,7 +131,7 @@ def test_categories(exp_name): setup_input_files_for_config(config, cat) create_items(exp_name) create_items_p800.create_items(exp_name) @pytest.mark.parametrize("exp_name", ["P800-1"]) Loading