From 5ee71f6e402c1ebe4b40fc7657b298e92b553140 Mon Sep 17 00:00:00 2001 From: Philipp Grete Date: Wed, 4 Sep 2024 21:02:37 +0200 Subject: [PATCH] Fix typo --- .../aniso_therm_cond_gauss_conv.py | 2 +- .../aniso_therm_cond_ring_conv.py | 3 +-- .../aniso_therm_cond_ring_multid.py | 3 +-- tst/regression/test_suites/cluster_hse/cluster_hse.py | 4 +++- .../cluster_tabular_cooling/cluster_tabular_cooling.py | 4 ++-- tst/regression/test_suites/riemann_hydro/riemann_hydro.py | 3 +-- tst/regression/test_suites/turbulence/turbulence.py | 6 ++---- 7 files changed, 11 insertions(+), 14 deletions(-) diff --git a/tst/regression/test_suites/aniso_therm_cond_gauss_conv/aniso_therm_cond_gauss_conv.py b/tst/regression/test_suites/aniso_therm_cond_gauss_conv/aniso_therm_cond_gauss_conv.py index ebae752a..8e873d17 100644 --- a/tst/regression/test_suites/aniso_therm_cond_gauss_conv/aniso_therm_cond_gauss_conv.py +++ b/tst/regression/test_suites/aniso_therm_cond_gauss_conv/aniso_therm_cond_gauss_conv.py @@ -141,7 +141,7 @@ def get_ref(x, Bx, field_cfg): mask = yy == yy[0] # Flatten=true (default) is currently (Sep 24) broken so we manually flatten components = data_file.GetComponents( - data.Info["ComponentNames"], flatten=False + data_file.Info["ComponentNames"], flatten=False ) temp = components["prim_pressure"].ravel()[ mask diff --git a/tst/regression/test_suites/aniso_therm_cond_ring_conv/aniso_therm_cond_ring_conv.py b/tst/regression/test_suites/aniso_therm_cond_ring_conv/aniso_therm_cond_ring_conv.py index 1b6ecf7a..ba13129e 100644 --- a/tst/regression/test_suites/aniso_therm_cond_ring_conv/aniso_therm_cond_ring_conv.py +++ b/tst/regression/test_suites/aniso_therm_cond_ring_conv/aniso_therm_cond_ring_conv.py @@ -35,7 +35,6 @@ class TestCase(utils.test_case.TestCaseAbs): def Prepare(self, parameters, step): - assert parameters.num_ranks <= 4, "Use <= 4 ranks for diffusion test." res = res_cfgs[step - 1] @@ -80,7 +79,7 @@ def Analyse(self, parameters): data_file = phdf.phdf(data_filename) # Flatten=true (default) is currently (Sep 24) broken so we manually flatten components = data_file.GetComponents( - data.Info["ComponentNames"], flatten=False + data_file.Info["ComponentNames"], flatten=False ) T = components[ "prim_pressure" diff --git a/tst/regression/test_suites/aniso_therm_cond_ring_multid/aniso_therm_cond_ring_multid.py b/tst/regression/test_suites/aniso_therm_cond_ring_multid/aniso_therm_cond_ring_multid.py index d6583f55..3f933507 100644 --- a/tst/regression/test_suites/aniso_therm_cond_ring_multid/aniso_therm_cond_ring_multid.py +++ b/tst/regression/test_suites/aniso_therm_cond_ring_multid/aniso_therm_cond_ring_multid.py @@ -35,7 +35,6 @@ class TestCase(utils.test_case.TestCaseAbs): def Prepare(self, parameters, step): - assert parameters.num_ranks <= 4, "Use <= 4 ranks for diffusion test." # 2D reference case again @@ -112,7 +111,7 @@ def Analyse(self, parameters): data_file = phdf.phdf(data_filename) # Flatten=true (default) is currently (Sep 24) broken so we manually flatten components = data_file.GetComponents( - data.Info["ComponentNames"], flatten=False + data_file.Info["ComponentNames"], flatten=False ) T = components[ "prim_pressure" diff --git a/tst/regression/test_suites/cluster_hse/cluster_hse.py b/tst/regression/test_suites/cluster_hse/cluster_hse.py index 8e9b1cf9..1a26af4c 100644 --- a/tst/regression/test_suites/cluster_hse/cluster_hse.py +++ b/tst/regression/test_suites/cluster_hse/cluster_hse.py @@ -212,7 +212,9 @@ def AnalyseInitPert(self, parameters): cell_vol = cell_vol.ravel() # Flatten=true (default) is currently (Sep 24) broken so we manually flatten - components = data_file.GetComponents(data.Info["ComponentNames"], flatten=False) + components = data_file.GetComponents( + data_file.Info["ComponentNames"], flatten=False + ) rho = components["prim_density"].ravel() vx = components["prim_velocity_1"].ravel() vy = components["prim_velocity_2"].ravel() diff --git a/tst/regression/test_suites/cluster_tabular_cooling/cluster_tabular_cooling.py b/tst/regression/test_suites/cluster_tabular_cooling/cluster_tabular_cooling.py index b1273482..77a8cfeb 100644 --- a/tst/regression/test_suites/cluster_tabular_cooling/cluster_tabular_cooling.py +++ b/tst/regression/test_suites/cluster_tabular_cooling/cluster_tabular_cooling.py @@ -312,7 +312,7 @@ def zero_corrected_linf_err(gold, test): data_file = phdf.phdf(data_filename) # Flatten=true (default) is currently (Sep 24) broken so we manually flatten components = data_file.GetComponents( - data.Info["ComponentNames"], flatten=False + data_file.Info["ComponentNames"], flatten=False ) rho = unyt.unyt_array( @@ -363,7 +363,7 @@ def zero_corrected_linf_err(gold, test): data_file = phdf.phdf(data_filename) # Flatten=true (default) is currently (Sep 24) broken so we manually flatten components = data_file.GetComponents( - data.Info["ComponentNames"], flatten=False + data_file.Info["ComponentNames"], flatten=False ) rho = unyt.unyt_array( diff --git a/tst/regression/test_suites/riemann_hydro/riemann_hydro.py b/tst/regression/test_suites/riemann_hydro/riemann_hydro.py index cc3e05d0..1a926371 100644 --- a/tst/regression/test_suites/riemann_hydro/riemann_hydro.py +++ b/tst/regression/test_suites/riemann_hydro/riemann_hydro.py @@ -58,7 +58,6 @@ class TestCase(utils.test_case.TestCaseAbs): def Prepare(self, parameters, step): - method, init_cond = all_cfgs[step - 1] nx1 = method["nx1"] @@ -128,7 +127,7 @@ def Analyse(self, parameters): data_file = phdf.phdf(data_filename) # Flatten=true (default) is currently (Sep 24) broken so we manually flatten components = data_file.GetComponents( - data.Info["ComponentNames"], flatten=False + data_file.Info["ComponentNames"], flatten=False ) rho = components["prim_density"].ravel() vx = components["prim_velocity_1"].ravel() diff --git a/tst/regression/test_suites/turbulence/turbulence.py b/tst/regression/test_suites/turbulence/turbulence.py index 154ba3d4..c5a492a1 100644 --- a/tst/regression/test_suites/turbulence/turbulence.py +++ b/tst/regression/test_suites/turbulence/turbulence.py @@ -22,7 +22,6 @@ class TestCase(utils.test_case.TestCaseAbs): def Prepare(self, parameters, step): - parameters.driver_cmd_line_args = [ "parthenon/output2/dt=-1", "parthenon/output3/dt=-1", @@ -31,7 +30,6 @@ def Prepare(self, parameters, step): return parameters def Analyse(self, parameters): - sys.path.insert( 1, parameters.parthenon_path @@ -45,12 +43,12 @@ def Analyse(self, parameters): # Check Ms if not (data[-1, -3] > 0.45 and data[-1, -3] < 0.50): - print("ERROR: Mismatch in Ms") + print(f"ERROR: Mismatch in Ms={data[-1, -3]}") success = False # Check Ma if not (data[-1, -2] > 12.8 and data[-1, -2] < 13.6): - print("ERROR: Mismatch in Ma") + print(f"ERROR: Mismatch in Ma={data[-1, -2]}") success = False return success