weatherdb 1.2.1__tar.gz → 1.2.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 (111) hide show
  1. {weatherdb-1.2.1 → weatherdb-1.2.2}/.gitlab-ci.yml +1 -2
  2. {weatherdb-1.2.1 → weatherdb-1.2.2}/CHANGES.md +5 -0
  3. {weatherdb-1.2.1 → weatherdb-1.2.2}/PKG-INFO +1 -1
  4. weatherdb-1.2.2/weatherdb/_version.py +1 -0
  5. {weatherdb-1.2.1 → weatherdb-1.2.2}/weatherdb/cli.py +2 -1
  6. {weatherdb-1.2.1 → weatherdb-1.2.2}/weatherdb/config/ConfigParser.py +14 -1
  7. {weatherdb-1.2.1 → weatherdb-1.2.2}/weatherdb/station/GroupStation.py +7 -7
  8. {weatherdb-1.2.1 → weatherdb-1.2.2}/weatherdb/stations/GroupStations.py +3 -3
  9. {weatherdb-1.2.1 → weatherdb-1.2.2}/weatherdb.egg-info/PKG-INFO +1 -1
  10. weatherdb-1.2.1/weatherdb/_version.py +0 -1
  11. {weatherdb-1.2.1 → weatherdb-1.2.2}/.dockerignore +0 -0
  12. {weatherdb-1.2.1 → weatherdb-1.2.2}/.github/workflows/cleanup-cache.yml +0 -0
  13. {weatherdb-1.2.1 → weatherdb-1.2.2}/.github/workflows/python-publish.yml +0 -0
  14. {weatherdb-1.2.1 → weatherdb-1.2.2}/.github/workflows/python-test.yml +0 -0
  15. {weatherdb-1.2.1 → weatherdb-1.2.2}/.gitignore +0 -0
  16. {weatherdb-1.2.1 → weatherdb-1.2.2}/.gitlab/merge_request_templates/new_version.md +0 -0
  17. {weatherdb-1.2.1 → weatherdb-1.2.2}/.readthedocs.yaml +0 -0
  18. {weatherdb-1.2.1 → weatherdb-1.2.2}/LICENSE +0 -0
  19. {weatherdb-1.2.1 → weatherdb-1.2.2}/MANIFEST.in +0 -0
  20. {weatherdb-1.2.1 → weatherdb-1.2.2}/README.md +0 -0
  21. {weatherdb-1.2.1 → weatherdb-1.2.2}/docker/Dockerfile +0 -0
  22. {weatherdb-1.2.1 → weatherdb-1.2.2}/docker/docker-compose.yaml +0 -0
  23. {weatherdb-1.2.1 → weatherdb-1.2.2}/docker/docker-compose_test.yaml +0 -0
  24. {weatherdb-1.2.1 → weatherdb-1.2.2}/docker/start-docker-test.sh +0 -0
  25. {weatherdb-1.2.1 → weatherdb-1.2.2}/docs/requirements.txt +0 -0
  26. {weatherdb-1.2.1 → weatherdb-1.2.2}/docs/source/Changelog.md +0 -0
  27. {weatherdb-1.2.1 → weatherdb-1.2.2}/docs/source/License.rst +0 -0
  28. {weatherdb-1.2.1 → weatherdb-1.2.2}/docs/source/Methode.md +0 -0
  29. {weatherdb-1.2.1 → weatherdb-1.2.2}/docs/source/_static/custom.css +0 -0
  30. {weatherdb-1.2.1 → weatherdb-1.2.2}/docs/source/_static/favicon.ico +0 -0
  31. {weatherdb-1.2.1 → weatherdb-1.2.2}/docs/source/_static/logo.png +0 -0
  32. {weatherdb-1.2.1 → weatherdb-1.2.2}/docs/source/api/api.rst +0 -0
  33. {weatherdb-1.2.1 → weatherdb-1.2.2}/docs/source/api/cli.rst +0 -0
  34. {weatherdb-1.2.1 → weatherdb-1.2.2}/docs/source/api/weatherdb.broker.rst +0 -0
  35. {weatherdb-1.2.1 → weatherdb-1.2.2}/docs/source/api/weatherdb.config.rst +0 -0
  36. {weatherdb-1.2.1 → weatherdb-1.2.2}/docs/source/api/weatherdb.db.rst +0 -0
  37. {weatherdb-1.2.1 → weatherdb-1.2.2}/docs/source/api/weatherdb.rst +0 -0
  38. {weatherdb-1.2.1 → weatherdb-1.2.2}/docs/source/api/weatherdb.station.GroupStation.rst +0 -0
  39. {weatherdb-1.2.1 → weatherdb-1.2.2}/docs/source/api/weatherdb.station.StationBases.rst +0 -0
  40. {weatherdb-1.2.1 → weatherdb-1.2.2}/docs/source/api/weatherdb.station.StationET.rst +0 -0
  41. {weatherdb-1.2.1 → weatherdb-1.2.2}/docs/source/api/weatherdb.station.StationP.rst +0 -0
  42. {weatherdb-1.2.1 → weatherdb-1.2.2}/docs/source/api/weatherdb.station.StationPD.rst +0 -0
  43. {weatherdb-1.2.1 → weatherdb-1.2.2}/docs/source/api/weatherdb.station.StationT.rst +0 -0
  44. {weatherdb-1.2.1 → weatherdb-1.2.2}/docs/source/api/weatherdb.station.rst +0 -0
  45. {weatherdb-1.2.1 → weatherdb-1.2.2}/docs/source/api/weatherdb.stations.StationsBase.rst +0 -0
  46. {weatherdb-1.2.1 → weatherdb-1.2.2}/docs/source/api/weatherdb.stations.StationsET.rst +0 -0
  47. {weatherdb-1.2.1 → weatherdb-1.2.2}/docs/source/api/weatherdb.stations.StationsP.rst +0 -0
  48. {weatherdb-1.2.1 → weatherdb-1.2.2}/docs/source/api/weatherdb.stations.StationsPD.rst +0 -0
  49. {weatherdb-1.2.1 → weatherdb-1.2.2}/docs/source/api/weatherdb.stations.StationsT.rst +0 -0
  50. {weatherdb-1.2.1 → weatherdb-1.2.2}/docs/source/api/weatherdb.stations.rst +0 -0
  51. {weatherdb-1.2.1 → weatherdb-1.2.2}/docs/source/api/weatherdb.utils.rst +0 -0
  52. {weatherdb-1.2.1 → weatherdb-1.2.2}/docs/source/conf.py +0 -0
  53. {weatherdb-1.2.1 → weatherdb-1.2.2}/docs/source/index.rst +0 -0
  54. {weatherdb-1.2.1 → weatherdb-1.2.2}/docs/source/setup/Configuration.md +0 -0
  55. {weatherdb-1.2.1 → weatherdb-1.2.2}/docs/source/setup/Hosting.md +0 -0
  56. {weatherdb-1.2.1 → weatherdb-1.2.2}/docs/source/setup/Install.md +0 -0
  57. {weatherdb-1.2.1 → weatherdb-1.2.2}/docs/source/setup/Quickstart.md +0 -0
  58. {weatherdb-1.2.1 → weatherdb-1.2.2}/docs/source/setup/setup.rst +0 -0
  59. {weatherdb-1.2.1 → weatherdb-1.2.2}/pyproject.toml +0 -0
  60. {weatherdb-1.2.1 → weatherdb-1.2.2}/setup.cfg +0 -0
  61. {weatherdb-1.2.1 → weatherdb-1.2.2}/tests/test-data/DEM/COP-DEM_GLO-30-DGED__2023_1_clipped.tif +0 -0
  62. {weatherdb-1.2.1 → weatherdb-1.2.2}/tests/test-data/DEM/README.md +0 -0
  63. {weatherdb-1.2.1 → weatherdb-1.2.2}/tests/test-data/DEM/eula_F.pdf +0 -0
  64. {weatherdb-1.2.1 → weatherdb-1.2.2}/tests/test-data/regionalisation/DWD-grid_ma_1991_2020_DGM25_clipped.tif +0 -0
  65. {weatherdb-1.2.1 → weatherdb-1.2.2}/tests/test-data/regionalisation/HYRAS_ma_1991_2020_DGM25_clipped.tif +0 -0
  66. {weatherdb-1.2.1 → weatherdb-1.2.2}/tests/test-data/regionalisation/README.md +0 -0
  67. {weatherdb-1.2.1 → weatherdb-1.2.2}/tests/test-data/test-data-config.ini +0 -0
  68. {weatherdb-1.2.1 → weatherdb-1.2.2}/weatherdb/__init__.py +0 -0
  69. {weatherdb-1.2.1 → weatherdb-1.2.2}/weatherdb/alembic/README.md +0 -0
  70. {weatherdb-1.2.1 → weatherdb-1.2.2}/weatherdb/alembic/alembic.ini +0 -0
  71. {weatherdb-1.2.1 → weatherdb-1.2.2}/weatherdb/alembic/config.py +0 -0
  72. {weatherdb-1.2.1 → weatherdb-1.2.2}/weatherdb/alembic/env.py +0 -0
  73. {weatherdb-1.2.1 → weatherdb-1.2.2}/weatherdb/alembic/script.py.mako +0 -0
  74. {weatherdb-1.2.1 → weatherdb-1.2.2}/weatherdb/alembic/versions/V1.0.0_initial_database_creation.py +0 -0
  75. {weatherdb-1.2.1 → weatherdb-1.2.2}/weatherdb/alembic/versions/V1.0.2_more_charachters_for_settings+term_station_ma_raster.py +0 -0
  76. {weatherdb-1.2.1 → weatherdb-1.2.2}/weatherdb/alembic/versions/V1.0.5_fix-ma-raster-values.py +0 -0
  77. {weatherdb-1.2.1 → weatherdb-1.2.2}/weatherdb/alembic/versions/V1.0.6_update-views.py +0 -0
  78. {weatherdb-1.2.1 → weatherdb-1.2.2}/weatherdb/broker.py +0 -0
  79. {weatherdb-1.2.1 → weatherdb-1.2.2}/weatherdb/config/__init__.py +0 -0
  80. {weatherdb-1.2.1 → weatherdb-1.2.2}/weatherdb/config/config_default.ini +0 -0
  81. {weatherdb-1.2.1 → weatherdb-1.2.2}/weatherdb/db/__init__.py +0 -0
  82. {weatherdb-1.2.1 → weatherdb-1.2.2}/weatherdb/db/connections.py +0 -0
  83. {weatherdb-1.2.1 → weatherdb-1.2.2}/weatherdb/db/fixtures/RichterParameters.json +0 -0
  84. {weatherdb-1.2.1 → weatherdb-1.2.2}/weatherdb/db/models.py +0 -0
  85. {weatherdb-1.2.1 → weatherdb-1.2.2}/weatherdb/db/queries/get_quotient.py +0 -0
  86. {weatherdb-1.2.1 → weatherdb-1.2.2}/weatherdb/db/views.py +0 -0
  87. {weatherdb-1.2.1 → weatherdb-1.2.2}/weatherdb/station/StationBases.py +0 -0
  88. {weatherdb-1.2.1 → weatherdb-1.2.2}/weatherdb/station/StationET.py +0 -0
  89. {weatherdb-1.2.1 → weatherdb-1.2.2}/weatherdb/station/StationP.py +0 -0
  90. {weatherdb-1.2.1 → weatherdb-1.2.2}/weatherdb/station/StationPD.py +0 -0
  91. {weatherdb-1.2.1 → weatherdb-1.2.2}/weatherdb/station/StationT.py +0 -0
  92. {weatherdb-1.2.1 → weatherdb-1.2.2}/weatherdb/station/__init__.py +0 -0
  93. {weatherdb-1.2.1 → weatherdb-1.2.2}/weatherdb/station/constants.py +0 -0
  94. {weatherdb-1.2.1 → weatherdb-1.2.2}/weatherdb/stations/StationsBase.py +0 -0
  95. {weatherdb-1.2.1 → weatherdb-1.2.2}/weatherdb/stations/StationsBaseTET.py +0 -0
  96. {weatherdb-1.2.1 → weatherdb-1.2.2}/weatherdb/stations/StationsET.py +0 -0
  97. {weatherdb-1.2.1 → weatherdb-1.2.2}/weatherdb/stations/StationsP.py +0 -0
  98. {weatherdb-1.2.1 → weatherdb-1.2.2}/weatherdb/stations/StationsPD.py +0 -0
  99. {weatherdb-1.2.1 → weatherdb-1.2.2}/weatherdb/stations/StationsT.py +0 -0
  100. {weatherdb-1.2.1 → weatherdb-1.2.2}/weatherdb/stations/__init__.py +0 -0
  101. {weatherdb-1.2.1 → weatherdb-1.2.2}/weatherdb/utils/TimestampPeriod.py +0 -0
  102. {weatherdb-1.2.1 → weatherdb-1.2.2}/weatherdb/utils/__init__.py +0 -0
  103. {weatherdb-1.2.1 → weatherdb-1.2.2}/weatherdb/utils/dwd.py +0 -0
  104. {weatherdb-1.2.1 → weatherdb-1.2.2}/weatherdb/utils/geometry.py +0 -0
  105. {weatherdb-1.2.1 → weatherdb-1.2.2}/weatherdb/utils/get_data.py +0 -0
  106. {weatherdb-1.2.1 → weatherdb-1.2.2}/weatherdb/utils/logging.py +0 -0
  107. {weatherdb-1.2.1 → weatherdb-1.2.2}/weatherdb.egg-info/SOURCES.txt +0 -0
  108. {weatherdb-1.2.1 → weatherdb-1.2.2}/weatherdb.egg-info/dependency_links.txt +0 -0
  109. {weatherdb-1.2.1 → weatherdb-1.2.2}/weatherdb.egg-info/entry_points.txt +0 -0
  110. {weatherdb-1.2.1 → weatherdb-1.2.2}/weatherdb.egg-info/requires.txt +0 -0
  111. {weatherdb-1.2.1 → weatherdb-1.2.2}/weatherdb.egg-info/top_level.txt +0 -0
