diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 01bc9ebc57390a5b46ccd2c3f9dd1780e5cb6160..bc244d486167c9d7a6dc69c3b963f695260b5652 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -29,7 +29,7 @@ jobs: fail-fast: false matrix: os: ["windows-latest", "ubuntu-latest", "macos-latest"] - python-version: ["3.7", "3.8", "3.9", "3.10"] + python-version: ["3.8", "3.9", "3.10"] defaults: run: # somehow this also works for windows O.o ?? diff --git a/CHANGELOG.md b/CHANGELOG.md index 4baa4b8323aa502653e7cfeac2bbec66f5e0afaa..f7334504d8b6fb9a51dfaaf45b0c33007073bbad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,14 @@ SPDX-License-Identifier: GPL-3.0-or-later # Changelog ## Unreleased -[List of commits](https://git.ufz.de/rdm-software/saqc/-/compare/v2.2.1...develop) +[List of commits](https://git.ufz.de/rdm-software/saqc/-/compare/v2.3.0...develop) +### Added +### Changed +### Removed +### Fixed + +## [2.3.0](https://git.ufz.de/rdm-software/saqc/-/tags/v2.3.0) - 2023-01-17 +[List of commits](https://git.ufz.de/rdm-software/saqc/-/compare/v2.2.1...v2.3.0) ### Added - add option to not overwrite existing flags to `concatFlags` - add option to pass existing axis object to `plot` @@ -18,6 +25,7 @@ SPDX-License-Identifier: GPL-3.0-or-later - Renamed `TranslationScheme.backward` to `TranslationScheme.toExternal` - Changed default value of the parameter `limit` for `SaQC.interpolateIndex` and `SaQC.interpolateInvalid` to ``None`` - Changed default value of the parameter ``overwrite`` for ``concatFlags`` to ``False`` +- Deprecate ``transferFlags`` in favor of ``concatFlags`` ### Removed - python 3.7 support ### Fixed diff --git a/saqc/funcs/flagtools.py b/saqc/funcs/flagtools.py index d253dc8ffaa12eaceb8f90af35f65c764a88b0cf..80420a1cdd18ac939a7981a0cda961219e263b3a 100644 --- a/saqc/funcs/flagtools.py +++ b/saqc/funcs/flagtools.py @@ -396,7 +396,15 @@ class FlagtoolsMixin: 0 -inf -inf -inf 1 255.0 255.0 255.0 """ - + import warnings + + warnings.warn( + f"""The method 'transferFlags' is deprecated and + will be removed in version 2.5 of SaQC. Please use + 'SaQC.concatFlags(field={field}, target={target}, method="match", squeeze=False)' + instead""", + DeprecationWarning, + ) return self.concatFlags(field, target=target, method="match", squeeze=False) @flagging() diff --git a/saqc/funcs/tools.py b/saqc/funcs/tools.py index 87ad8ec3e7ba078f9678fe17a639df9420e2a736..9888bb1ff43b98b84627fd7f51170b676bba2267 100644 --- a/saqc/funcs/tools.py +++ b/saqc/funcs/tools.py @@ -327,7 +327,7 @@ class ToolsMixin: ax_kwargs=ax_kwargs, ) - if ax is None: + if ax is None and not path: plt.show() if path: diff --git a/saqc/version.py b/saqc/version.py index 3fc91745645de82dd25ce9f476c8eee8b550ba2e..c6bcb9ba1c43f4e3712d66a61aec0dfce5187bb3 100644 --- a/saqc/version.py +++ b/saqc/version.py @@ -4,4 +4,4 @@ # # SPDX-License-Identifier: GPL-3.0-or-later -__version__ = "2.2.1" +__version__ = "2.3" diff --git a/tests/funcs/test_functions.py b/tests/funcs/test_functions.py index 4ef82002ab488b0322ba50f531fcc03063a38231..53c13a6deac9909b23ae0c85b591fa6a7aa301e8 100644 --- a/tests/funcs/test_functions.py +++ b/tests/funcs/test_functions.py @@ -286,9 +286,10 @@ def test_transferFlags(): data = pd.DataFrame({"a": [1, 2], "b": [1, 2], "c": [1, 2]}) qc = saqc.SaQC(data) qc = qc.flagRange("a", max=1.5) - qc = qc.transferFlags(["a", "a"], ["b", "c"]) - assert np.all(qc.flags["b"].values == np.array([UNFLAGGED, BAD])) - assert np.all(qc.flags["c"].values == np.array([UNFLAGGED, BAD])) + with pytest.deprecated_call(): + qc = qc.transferFlags(["a", "a"], ["b", "c"]) + assert np.all(qc.flags["b"].values == np.array([UNFLAGGED, BAD])) + assert np.all(qc.flags["c"].values == np.array([UNFLAGGED, BAD])) def test_flagJumps():