From 403f575f6c4befc587bf02d2eeb94de97bde1c42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dav=C3=ADd=20Brakenhoff?= Date: Fri, 22 Mar 2024 13:32:04 +0100 Subject: [PATCH 1/3] update traval --- pyproject.toml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7c2460e..a0db3bb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,7 +51,14 @@ ci = [ "pytest-dependency", "codacy-coverage", ] -docs = ["sphinx_rtd_theme", "Ipython", "ipykernel", "nbsphinx", "nbsphinx_link"] +docs = [ + "traval[ci]", + "sphinx_rtd_theme", + "Ipython", + "ipykernel", + "nbsphinx", + "nbsphinx_link", +] [tool.setuptools] packages = ["traval"] From cec2cccbaf6f8c557771fc54f3f9d121ed0f968f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dav=C3=ADd=20Brakenhoff?= Date: Fri, 22 Mar 2024 13:32:51 +0100 Subject: [PATCH 2/3] up version --- traval/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/traval/version.py b/traval/version.py index 6a9beea..3d26edf 100644 --- a/traval/version.py +++ b/traval/version.py @@ -1 +1 @@ -__version__ = "0.4.0" +__version__ = "0.4.1" From f6a664954f25519220ef22ce74ce5906857008de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dav=C3=ADd=20Brakenhoff?= Date: Fri, 22 Mar 2024 17:05:02 +0100 Subject: [PATCH 3/3] update offset to be kwarg in hardmax/min rules --- traval/rulelib.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/traval/rulelib.py b/traval/rulelib.py index 5e99de0..04024cb 100755 --- a/traval/rulelib.py +++ b/traval/rulelib.py @@ -77,12 +77,12 @@ def rule_max_gradient(series, max_step=0.5, max_timestep="1D"): return mask_corrections_as_nan(series, mask) -def rule_hardmax(series, threshold, offset): +def rule_hardmax(series, threshold, offset=0.0): """Detection rule, flag values greater than threshold value.""" return rule_ufunc_threshold(series, (np.greater,), threshold, offset=offset) -def rule_hardmin(series, threshold, offset): +def rule_hardmin(series, threshold, offset=0.0): """Detection rule, flag values lower than threshold value.""" return rule_ufunc_threshold(series, (np.less,), threshold, offset=offset)