pthelma 2.0.0__tar.gz → 2.1.0__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {pthelma-2.0.0 → pthelma-2.1.0}/.github/workflows/run-tests.yml +1 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/CHANGELOG.rst +8 -0
- {pthelma-2.0.0/src/pthelma.egg-info → pthelma-2.1.0}/PKG-INFO +2 -2
- {pthelma-2.0.0 → pthelma-2.1.0}/docs/haggregate/api.rst +8 -1
- {pthelma-2.0.0 → pthelma-2.1.0}/docs/haggregate/usage.rst +3 -2
- {pthelma-2.0.0 → pthelma-2.1.0}/src/haggregate/haggregate.py +2 -2
- {pthelma-2.0.0 → pthelma-2.1.0}/src/haggregate/regularize.c +123 -123
- {pthelma-2.0.0 → pthelma-2.1.0}/src/pthelma/_version.py +2 -2
- {pthelma-2.0.0 → pthelma-2.1.0/src/pthelma.egg-info}/PKG-INFO +2 -2
- {pthelma-2.0.0 → pthelma-2.1.0}/src/rocc/calculation.c +123 -123
- {pthelma-2.0.0 → pthelma-2.1.0}/tests/haggregate/test_haggregate.py +19 -1
- {pthelma-2.0.0 → pthelma-2.1.0}/.github/workflows/build_wheels.yml +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/.gitignore +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/.readthedocs.yaml +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/GPL-3 +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/LICENSE.rst +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/MANIFEST.in +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/README.rst +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/docs/Makefile +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/docs/changelog.rst +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/docs/conf.py +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/docs/enhydris_api_client.rst +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/docs/enhydris_cache/api.rst +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/docs/enhydris_cache/usage.rst +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/docs/evaporation/api.rst +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/docs/evaporation/usage.rst +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/docs/hspatial/api.rst +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/docs/hspatial/testutils.rst +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/docs/hspatial/usage.rst +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/docs/htimeseries.rst +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/docs/index.rst +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/docs/install.rst +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/docs/license.rst +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/docs/requirements.txt +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/docs/rocc.rst +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/pyproject.toml +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/setup.cfg +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/setup.py +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/src/enhydris_api_client/__init__.py +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/src/enhydris_cache/__init__.py +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/src/enhydris_cache/cli.py +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/src/enhydris_cache/enhydris_cache.py +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/src/evaporation/__init__.py +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/src/evaporation/cli.py +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/src/evaporation/evaporation.py +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/src/haggregate/__init__.py +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/src/haggregate/cli.py +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/src/haggregate/regularize.pyx +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/src/hspatial/__init__.py +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/src/hspatial/cli.py +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/src/hspatial/hspatial.py +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/src/hspatial/test.py +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/src/htimeseries/__init__.py +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/src/htimeseries/htimeseries.py +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/src/htimeseries/timezone_utils.py +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/src/pthelma/__init__.py +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/src/pthelma.egg-info/SOURCES.txt +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/src/pthelma.egg-info/dependency_links.txt +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/src/pthelma.egg-info/entry_points.txt +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/src/pthelma.egg-info/requires.txt +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/src/pthelma.egg-info/top_level.txt +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/src/rocc/__init__.py +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/src/rocc/calculation.pyx +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/tests/__init__.py +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/tests/enhydris_api_client/__init__.py +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/tests/enhydris_api_client/test_e2e.py +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/tests/enhydris_api_client/test_misc.py +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/tests/enhydris_api_client/test_station.py +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/tests/enhydris_api_client/test_timeseries.py +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/tests/enhydris_api_client/test_timeseriesgroup.py +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/tests/enhydris_api_client/test_tsdata.py +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/tests/enhydris_cache/__init__.py +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/tests/enhydris_cache/test_cli.py +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/tests/enhydris_cache/test_enhydris_cache.py +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/tests/evaporation/__init__.py +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/tests/evaporation/test_cli.py +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/tests/evaporation/test_evaporation.py +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/tests/haggregate/__init__.py +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/tests/haggregate/test_cli.py +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/tests/haggregate/test_regularize.py +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/tests/hspatial/__init__.py +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/tests/hspatial/test_cli.py +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/tests/hspatial/test_hspatial.py +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/tests/htimeseries/__init__.py +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/tests/htimeseries/test_htimeseries.py +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/tests/htimeseries/test_timezone_utils.py +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/tests/rocc/__init__.py +0 -0
- {pthelma-2.0.0 → pthelma-2.1.0}/tests/rocc/test_rocc.py +0 -0
@@ -2,6 +2,14 @@
|
|
2
2
|
Changelog
|
3
3
|
=========
|
4
4
|
|
5
|
+
|
6
|
+
2.1.0 (2025-01-10)
|
7
|
+
==================
|
8
|
+
|
9
|
+
* haggregate: The ``missing_flag`` parameter to ``aggregate()`` can now
|
10
|
+
include the substring "{}", which will be replaced with the number of
|
11
|
+
missing values.
|
12
|
+
|
5
13
|
2.0.0 (2024-12-04)
|
6
14
|
==================
|
7
15
|
|
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.2
|
2
2
|
Name: pthelma
|
3
|
-
Version: 2.
|
3
|
+
Version: 2.1.0
|
4
4
|
Summary: Utilities for hydrological and meteorological time series processing
|
5
5
|
Author-email: Antonis Christofides <antonis@antonischristofides.com>
|
6
6
|
Maintainer-email: Antonis Christofides <antonis@antonischristofides.com>
|
@@ -34,7 +34,14 @@ haggregate API
|
|
34
34
|
than *min_count* source records corresponding, the resulting
|
35
35
|
destination record is null; otherwise, the destination record is
|
36
36
|
derived even though some records are missing. In that case, the flag
|
37
|
-
specified by *missing_flag* is raised in the destination record.
|
37
|
+
specified by *missing_flag* is raised in the destination record. If
|
38
|
+
missing flag contains the string ``{}``, it is replaced with the
|
39
|
+
number of missing records. The recommended setting for *missing_flag*
|
40
|
+
is ``MISSING{}``, which, for example, will result in ``MISSING3``
|
41
|
+
when three records are missing. The default for *missing_flag* is
|
42
|
+
``MISS`` for backwards compatibility (it was ``MISS`` for some years,
|
43
|
+
however this was undocumented), but this is deprecated; use
|
44
|
+
``MISSING{}``.
|
38
45
|
|
39
46
|
If an error occurs, such as *ts* not having a strictly regular step,
|
40
47
|
:exc:`AggregateError` (or a subclass) is raised.
|
@@ -55,7 +55,7 @@ explanatory comments that follow it:
|
|
55
55
|
base_dir = /var/cache/timeseries/
|
56
56
|
target_step = 1h
|
57
57
|
min_count = 2
|
58
|
-
missing_flag =
|
58
|
+
missing_flag = MISSING{}
|
59
59
|
|
60
60
|
[temperature]
|
61
61
|
source_file = temperature-10min.hts
|
@@ -133,7 +133,8 @@ General parameters
|
|
133
133
|
to a destination record, the resulting destination record is null;
|
134
134
|
otherwise, the destination record is derived even though some records
|
135
135
|
are missing. In that case, the flag specified by
|
136
|
-
:option:`missing_flag` is raised in the destination record.
|
136
|
+
:option:`missing_flag` is raised in the destination record. See
|
137
|
+
:meth:`~haggregate.aggregate` for details on :option:`missing_flag`.
|
137
138
|
|
138
139
|
Time series sections
|
139
140
|
--------------------
|
@@ -75,8 +75,8 @@ class Aggregation:
|
|
75
75
|
def get_result_flags(self):
|
76
76
|
max_count = int(pd.Timedelta(self.result.time_step) / self.source.freq)
|
77
77
|
values_count = self.resampler.count()
|
78
|
-
self.result.data["flags"] = (
|
79
|
-
lambda x: self.missing_flag if x else ""
|
78
|
+
self.result.data["flags"] = (max_count - values_count).apply(
|
79
|
+
lambda x: self.missing_flag.format(x) if x else ""
|
80
80
|
)
|
81
81
|
|
82
82
|
|