@@ -45,11 +45,10 @@ test_single:
45
45
  interruptible: true
46
46
  variables:
47
47
  PYTHON_VERSION: 3.8
48
- PYTHON_VERSION_ESCAPED: $PY_VERSION | replace(".", "_")
49
48
  PIP_CACHE_DIR: $CI_PROJECT_DIR/.cache/pip
50
49
  POSTGRES_USER: postgres
51
50
  POSTGRES_PASSWORD: postgres
52
- POSTGRES_DB: test_db_$PYTHON_VERSION_ESCAPED
51
+ POSTGRES_DB: test_db_$PYTHON_VERSION
53
52
  POSTGRES_HOST_AUTH_METHOD: trust
54
53
  WEATHERDB_DB_HOST: postgres
55
54
  WEATHERDB_DB_PORT: 5432
@@ -1,5 +1,10 @@
1
1
  # Change-log
2
2
 
3
+ ## Version 1.2.2
4
+
5
+ - config: define utf-8 as default encoding for config files
6
+ - fix: GroupStation(s).create_ts parameter "paras"="n" should be "p", changes create_roger_ts conversion for roger_toolbox
7
+
3
8
  ## Version 1.2.1
4
9
 
5
10
  - fix: filllup linear regression did not take configuration value and therefor did never work
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: weatherdb
3
- Version: 1.2.1
3
+ Version: 1.2.2
4
4
  Summary: This is a package to work with and to create the Weather Database which handles, checks, fills and corrects DWD Weather Station data.
