pastastore 1.10.1__tar.gz → 1.10.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. {pastastore-1.10.1 → pastastore-1.10.2}/PKG-INFO +1 -1
  2. {pastastore-1.10.1 → pastastore-1.10.2}/pastastore/extensions/hpd.py +10 -2
  3. {pastastore-1.10.1 → pastastore-1.10.2}/pastastore/version.py +1 -1
  4. {pastastore-1.10.1 → pastastore-1.10.2}/pastastore.egg-info/PKG-INFO +1 -1
  5. {pastastore-1.10.1 → pastastore-1.10.2}/LICENSE +0 -0
  6. {pastastore-1.10.1 → pastastore-1.10.2}/docs/conf.py +0 -0
  7. {pastastore-1.10.1 → pastastore-1.10.2}/pastastore/__init__.py +0 -0
  8. {pastastore-1.10.1 → pastastore-1.10.2}/pastastore/base.py +0 -0
  9. {pastastore-1.10.1 → pastastore-1.10.2}/pastastore/connectors.py +0 -0
  10. {pastastore-1.10.1 → pastastore-1.10.2}/pastastore/datasets.py +0 -0
  11. {pastastore-1.10.1 → pastastore-1.10.2}/pastastore/extensions/__init__.py +0 -0
  12. {pastastore-1.10.1 → pastastore-1.10.2}/pastastore/extensions/accessor.py +0 -0
  13. {pastastore-1.10.1 → pastastore-1.10.2}/pastastore/plotting.py +0 -0
  14. {pastastore-1.10.1 → pastastore-1.10.2}/pastastore/store.py +0 -0
  15. {pastastore-1.10.1 → pastastore-1.10.2}/pastastore/styling.py +0 -0
  16. {pastastore-1.10.1 → pastastore-1.10.2}/pastastore/util.py +0 -0
  17. {pastastore-1.10.1 → pastastore-1.10.2}/pastastore/yaml_interface.py +0 -0
  18. {pastastore-1.10.1 → pastastore-1.10.2}/pastastore.egg-info/SOURCES.txt +0 -0
  19. {pastastore-1.10.1 → pastastore-1.10.2}/pastastore.egg-info/dependency_links.txt +0 -0
  20. {pastastore-1.10.1 → pastastore-1.10.2}/pastastore.egg-info/requires.txt +0 -0
  21. {pastastore-1.10.1 → pastastore-1.10.2}/pastastore.egg-info/top_level.txt +0 -0
  22. {pastastore-1.10.1 → pastastore-1.10.2}/pyproject.toml +0 -0
  23. {pastastore-1.10.1 → pastastore-1.10.2}/readme.md +0 -0
  24. {pastastore-1.10.1 → pastastore-1.10.2}/setup.cfg +0 -0
  25. {pastastore-1.10.1 → pastastore-1.10.2}/tests/conftest.py +0 -0
  26. {pastastore-1.10.1 → pastastore-1.10.2}/tests/test_001_import.py +0 -0
  27. {pastastore-1.10.1 → pastastore-1.10.2}/tests/test_002_connectors.py +0 -0
  28. {pastastore-1.10.1 → pastastore-1.10.2}/tests/test_003_pastastore.py +0 -0
  29. {pastastore-1.10.1 → pastastore-1.10.2}/tests/test_004_yaml.py +0 -0
  30. {pastastore-1.10.1 → pastastore-1.10.2}/tests/test_005_maps_plots.py +0 -0
  31. {pastastore-1.10.1 → pastastore-1.10.2}/tests/test_006_benchmark.py +0 -0
  32. {pastastore-1.10.1 → pastastore-1.10.2}/tests/test_007_hpdextension.py +0 -0
  33. {pastastore-1.10.1 → pastastore-1.10.2}/tests/test_008_stressmodels.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pastastore
3
- Version: 1.10.1
3
+ Version: 1.10.2
4
4
  Summary: Tools for managing Pastas time series models.
5
5
  Author: D.A. Brakenhoff
6
6
  Maintainer-email: "D.A. Brakenhoff" <d.brakenhoff@artesia-water.nl>, "R. Calje" <r.calje@artesia-water.nl>, "M.A. Vonk" <m.vonk@artesia-water.nl>
@@ -185,7 +185,7 @@ class HydroPandasExtension:
185
185
  metadata.pop("name", None)
186
186
  metadata.pop("meta", None)
187
187
  unit = metadata.get("unit", None)
188
- if unit == "m" and np.allclose(unit_multiplier, 1e-3):
188
+ if unit == "m" and np.allclose(unit_multiplier, 1e3):
189
189
  metadata["unit"] = "mm"
190
190
  elif unit_multiplier != 1.0:
191
191
  metadata["unit"] = f"{unit_multiplier:.1e}*{unit}"
@@ -695,10 +695,18 @@ class HydroPandasExtension:
695
695
  continue
696
696
  stn = stns.loc[mask].index[0]
697
697
 
698
- if unit == "mm":
698
+ if unit == "m":
699
+ unit_multiplier = 1.0
700
+ elif unit == "mm":
699
701
  unit_multiplier = 1e3
702
+ elif unit.count("m") == 1 and unit.endswith("m"):
703
+ unit_multiplier = float(unit.replace("m", ""))
700
704
  else:
701
705
  unit_multiplier = 1.0
706
+ logger.warning(
707
+ "Unit '%s' not recognized, using unit_multiplier=%.1e."
708
+ % (unit, unit_multiplier)
709
+ )
702
710
 
703
711
  logger.debug("Updating KNMI %s from %s to %s" % (name, itmin, itmax))
704
712
  knmi = hpd.read_knmi(
@@ -9,7 +9,7 @@ PASTAS_VERSION = parse_version(ps.__version__)
9
9
  PASTAS_LEQ_022 = PASTAS_VERSION <= parse_version("0.22.0")
10
10
  PASTAS_GEQ_150 = PASTAS_VERSION >= parse_version("1.5.0")
11
11
 
12
- __version__ = "1.10.1"
12
+ __version__ = "1.10.2"
13
13
 
14
14
 
15
15
  def show_versions(optional=False) -> None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pastastore
3
- Version: 1.10.1
3
+ Version: 1.10.2
4
4
  Summary: Tools for managing Pastas time series models.
5
5
  Author: D.A. Brakenhoff
6
6
  Maintainer-email: "D.A. Brakenhoff" <d.brakenhoff@artesia-water.nl>, "R. Calje" <r.calje@artesia-water.nl>, "M.A. Vonk" <m.vonk@artesia-water.nl>
File without changes
File without changes
File without changes
File without changes
File without changes