pthelma 1.1.0__cp311-cp311-win_amd64.whl → 2.0.0__cp311-cp311-win_amd64.whl

Sign up to get free protection for your applications and to get access to all the features.
enhydris_cache/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
 
8
7
  import click
@@ -81,7 +80,6 @@ class AppConfig:
81
80
  try:
82
81
  self._parse_config()
83
82
  except (OSError, configparser.Error) as e:
84
- sys.stderr.write(str(e))
85
83
  raise click.ClickException(str(e))
86
84
 
87
85
  def _parse_config(self):
evaporation/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,6 @@ class AppConfig:
100
99
  try:
101
100
  self._parse_config()
102
101
  except (OSError, configparser.Error) as e:
103
- sys.stderr.write(str(e))
104
102
  raise click.ClickException(str(e))
105
103
 
106
104
  def _parse_config(self):
@@ -155,10 +153,10 @@ class AppConfig:
155
153
  self.time_step = s
156
154
 
157
155
  def _check_time_step(self, s):
158
- if s not in ("D", "H"):
156
+ if s not in ("D", "h"):
159
157
  raise WrongValueError(
160
158
  '"{}" is not an appropriate time step; in this version of '
161
- "vaporize, the step must be either D or H.".format(s)
159
+ "vaporize, the step must be either D or h.".format(s)
162
160
  )
163
161
 
164
162
  def _parse_unit_converters(self):
@@ -412,11 +410,11 @@ class ProcessAtPoint:
412
410
  self.pet.unit = "mm"
413
411
  self.pet.timezone = self.timezone
414
412
  self.pet.variable = "Potential Evapotranspiration"
415
- self.pet.precision = 2 if self.config.time_step == "H" else 1
413
+ self.pet.precision = 2 if self.config.time_step == "h" else 1
416
414
  self.pet.location = self.location
417
415
 
418
416
  def _determine_variables_to_use_in_calculation(self):
419
- if self.config.time_step == "H":
417
+ if self.config.time_step == "h":
420
418
  vars = ["temperature", "humidity", "wind_speed", "solar_radiation"]
421
419
  if "pressure" in self.input_timeseries:
422
420
  vars.append("pressure")
@@ -571,7 +569,7 @@ class ProcessSpatial:
571
569
  self._read_input_geofile(var, timestamp)
572
570
 
573
571
  def _get_variables(self):
574
- if self.config.time_step == "H":
572
+ if self.config.time_step == "h":
575
573
  return {
576
574
  "temperature",
577
575
  "humidity",
@@ -45,7 +45,7 @@ class PenmanMonteith(object):
45
45
  self.unit_converters = unit_converters
46
46
 
47
47
  def calculate(self, **kwargs):
48
- if self.time_step == "H":
48
+ if self.time_step == "h":
49
49
  return self.calculate_hourly(**kwargs)
50
50
  elif self.time_step == "D":
51
51
  return self.calculate_daily(**kwargs)
haggregate/haggregate.py CHANGED
@@ -106,7 +106,7 @@ class SourceTimeseries(HTimeseries):
106
106
  )
107
107
  except ValueError:
108
108
  raise CannotInferFrequency()
109
- first_timestamp = (current_range[0] - pd.Timedelta("1S")).floor(target_step)
109
+ first_timestamp = (current_range[0] - pd.Timedelta("1s")).floor(target_step)
110
110
  end_timestamp = current_range[-1].ceil(target_step)
111
111
  new_range = pd.date_range(first_timestamp, end_timestamp, freq=self.freq)
112
112
  self.data = self.data.reindex(new_range)
@@ -116,8 +116,8 @@ class AggregatedTimeseries(HTimeseries):
116
116
  def set_metadata(self, source_timeseries):
117
117
  for attr in attrs:
118
118
  setattr(self, attr, getattr(source_timeseries, attr, None))
119
- if self.time_step not in ("1H", "1D"):
120
- raise AggregateError("The target step can currently only be 1H or 1D")
119
+ if self.time_step not in ("1h", "1D"):
120
+ raise AggregateError("The target step can currently only be 1h or 1D")
121
121
  if hasattr(source_timeseries, "title"):