5
5
  Author-email: Max Schmit <max.schmit@hydrology.uni-freiburg.de>
6
6
  License: GNU GENERAL PUBLIC LICENSE
@@ -0,0 +1 @@
1
+ __version__ = "1.2.2"
@@ -76,7 +76,8 @@ def upgrade_db_schema(revision):
76
76
 
77
77
  @cli.command(short_help="Create User configuration file.")
78
78
  @click.option('--file', '-f',
79
- type=click.Path(), default="ask", show_default=True,
79
+ type=click.Path(resolve_path=True, dir_okay=False, file_okay=True),
80
+ default="ask", show_default=True,
80
81
  help="The file to save the user configuration to.")
81
82
  @click.option('--on-exists', '-e',
82
83
  type=str, default="ask", show_default=True,
@@ -36,11 +36,24 @@ class ConfigParser(configparser.ConfigParser):
36
36
  self._user_listeners = []
37
37
 
38
38
  # read the configuration files
39
- self.read(self._DEFAULT_CONFIG_FILE)
39
+ self.read(self._DEFAULT_CONFIG_FILE, encoding="utf-8")
40
40
  self._read_main_config()
41
41
  self.load_user_config(raise_undefined_error=False)
42
42
  self.load_environment_variables()
43
43
 
44
+ def read(self, filenames, encoding="utf-8"):
45
+ """Read and parse a list of filenames.
46
+
47
+ Parameters
48
+ ----------
49
+ filenames : list or str
50
+ A list of filenames or a single filename to read.
51
+ encoding : str, optional
52
+ The encoding of the file.
53
+ The default is None.
54
+ """
55
+ super().read(filenames=filenames, encoding=encoding)
56
+
44
57
  def add_listener(self, section, option, callback):
45
58
  """Add a callback function to be called when a configuration option is changed.
46
59
 
@@ -163,7 +163,7 @@ class GroupStation(object):
163
163
  The default is True.
164
164
  paras : list of str or str, optional
165
165
  Give the parameters for which to get the meta information.
166
- Can be "n", "t", "et" or "all".
166
+ Can be "p", "t", "et" or "all".
167
167
  If "all", then every available station parameter is returned.
168
168
  The default is "all"
169
169
  add_na_share : bool, optional
@@ -298,7 +298,7 @@ class GroupStation(object):
298
298
  ----------
299
299
  paras : list of str or str, optional
300
300
  Give the parameters for which to get the meta information.
301
- Can be "n", "t", "et" or "all".
301
+ Can be "p", "t", "et" or "all".
302
302
  If "all", then every available station parameter is returned.
303
303
  The default is "all"
304
304
  **kwargs : dict, optional
@@ -398,8 +398,8 @@ class GroupStation(object):
398
398
  agg_to="10 min", r_r0=r_r0, split_date=True,
399
399
  nas_allowed=False,
400
400
  add_t_min=add_t_min, add_t_max=add_t_max,
401
- file_names={"N":"PREC.txt", "T":"TA.txt", "ET":"PET.txt"},
402
- col_names={"N":"PREC", "ET":"PET",
401
+ file_names={"P":"PREC.txt", "T":"TA.txt", "ET":"PET.txt"},
402
+ col_names={"P":"PREC", "ET":"PET",
403
403
  "T":"TA", "T_min":"TA_min", "T_max":"TA_max",
404
404
  "Jahr":"YYYY", "Monat":"MM", "Tag":"DD",
405
405
  "Stunde":"hh", "Minute":"mm"},
@@ -443,7 +443,7 @@ class GroupStation(object):
443
443
  If only one kind is asked for, then the columns get renamed to only have the parameter name as column name.
444
444
  paras : list of str or str, optional
445
445
  Give the parameters for which to get the meta information.
446
- Can be "n", "t", "et" or "all".
446
+ Can be "p", "t", "et" or "all".
447
447
  If "all", then every available station parameter is returned.
448
448
  The default is "all"
449
449
  agg_to : str, optional
@@ -484,12 +484,12 @@ class GroupStation(object):
484
484
  The default is True.
485
485
  file_names : dict, optional
486
486
  A dictionary with the file names for the different parameters.
487
- e.g.{"N":"PREC.txt", "T":"TA.txt", "ET":"ET.txt"}
487
+ e.g.{"P":"PREC.txt", "T":"TA.txt", "ET":"ET.txt"}
488
488
  If an empty dictionary is given, then the standard names are used.
489
489
  The default is {}.
490
490
  col_names : dict, optional
491
491
  A dictionary with the column names for the different parameters.
492
- e.g.{"N":"PREC", "T":"TA", "ET":"ET", "Jahr":"YYYY", "Monat":"MM", "Tag":"DD", "Stunde":"HH", "Minute":"MN"}
492
+ e.g.{"P":"PREC", "T":"TA", "ET":"ET", "Jahr":"YYYY", "Monat":"MM", "Tag":"DD", "Stunde":"HH", "Minute":"MN"}
493
493
  If an empty dictionary is given, then the standard names are used.
494
494
  The default is {}.
495
495
  keep_date_parts : bool, optional
@@ -46,7 +46,7 @@ class GroupStations(object):
46
46
  if isinstance(paras, str) and paras != "all":
47
47
  paras = [paras,]
48
48
 
49
- valid_paras=["n", "t", "et"]
49
+ valid_paras=["p", "t", "et"]
50
50
  if isinstance(paras, str) and (paras == "all"):
51
51
  return valid_paras
52
52
  else:
@@ -502,8 +502,8 @@ class GroupStations(object):
502
502
  agg_to="10 min", r_r0=r_r0, stids=stids,
503
503
  split_date=True, nas_allowed=False,
504
504
  add_t_min=add_t_min, add_t_max=add_t_max,
505
- file_names={"N":"PREC.txt", "T":"TA.txt", "ET":"PET.txt"},
506
- col_names={"N":"PREC", "ET":"PET",
505
+ file_names={"P":"PREC.txt", "T":"TA.txt", "ET":"PET.txt"},
506
+ col_names={"P":"PREC", "ET":"PET",
507
507
  "T":"TA", "T_min":"TA_min", "T_max":"TA_max",
508
508
  "Jahr":"YYYY", "Monat":"MM", "Tag":"DD",
509
509
  "Stunde":"hh", "Minute":"mm"},
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: weatherdb
3
- Version: 1.2.1
3
+ Version: 1.2.2
4
4
  Summary: This is a package to work with and to create the Weather Database which handles, checks, fills and corrects DWD Weather Station data.
5
5
  Author-email: Max Schmit <max.schmit@hydrology.uni-freiburg.de>
6
6
  License: GNU GENERAL PUBLIC LICENSE
@@ -1 +0,0 @@
1
- __version__ = "1.2.1"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes