Commit 1fde08ce authored by Jan Kiene's avatar Jan Kiene
Browse files

add workaround for category import not working sometimes

parent d290d0f2
Loading
Loading
Loading
Loading
+14 −4
Original line number Diff line number Diff line
@@ -26,10 +26,20 @@ BINS_FOR_MEASURES = {

DEFAULT_MEASURES = ["MAX_ABS_DIFF", "MLD", "MIN_SSNR", "MIN_ODG"]

HERE = pathlib.Path(__file__).parent
ROOT_DIR = HERE.parent
sys.path.append(str(ROOT_DIR))
from tests.constants import CAT_NORMAL, CAT_BITRATE_SWITCHING, CAT_DTX, CAT_JBM, CAT_PLC
### !!! Note: this is duplicated in tests/constatns.py. If you change this here, ALSO ADAPT IT THERE!!!
### (importing from there failed for unknown reasons in some jobs on some runners and I don't have time to properly investigate this...)
### below lines are the original solution, kept here for reference

# HERE = pathlib.Path(__file__).parent
# ROOT_DIR = HERE.parent
# sys.path.append(str(ROOT_DIR))
# from tests.constants import CAT_NORMAL, CAT_BITRATE_SWITCHING, CAT_DTX, CAT_JBM, CAT_PLC

CAT_NORMAL = "normal operation"
CAT_DTX = "DTX"
CAT_PLC = "PLC"
CAT_BITRATE_SWITCHING = "bitrate switching"
CAT_JBM = "JBM"

COLORS_FOR_CATEGORIES = {
    CAT_DTX: "tab:blue",
+2 −0
Original line number Diff line number Diff line
@@ -66,6 +66,8 @@ ENC_AUX_FILES = [
    ["vad_flag", np.int16, "fs/50"],
]

### !!! Note: this is duplicated in scripts/create_histogram.py. If you change this here, ALSO ADAPT IT THERE!!!
### (importing from here failed for unknown reasons in some jobs on some runners and I don't have time to properly investigate this...)
CAT_NORMAL = "normal operation"
CAT_DTX = "DTX"
CAT_PLC = "PLC"