122
122
  self.title = "Aggregated " + source_timeseries.title
123
123
  if hasattr(source_timeseries, "comment"):
@@ -140,7 +140,7 @@ class AggregatedTimeseries(HTimeseries):
140
140
 
141
141
 
142
142
  def _get_offset_in_minutes(timestamp_offset):
143
- m = re.match(r"(-?)(\d*)(T|min)$", timestamp_offset)
143
+ m = re.match(r"(-?)(\d*)min$", timestamp_offset)
144
144
  if not m:
145
145
  raise AggregateError(
146
146
  "The target timestamp offset can currently only be a number of minutes "
Binary file
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.1.0'
16
- __version_tuple__ = version_tuple = (1, 1, 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.1.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>
@@ -1,30 +1,30 @@
1
1
  enhydris_api_client/__init__.py,sha256=TQQD2zgSAl-7eXOOHjgvHEqMW1D3GSmf9nI9cmR31c8,9592
2
2
  enhydris_cache/__init__.py,sha256=n3mAFeXUINSGpRkO-ZL1tkxyAuEabnMdlNPpmKur0AU,157
3
- enhydris_cache/cli.py,sha256=aqlcp0zXVNSmMAVfjVz_2ri6V7pHiSRPthO4y1LCdf4,4793
3
+ enhydris_cache/cli.py,sha256=BEFBYdrfdJbEUyeY87BLWw7igKlfB2qzkpopPZrAIUQ,4743
4
4
  enhydris_cache/enhydris_cache.py,sha256=Mvpk2JxF6hSgk0qmGWEVFjIAoehFbdK41LyBJjAYhZc,2691
5
5
  evaporation/__init__.py,sha256=ekZNT_-GEt1lDmwbX_RIaOvHSRjX05iVWeupaxZV75Y,126
6
- evaporation/cli.py,sha256=4HdusE0Trt81HsNlClvlrAu-493GtGa6bn_KuV4opzs,28442
7
- evaporation/evaporation.py,sha256=twTkFsuI5QRcof1XbnOG5vhnEMgrA2zXYHxYleKV5-k,16702
6
+ evaporation/cli.py,sha256=06TIjd6Jr_p6YjM0bOGgKqSufj5exvHXElSEAvleaNA,28392
7
+ evaporation/evaporation.py,sha256=87kNBAplijIEk_kzPWHBOYtWDWqNAK7_oZL_U2gaV9g,16702
8
8
  haggregate/__init__.py,sha256=KfFmAI6bvEsnaflhq9pK1nzOdoyySFiXnw9o1-Nmcus,70
9
9
  haggregate/cli.py,sha256=Ou2zQRnj9ZsNM6it7HFGLavrdGaExZDartlPGPuaNLc,3363
10
- haggregate/haggregate.py,sha256=pXzT2z_LshxFD9USiV1je-swAj8n-iY7fetxVO8XJ-A,5200
11
- haggregate/regularize.cp311-win_amd64.pyd,sha256=iG3hesVikAHnnSBXpDYehKaXYOdNfigCHk3iu2kNAsI,102912
10
+ haggregate/haggregate.py,sha256=nfOUW_M4q_qrS-rEQh7lJks9G9724xV6oX0ayF_Pmdw,5196
11
+ haggregate/regularize.cp311-win_amd64.pyd,sha256=Qdnj6NcADBiT30jIyiunSO7ei2WikLjWr6vny_Wtyz4,102912
12
12
  haggregate/regularize.pyx,sha256=aaxx-3wJtuo51G9n7GIzFb2qt6m7rXuoAES9zoI7Zcw,5800
13
13
  hspatial/__init__.py,sha256=dlTLFy7IqQwun4nz01qtYMQbU9kBmHEKoOXGIgCRf9c,123
14
- hspatial/cli.py,sha256=alkp-IxwMBErwL2sjZmSLWeRG3DXr0c4A4GV0O0Fk0o,10686
14
+ hspatial/cli.py,sha256=1iAY9-ATkO_xzlGCC_WSw42S9w2ca0uRLSxWG3WIat8,10638
15
15
  hspatial/hspatial.py,sha256=fv9xia23D9W5kXG00XlDrXYMF8KotUlIfL9ZjuGEyPg,16348
16
16
  hspatial/test.py,sha256=_YZzfgEtlCJmOGOdnxwpsPC48EBZ_QaKKBdyJRmg014,1050
17
17
  htimeseries/__init__.py,sha256=by-XbIt4Q-lHHKlHEcgXLi7AjEGNv0VGNmM0ZMl8L7M,75
18
18
  htimeseries/htimeseries.py,sha256=y8rIFabSCdBwmS3vWGEuyRMtQvIZy81jqg304-kIg3w,19771
19
19
  htimeseries/timezone_utils.py,sha256=jTWhKljHXQuD_drNgfI2ytD6atf6dwnsL4qCVK8wpgA,1282
20
20
  pthelma/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
- pthelma/_version.py,sha256=mLrG-mC5i2vs5IEM3ZgT5S9ZdaqM1wQHESPk1-Rj79o,427
21
+ pthelma/_version.py,sha256=hje97DjNnjjzdk2AwQsDgJXvORhASGZ-8JywrlJVLIw,427
22
22
  rocc/__init__.py,sha256=KfFB3rfJXgYL4HnVa7MNYcotG3am-CajVvh65gm9v_s,281
23
- rocc/calculation.cp311-win_amd64.pyd,sha256=sIa_Qb0c9Kq_UYD21rPjN7n31DC5yzphei1R3cJeMrY,98304
23
+ rocc/calculation.cp311-win_amd64.pyd,sha256=a49T_NVsJyCu-3DJqlhaQHwAjRAjsY9ogyxNWnXI6FM,98304
24
24
  rocc/calculation.pyx,sha256=tWWSB1u2JTCnYv6mb_YwK97vPrL7JT_ymx_5TlmG_9Y,5938
25
- pthelma-1.1.0.dist-info/LICENSE.rst,sha256=v1ndaPoHsiO-q3mq-ibN0HooeO-LCZBvKPfwlJRIMWs,1379
26
- pthelma-1.1.0.dist-info/METADATA,sha256=JEQWBdyBL7HdQQV2Psn7F78mZJi2SWnuaxEkgTSRb8o,2018
27
- pthelma-1.1.0.dist-info/WHEEL,sha256=nkBcd8Ko0v5sEcSagm2-x_RVrb8gBSkTa8VFFZ0Mr1o,101
28
- pthelma-1.1.0.dist-info/entry_points.txt,sha256=Kh2gKKRhObmmOASJWIwX9dDEZQ5htc3ftBlqeoGer-s,155
29
- pthelma-1.1.0.dist-info/top_level.txt,sha256=kWL0AYuVd_5KzKWRBkAG576ag46gKbojnWdeH_c-bzo,92
30
- pthelma-1.1.0.dist-info/RECORD,,
25
+ pthelma-2.0.0.dist-info/LICENSE.rst,sha256=v1ndaPoHsiO-q3mq-ibN0HooeO-LCZBvKPfwlJRIMWs,1379
26
+ pthelma-2.0.0.dist-info/METADATA,sha256=QnFd03qXLTgir1qyXPxoob8pN0Uxp5Zu4U3hm6LyD_8,2018
27
+ pthelma-2.0.0.dist-info/WHEEL,sha256=nkBcd8Ko0v5sEcSagm2-x_RVrb8gBSkTa8VFFZ0Mr1o,101
28
+ pthelma-2.0.0.dist-info/entry_points.txt,sha256=Kh2gKKRhObmmOASJWIwX9dDEZQ5htc3ftBlqeoGer-s,155
29
+ pthelma-2.0.0.dist-info/top_level.txt,sha256=kWL0AYuVd_5KzKWRBkAG576ag46gKbojnWdeH_c-bzo,92
30
+ pthelma-2.0.0.dist-info/RECORD,,
Binary file