Skip to content

Commit

Permalink
fix(test): remove commented, refactored debiased tests
Browse files Browse the repository at this point in the history
  • Loading branch information
spool committed Jan 26, 2024
1 parent ef05e11 commit bd3efad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 112 deletions.
112 changes: 0 additions & 112 deletions python/debiasing/debias_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -606,115 +606,3 @@ def to_cli_run_cmethods_str(
processors=processors,
)
)


# @pytest.mark.server
# @pytest.mark.slow
# @pytest.mark.parametrize(
#
# "city, variable, run, method, calib_start, calib_end, valid_start, valid_end",
# (
# (
# CityOptions.GLASGOW,
# VariableOptions.TASMAX,
# RunOptions.FIVE,
# MethodOptions.QUANTILE_DELTA_MAPPING,
# date(1980, 12, 1),
# date(2010, 11, 29),
# date(2010, 11, 30),
# date(2020, 11, 30),
# ),
# (
# CityOptions.GLASGOW,
# VariableOptions.TASMAX,
# RunOptions.FIVE,
# MethodOptions.DELTA_METHOD,
# date(1980, 12, 1),
# date(2010, 11, 29),
# date(2010, 11, 30),
# date(2020, 11, 30),
# ),
# (
# CityOptions.GLASGOW,
# VariableOptions.TASMAX,
# RunOptions.FIVE,
# MethodOptions.QUANTILE_MAPPING,
# date(1980, 12, 1),
# date(2010, 11, 29),
# date(2010, 11, 30),
# date(2020, 11, 30),
# ),
# (
# CityOptions.GLASGOW,
# VariableOptions.TASMAX,
# RunOptions.FIVE,
# MethodOptions.VARIANCE_SCALING,
# date(1980, 12, 1),
# date(2010, 11, 29),
# date(2010, 11, 30),
# date(2020, 11, 30),
# ),
# (
# CityOptions.GLASGOW,
# VariableOptions.TASMAX,
# RunOptions.SIX,
# MethodOptions.QUANTILE_DELTA_MAPPING,
# date(1980, 12, 1),
# date(2010, 11, 29),
# date(2010, 11, 30),
# date(2020, 11, 30),
# ),
# (
# CityOptions.GLASGOW,
# VariableOptions.TASMAX,
# RunOptions.SIX,
# MethodOptions.DELTA_METHOD,
# date(1980, 12, 1),
# date(2010, 11, 29),
# date(2010, 11, 30),
# date(2020, 11, 30),
# ),
# (
# CityOptions.GLASGOW,
# VariableOptions.TASMAX,
# RunOptions.SIX,
# MethodOptions.QUANTILE_MAPPING,
# date(1980, 12, 1),
# date(2010, 11, 29),
# date(2010, 11, 30),
# date(2020, 11, 30),
# ),
# (
# CityOptions.GLASGOW,
# VariableOptions.TASMAX,
# RunOptions.SIX,
# MethodOptions.VARIANCE_SCALING,
# date(1980, 12, 1),
# date(2010, 11, 29),
# date(2010, 11, 30),
# date(2020, 11, 30),
# ),
# ),
# )
# def test_run_workshop(run_config, city, variable, run, method, calib_start, calib_end, valid_start, valid_end) -> None:
# """Test running generated command script via a subprocess."""
# initial_folder: Path = Path().resolve()
# chdir(run_config.command_path)
# assert PREPROCESS_FILE_NAME in tuple(Path().iterdir())
# preprocess_run: subprocess.CompletedProcess = subprocess.run(
# run_config.to_cli_preprocess_tuple_strs(city=city, variable=variable, run=run, calib_start=calib_start, calib_end=calib_end, valid_start=valid_start, valid_end=valid_end),
# capture_output=True,
# text=True,
# )
# assert preprocess_run.returncode == 0
# cmethods_run: subprocess.CompletedProcess = subprocess.run(
# run_config.to_cli_run_cmethods_tuple_strs(
# city=city, run=run, variable=variable, method=method
# ),
# capture_output=True,
# text=True,
# )
# assert cmethods_run.returncode == 0
#
# chdir(initial_folder)
# assert False
2 changes: 2 additions & 0 deletions python/tests/test_debiasing.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ def test_run(run_config, city, variable, run, method) -> None:
assert cmethods_run.returncode == 0
for log_txt in (
"Loading modelled calibration data (CPM)",
# Todo: uncomment in future to check new paths
# (
# f"Debiased/three.cities.cropped/{city}/{run}/{variable}/"
# f"debiased_{method}_result_var"
Expand All @@ -121,6 +122,7 @@ def test_run(run_config, city, variable, run, method) -> None:
f"debiased_{method}_result_var"
),
"Saving to",
# Todo: uncomment in future to check new paths
# (
# f"Saving to {DATA_PATH_DEFAULT}/{city}/{run}/{variable}/"
# f"debiased_{method}_result_var-{variable}_kind-+None_20100101_20101229.nc"
Expand Down

0 comments on commit bd3efad

Please sign in to comment.