From 017d4d7264e0a1f1c1938d9f7e6f4814855b1b3f Mon Sep 17 00:00:00 2001 From: veenstrajelmer Date: Tue, 8 Oct 2024 16:28:27 +0200 Subject: [PATCH] reverted formatting --- tests/test_tidalindicators.py | 224 +++++----------------------------- 1 file changed, 32 insertions(+), 192 deletions(-) diff --git a/tests/test_tidalindicators.py b/tests/test_tidalindicators.py index 05e1a68..a6e46dc 100644 --- a/tests/test_tidalindicators.py +++ b/tests/test_tidalindicators.py @@ -90,70 +90,21 @@ def test_calc_wltidalindicators(df_meas_2010_2014): wl_mean_peryear_expected = np.array( [0.07960731, 0.08612119, 0.0853051, 0.07010864, 0.10051922] ) - wl_mean_permonth_expected = np.array( - [ - -0.00227151, - 0.089313, - 0.04443996, - -0.03440509, - -0.00206317, - 0.04431481, - 0.03877688, - 0.18267697, - 0.13494907, - 0.18367832, - 0.15928009, - 0.11707661, - 0.1087836, - 0.02535962, - -0.09558468, - -0.0255162, - -0.00076165, - 0.05667361, - 0.11056228, - 0.13890681, - 0.1495, - 0.11866711, - 0.07253009, - 0.36550851, - 0.22046819, - -0.10208094, - -0.07221102, - 0.02279167, - 0.02424507, - 0.05409954, - 0.09238127, - 0.08972894, - 0.15472222, - 0.16913082, - 0.19712963, - 0.1639897, - 0.05744176, - -0.0134375, - -0.10685036, - -0.00822222, - 0.05911066, - 0.019875, - 0.02540995, - 0.07570565, - 0.12776389, - 0.17321909, - 0.23108102, - 0.19502688, - 0.06281138, - 0.08588046, - -0.00553763, - 0.03490278, - 0.03113575, - 0.03134954, - 0.10553763, - 0.16540771, - 0.12535648, - 0.20802195, - 0.10014352, - 0.25624552, - ] - ) + # fmt: off + wl_mean_permonth_expected = np.array([ + -0.00227151, 0.089313 , 0.04443996, -0.03440509, -0.00206317, + 0.04431481, 0.03877688, 0.18267697, 0.13494907, 0.18367832, + 0.15928009, 0.11707661, 0.1087836 , 0.02535962, -0.09558468, + -0.0255162 , -0.00076165, 0.05667361, 0.11056228, 0.13890681, + 0.1495 , 0.11866711, 0.07253009, 0.36550851, 0.22046819, + -0.10208094, -0.07221102, 0.02279167, 0.02424507, 0.05409954, + 0.09238127, 0.08972894, 0.15472222, 0.16913082, 0.19712963, + 0.1639897 , 0.05744176, -0.0134375 , -0.10685036, -0.00822222, + 0.05911066, 0.019875 , 0.02540995, 0.07570565, 0.12776389, + 0.17321909, 0.23108102, 0.19502688, 0.06281138, 0.08588046, + -0.00553763, 0.03490278, 0.03113575, 0.03134954, 0.10553763, + 0.16540771, 0.12535648, 0.20802195, 0.10014352, 0.25624552]) + # fmt: on assert np.allclose(wl_stats["wl_mean_peryear"].values, wl_mean_peryear_expected) assert np.allclose(wl_stats["wl_mean_permonth"].values, wl_mean_permonth_expected) @@ -285,134 +236,23 @@ def test_calc_wltidalindicators_ext(df_ext_12_2010_2014): assert np.allclose(ext_stats["HW_mean_peryear"].values, hw_mean_peryear_expected) assert np.allclose(ext_stats["LW_mean_peryear"].values, lw_mean_peryear_expected) - hw_monthmax_permonth_expected = np.array( - [ - 1.94, - 1.89, - 1.86, - 1.55, - 1.74, - 1.58, - 1.54, - 2.07, - 2.11, - 2.06, - 1.9, - 1.75, - 1.69, - 1.82, - 1.49, - 1.39, - 1.4, - 1.71, - 1.72, - 1.66, - 1.69, - 1.59, - 2.03, - 2.47, - 2.31, - 1.63, - 1.64, - 1.61, - 1.44, - 1.51, - 1.52, - 1.87, - 1.71, - 1.72, - 1.86, - 2.07, - 1.87, - 1.83, - 1.53, - 1.51, - 1.62, - 1.53, - 1.52, - 1.41, - 2.08, - 1.98, - 2.07, - 3.03, - 1.76, - 1.82, - 1.61, - 1.73, - 1.48, - 1.48, - 1.62, - 1.71, - 1.58, - 2.77, - 1.6, - 1.92, - ] - ) - lw_monthmin_permonth_expected = np.array( - [ - -1.33, - -1.05, - -1.05, - -1.06, - -1.12, - -1.11, - -1.07, - -0.92, - -0.96, - -0.99, - -1.01, - -1.08, - -1.16, - -1.17, - -1.21, - -0.98, - -1.1, - -0.98, - -0.97, - -0.94, - -1.04, - -1.22, - -0.94, - -1.21, - -1.22, - -1.32, - -1.22, - -1.04, - -1.18, - -0.95, - -1.05, - -1.0, - -0.9, - -0.81, - -1.03, - -1.21, - -1.11, - -1.65, - -1.37, - -1.11, - -1.11, - -1.05, - -0.98, - -1.07, - -0.88, - -1.05, - -1.15, - -1.07, - -1.32, - -1.31, - -1.21, - -1.08, - -1.0, - -1.03, - -1.07, - -0.83, - -0.98, - -0.97, - -0.99, - -1.3, - ] - ) + # fmt: off + hw_monthmax_permonth_expected = np.array([ + 1.94, 1.89, 1.86, 1.55, 1.74, 1.58, 1.54, 2.07, 2.11, 2.06, 1.9 , + 1.75, 1.69, 1.82, 1.49, 1.39, 1.4 , 1.71, 1.72, 1.66, 1.69, 1.59, + 2.03, 2.47, 2.31, 1.63, 1.64, 1.61, 1.44, 1.51, 1.52, 1.87, 1.71, + 1.72, 1.86, 2.07, 1.87, 1.83, 1.53, 1.51, 1.62, 1.53, 1.52, 1.41, + 2.08, 1.98, 2.07, 3.03, 1.76, 1.82, 1.61, 1.73, 1.48, 1.48, 1.62, + 1.71, 1.58, 2.77, 1.6 , 1.92]) + lw_monthmin_permonth_expected = np.array([ + -1.33, -1.05, -1.05, -1.06, -1.12, -1.11, -1.07, -0.92, -0.96, + -0.99, -1.01, -1.08, -1.16, -1.17, -1.21, -0.98, -1.1 , -0.98, + -0.97, -0.94, -1.04, -1.22, -0.94, -1.21, -1.22, -1.32, -1.22, + -1.04, -1.18, -0.95, -1.05, -1. , -0.9 , -0.81, -1.03, -1.21, + -1.11, -1.65, -1.37, -1.11, -1.11, -1.05, -0.98, -1.07, -0.88, + -1.05, -1.15, -1.07, -1.32, -1.31, -1.21, -1.08, -1. , -1.03, + -1.07, -0.83, -0.98, -0.97, -0.99, -1.3 ]) + # fmt: on assert np.allclose( ext_stats["HW_monthmax_permonth"].values, hw_monthmax_permonth_expected )