Skip to content
Snippets Groups Projects
Commit b62736b6 authored by Peter Lünenschloß's avatar Peter Lünenschloß
Browse files

Merge branch 'develop' into numbaRiddance

parents 424f9689 a9860303
No related branches found
No related tags found
1 merge request!703Numba riddance
This commit is part of merge request !703. Comments created here will be created in the context of that merge request.
......@@ -134,12 +134,39 @@ doctest:
# Building stage
# ===========================================================
# check if we are able to build a wheel
wheel:
# and if the import works
wheel38:
stage: build
image: python:3.8
script:
- pip install wheel
- pip wheel .
- pip install .
- python -c 'import saqc; print(f"{saqc.__version__=}")'
wheel39:
stage: build
image: python:3.9
script:
- pip install wheel
- pip wheel .
- pip install .
- python -c 'import saqc; print(f"{saqc.__version__=}")'
wheel310:
stage: build
image: python:3.10
script:
- pip install wheel
- pip wheel .
- pip install .
- python -c 'import saqc; print(f"{saqc.__version__=}")'
wheel311:
stage: build
image: python:3.11
script:
- pip install wheel
- pip wheel .
- pip install .
- python -c 'import saqc; print(f"{saqc.__version__=}")'
docs:
stage: build
......
......@@ -11,7 +11,9 @@ SPDX-License-Identifier: GPL-3.0-or-later
### Added
### Changed
### Removed
- removed deprecated `DictOfSeries.to_df`
### Fixed
### Deprecated
## [2.4.0](https://git.ufz.de/rdm-software/saqc/-/tags/v2.4.0) - 2023-04-25
[List of commits](https://git.ufz.de/rdm-software/saqc/-/compare/v2.3.0...v2.4.0)
......@@ -21,11 +23,8 @@ SPDX-License-Identifier: GPL-3.0-or-later
- Expose the `History` via `SaQC._history`
- Config function `cv` (coefficient of variation)
### Changed
- Deprecate `interpolate`, `linear` and `shift` in favor of `align`
- Deprecate `roll` in favor of `rolling`
- Rename `interplateInvalid` to `interpolate`
- Rename `interpolateIndex` to `align`
- Deprecate `flagMVScore` parameters: `partition` in favor of `window`, `partition_min` in favor of `min_periods`, `min_periods` in favor of `min_periods_r`
- Rewrite of `dios.DictOfSeries`
### Removed
- Parameter `limit` from `align`
......@@ -36,6 +35,11 @@ SPDX-License-Identifier: GPL-3.0-or-later
- `reample` was not writing meta entries
- `flagByStatLowPass` was overwriting existing flags
- `flagUniLOF` and `flagLOF` were overwriting existing flags
### Deprecated
- Deprecate `flagMVScore` parameters: `partition` in favor of `window`, `partition_min` in favor of `min_periods`, `min_periods` in favor of `min_periods_r`
- Deprecate `interpolate`, `linear` and `shift` in favor of `align`
- Deprecate `roll` in favor of `rolling`
- Deprecate `DictOfSeries.to_df` in favor of `DictOfSeries.to_pandas`
## [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)
......
......@@ -272,7 +272,7 @@ To see all the results obtained so far, plotted in one figure window, we make us
.. doctest:: exampleOD
>>> data.to_df().plot()
>>> data.to_pandas().plot()
<Axes...>
.. plot::
......@@ -281,7 +281,7 @@ To see all the results obtained so far, plotted in one figure window, we make us
:width: 80 %
:class: center
data.to_df().plot()
data.to_pandas().plot()
Residuals and Scores
......
......@@ -4,10 +4,8 @@
# -*- coding: utf-8 -*-
from __future__ import annotations
import warnings
from typing import Any, Hashable, Mapping
import numpy as np
import pandas as pd
from fancy_collections import DictOfPandas
......@@ -37,19 +35,6 @@ class DictOfSeries(DictOfPandas):
def attrs(self, value: Mapping[Hashable, Any]) -> None:
self._attrs = dict(value)
def to_df(self, how="outer") -> pd.DataFrame:
"""
Transform DictOfSeries to a pandas.DataFrame.
.. deprecated:: 2.4
use `DictOfSeries.to_pandas()` instead.
"""
warnings.warn(
f"`to_df()` is deprecated use `to_pandas()` instead.",
category=DeprecationWarning,
)
return self.to_pandas(how)
def flatten(self, promote_index: bool = False) -> DictOfSeries:
"""
Return a copy.
......@@ -57,16 +42,6 @@ class DictOfSeries(DictOfPandas):
"""
return self.copy()
def to_pandas(self, how="outer"):
# This is a future feature from fancy_collections.DictOfPandas
# wich probably will come in the next version 0.1.4.
# We adopt this early, to prevent a second refactoring.
# The docstring will be different, so we keep the
# dynamic docstring allocation, down below.
# If the feature is present we just need to delete the
# entire method here.
return self.to_dataframe(how)
def index_of(self, method="union") -> pd.Index:
"""Return an index with indices from all columns.
......@@ -194,8 +169,3 @@ or is dropped if `how='inner'`
a b c
1 11.0 22.0 33.0
"""
DictOfSeries.to_dataframe.__doc__ = DictOfSeries.to_pandas.__doc__.replace(
"to_pandas", "to_dataframe"
)
......@@ -212,7 +212,7 @@ class ToolsMixin:
"""
Plot data and flags or store plot to file.
There are two modes, 'interactive' and 'store', which are determind through the
There are two modes, 'interactive' and 'store', which are determined through the
``save_path`` keyword. In interactive mode (default) the plot is shown at runtime
and the program execution stops until the plot window is closed manually. In
store mode the generated plot is stored to disk and no manually interaction is
......
......@@ -39,7 +39,7 @@ setup(
"numpy",
"outlier-utils",
"pyarrow",
"pandas",
"pandas>=2.0.0",
"scikit-learn",
"scipy",
"typing_extensions",
......
#!/usr/bin/env python
# SPDX-FileCopyrightText: 2021 Helmholtz-Zentrum für Umweltforschung GmbH - UFZ
# SPDX-License-Identifier: GPL-3.0-or-later
#!/usr/bin/env python
# SPDX-FileCopyrightText: 2021 Helmholtz-Zentrum für Umweltforschung GmbH - UFZ
# SPDX-License-Identifier: GPL-3.0-or-later
from __future__ import annotations
import pickle
import pytest
from saqc import SaQC
from tests.common import checkInvariants, initData
@pytest.mark.parametrize("ncols", [4, 0])
def test_pickling(ncols):
"""Ensure that saqc and all its parts are pickleable"""
qc = SaQC(data=initData(ncols))
result = pickle.loads(pickle.dumps(qc))
assert isinstance(result, SaQC)
for k in qc.data.keys():
checkInvariants(qc._data, qc._flags, k)
......@@ -3,7 +3,7 @@
# SPDX-License-Identifier: GPL-3.0-or-later
beautifulsoup4==4.12.2
hypothesis==6.72.2
hypothesis==6.75.1
Markdown==3.4.3
pytest==7.3.1
pytest-lazy-fixture==0.6.3
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment