pthelma 1.0.0__cp311-cp311-musllinux_1_2_i686.whl → 2.0.0__cp311-cp311-musllinux_1_2_i686.whl

Sign up to get free protection for your applications and to get access to all the features.
hspatial/cli.py CHANGED
@@ -2,7 +2,6 @@ import configparser
2
2
  import datetime as dt
3
3
  import logging
4
4
  import os
5
- import sys
6
5
  import traceback
7
6
  from glob import glob
8
7
  from io import StringIO
@@ -100,7 +99,7 @@ class App:
100
99
  0, iso8601.parse_date(datestring, default_timezone=timezone)
101
100
  )
102
101
  except iso8601.ParseError as e:
103
- raise iso8601.ParseError(
102
+ raise click.ClickException(
104
103
  str(e)
105
104
  + " (file {}, {} lines from the end)".format(filename, i + 1)
106
105
  )
@@ -146,7 +145,7 @@ class App:
146
145
  """
147
146
  Determine date_fmt based on time series time step.
148
147
  """
149
- if self._time_step.endswith("min") or self._time_step.endswith("H"):
148
+ if self._time_step.endswith("min") or self._time_step.endswith("h"):
150
149
  return "%Y-%m-%d %H:%M%z"
151
150
  elif self._time_step.endswith("D"):
152
151
  return "%Y-%m-%d"
@@ -221,7 +220,6 @@ class AppConfig:
221
220
  try:
222
221
  self._parse_config()
223
222
  except (OSError, configparser.Error) as e:
224
- sys.stderr.write(str(e))
225
223
  raise click.ClickException(str(e))
226
224
 
227
225
  def _parse_config(self):
pthelma/_version.py CHANGED
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '1.0.0'
16
- __version_tuple__ = version_tuple = (1, 0, 0)
15
+ __version__ = version = '2.0.0'
16
+ __version_tuple__ = version_tuple = (2, 0, 0)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pthelma
3
- Version: 1.0.0
3
+ Version: 2.0.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,9 +34,9 @@ Requires-Dist: gdal<4,>=1.10; extra == "all"
34
34
  pthelma
35
35
  =======
36
36
 
37
- .. image:: https://github.com/openmeteo/pthelma/actions/workflows/run-tests-automatically.yml/badge.svg
37
+ .. image:: https://github.com/openmeteo/pthelma/actions/workflows/run-tests.yml/badge.svg
38
38
  :alt: Build button
39
- :target: https://github.com/openmeteo/pthelma/actions/workflows/run-tests-automatically.yml
39
+ :target: https://github.com/openmeteo/pthelma/actions/workflows/run-tests.yml
40
40
 
41
41
  .. image:: https://codecov.io/github/openmeteo/pthelma/coverage.svg?branch=master
42
42
  :alt: Coverage
@@ -45,10 +45,6 @@ pthelma
45
45
  .. image:: https://img.shields.io/pypi/v/pthelma.svg
46
46
  :target: https://pypi.python.org/pypi/pthelma
47
47
 
48
- .. image:: https://pyup.io/repos/github/openmeteo/pthelma/shield.svg
49
- :target: https://pyup.io/repos/github/openmeteo/pthelma/
50
- :alt: Updates
51
-
52
48
  A Python library with utilities for hydrological and meteorological time
53
49
  series processing.
54
50
 
@@ -0,0 +1,32 @@
1
+ htimeseries/htimeseries.py,sha256=oyf-N8l4POBmTiOSXU9llYijHNZAITsPbjRgIz1atEE,19197
2
+ htimeseries/__init__.py,sha256=ufVeWB4YLa6KGFwIa2kIe6idyfFvslDWs4JzZPv_Cro,73
3
+ htimeseries/timezone_utils.py,sha256=xEArPwKvI9tLP3z2Y9l4jpbpKMtOsC5ftHxzAo1bgNs,1238
4
+ haggregate/regularize.c,sha256=rMLdj8LjTVrwbdR9OsYLKEbFPDaRvVusOg0bLOq5900,611781
5
+ haggregate/regularize.pyx,sha256=sqqmT8F9y2b3-eoQKidB0bb2PW9qVimsFpf1X4n5tSU,5607
6
+ haggregate/__init__.py,sha256=fvt2Og4upOT1HT3QOXnuxXYlwL-X_0AERDvbf0TX4fY,68
7
+ haggregate/haggregate.py,sha256=eIrZHsToIVlWe4-GZMBuVoW-PcKryyAWDo7vzsoSQBw,5041
8
+ haggregate/cli.py,sha256=NtGM4ka9d8x5lXYnh7ortbm0sB9f2BS4h4j0OBDjgtg,3272
9
+ haggregate/regularize.cpython-311-i386-linux-musl.so,sha256=Nnd-wqYIrKvBfcTfK-WKYqEAE6r0IlNp5WX5INhg71w,779536
10
+ pthelma-2.0.0.dist-info/top_level.txt,sha256=kWL0AYuVd_5KzKWRBkAG576ag46gKbojnWdeH_c-bzo,92
11
+ pthelma-2.0.0.dist-info/RECORD,,
12
+ pthelma-2.0.0.dist-info/LICENSE.rst,sha256=WFSwH2Ls72hcsUDQgd-Hof0KLWSNpC5pXQUOQs0wWWo,1345
13
+ pthelma-2.0.0.dist-info/entry_points.txt,sha256=Kh2gKKRhObmmOASJWIwX9dDEZQ5htc3ftBlqeoGer-s,155
14
+ pthelma-2.0.0.dist-info/METADATA,sha256=BKFeqqA5VHoayOxt8ftx5u59Jtpw2VUfilw3vAtjx7M,1967
15
+ pthelma-2.0.0.dist-info/WHEEL,sha256=Z5j2XtjHrQbOHjN4_MTOnYdO8RojvTSdjZpKbN8zVdg,110
16
+ evaporation/__init__.py,sha256=yvyqV97dCRu7ibPpY2_P7FyHICg4s72dq7aTrHSp5c8,122
17
+ evaporation/cli.py,sha256=hrXz0Hcf-PtKw0lsux4pAMmXlUvohO4-97m2TUqRT_I,27665
18
+ evaporation/evaporation.py,sha256=HBW9Quz-mjQlaHsb93Y47eAzmyktmTxHmzxgQUemiU4,16265
19
+ enhydris_cache/__init__.py,sha256=efOjymmTWcbNF25c9iFGvOJomjfBsDQNRajItnOqKzs,152
20
+ enhydris_cache/enhydris_cache.py,sha256=M_-uf2yqPLMgJZykC2rKCdqINKQoHIM1D5m01N_PrGY,2622
21
+ enhydris_cache/cli.py,sha256=jpUtHWpVKGyNwgZVgTI8p6T4SdXu326kz4HW1wogm84,4595
22
+ pthelma/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
23
+ pthelma/_version.py,sha256=o9XMlNC6GoiUn7mwoOOgJdijgp3B_2fLdgizcKs1i2o,411
24
+ enhydris_api_client/__init__.py,sha256=mFrWzz5ntJYyER0L4Lk1eWkKcytHvn0_XOQZ22_oiGo,9340
25
+ rocc/calculation.c,sha256=Qgq1UT-TvMDXrK2NRzHcGxs6YGX0tl7wY0bGAfFlJOE,687901
26
+ rocc/__init__.py,sha256=O4RKkd8Wyuqo8hwVCe6fJYpbcPm3KJrRwjR31RNg9t0,272
27
+ rocc/calculation.pyx,sha256=kwqGjn40EttceO0IsqBjUN1FbjbuMGA2hl90_btwEC8,5756
28
+ rocc/calculation.cpython-311-i386-linux-musl.so,sha256=HlQmDt9XmeutfxxTHcoM9kYsUzlmhxgGhB1C_2jwez4,714376
29
+ hspatial/test.py,sha256=awSPlX7f_ZrF8UL5XKnwC3K7j1k20KvMeC_31KuSyq8,1023
30
+ hspatial/hspatial.py,sha256=suhe1RaFRvVetQXPMwy5QkJ6GYOmcmASYrKBZVBX2L4,15923
31
+ hspatial/__init__.py,sha256=O4w4PsZI6iqkDAHioFcRh2Iju4xSFd5UkqfK_ycss0k,119
32
+ hspatial/cli.py,sha256=opI58Rmv75xNIk40kXfiPNtrY1zcu5cMSbLJvYXOZiw,10330
@@ -5,3 +5,4 @@ haggregate
5
5
  hspatial
6
6
  htimeseries
7
7
  pthelma
8
+ rocc
rocc/__init__.py ADDED
@@ -0,0 +1,9 @@
1
+ from collections import namedtuple
2
+
3
+ from .calculation import Rocc
4
+
5
+ Threshold = namedtuple("Threshold", ["delta_t", "allowed_diff"])
6
+
7
+
8
+ def rocc(*, timeseries, thresholds, symmetric=False, flag="TEMPORAL"):
9
+ return Rocc(timeseries, thresholds, symmetric, flag).execute()