Commit 20ac983d authored by Anika Treffehn's avatar Anika Treffehn
Browse files

small change to use python 3.9

parent 7b90aa4d
Loading
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
#! /usr/bin/env python3
import argparse
import sys
from pathlib import Path

import sys
HERE = Path(__file__).parent.absolute().resolve()
sys.path.append(str(HERE.parent))
from ivas_processing_scripts import config


EXPERIMENTS_P800 = [f"P800-{i}" for i in range(1, 10)]
EXPERIMENTS_BS1534 = [f"BS1534-{i}{x}" for i in range(1, 8) for x in ["a", "b"]]
EXPERIMENTS = EXPERIMENTS_P800 + EXPERIMENTS_BS1534
+1 −1
Original line number Diff line number Diff line
#! /usr/bin/env python3
import argparse
import sys
from pathlib import Path

import sys
HERE = Path(__file__).parent.absolute()
sys.path.append(str(HERE.parent))
from ivas_processing_scripts import main as generate_test
+2 −1
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@
import platform
from copy import deepcopy
from pathlib import Path
from typing import Union

import yaml

@@ -133,7 +134,7 @@ class TestConfig:

        return cfg

    def to_file(self, outfile: str|Path):
    def to_file(self, outfile: Union[str, Path]):
        to_dump = self._dump_yaml({k:v for k, v in self.__dict__.items() if k in self._dump_keys})
        with open(outfile, "w") as f:
            yaml.dump(to_dump, f)
+1 −1
Original line number Diff line number Diff line
@@ -30,8 +30,8 @@
#  the United Nations Convention on Contracts on the International Sales of Goods.
#

from pathlib import PurePath
from itertools import cycle
from pathlib import PurePath

""" Set up paths """
TESTS_DIR = PurePath(__file__).parent
+2 −2
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ from pathlib import Path
import pytest
from numpy.random import random, seed

from experiments import create_experiment_config, create_items_p800
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
@@ -45,11 +46,10 @@ from tests.constants import (
    EXPERIMENTS_DIR,
    FORMAT_TO_METADATA_FILES,
    INPUT_EXPERIMENT_NAMES,
    NCHAN_TO_FILE,
    LAB_IDS_FOR_EXPERIMENTS,
    NCHAN_TO_FILE,
    TESTS_DIR,
)
from experiments import create_experiment_config, create_items_p800

BG_NOISE_NAME = "background_noise_cat.wav"