weatherdb 1.2.2__tar.gz → 1.2.3__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.2 → weatherdb-1.2.3}/.gitlab-ci.yml +5 -6
  2. {weatherdb-1.2.2 → weatherdb-1.2.3}/CHANGES.md +7 -1
  3. {weatherdb-1.2.2 → weatherdb-1.2.3}/PKG-INFO +22 -3
  4. {weatherdb-1.2.2 → weatherdb-1.2.3}/docker/docker-compose.yaml +3 -1
  5. weatherdb-1.2.3/weatherdb/_version.py +1 -0
  6. {weatherdb-1.2.2 → weatherdb-1.2.3}/weatherdb/station/StationBases.py +1 -1
  7. {weatherdb-1.2.2 → weatherdb-1.2.3}/weatherdb/station/StationP.py +3 -3
  8. {weatherdb-1.2.2 → weatherdb-1.2.3}/weatherdb.egg-info/PKG-INFO +22 -3
  9. weatherdb-1.2.2/weatherdb/_version.py +0 -1
  10. {weatherdb-1.2.2 → weatherdb-1.2.3}/.dockerignore +0 -0
  11. {weatherdb-1.2.2 → weatherdb-1.2.3}/.github/workflows/cleanup-cache.yml +0 -0
  12. {weatherdb-1.2.2 → weatherdb-1.2.3}/.github/workflows/python-publish.yml +0 -0
  13. {weatherdb-1.2.2 → weatherdb-1.2.3}/.github/workflows/python-test.yml +0 -0
  14. {weatherdb-1.2.2 → weatherdb-1.2.3}/.gitignore +0 -0
  15. {weatherdb-1.2.2 → weatherdb-1.2.3}/.gitlab/merge_request_templates/new_version.md +0 -0
  16. {weatherdb-1.2.2 → weatherdb-1.2.3}/.readthedocs.yaml +0 -0
  17. {weatherdb-1.2.2 → weatherdb-1.2.3}/LICENSE +0 -0
  18. {weatherdb-1.2.2 → weatherdb-1.2.3}/MANIFEST.in +0 -0
  19. {weatherdb-1.2.2 → weatherdb-1.2.3}/README.md +0 -0
  20. {weatherdb-1.2.2 → weatherdb-1.2.3}/docker/Dockerfile +0 -0
  21. {weatherdb-1.2.2 → weatherdb-1.2.3}/docker/docker-compose_test.yaml +0 -0
  22. {weatherdb-1.2.2 → weatherdb-1.2.3}/docker/start-docker-test.sh +0 -0
  23. {weatherdb-1.2.2 → weatherdb-1.2.3}/docs/requirements.txt +0 -0
  24. {weatherdb-1.2.2 → weatherdb-1.2.3}/docs/source/Changelog.md +0 -0
  25. {weatherdb-1.2.2 → weatherdb-1.2.3}/docs/source/License.rst +0 -0
  26. {weatherdb-1.2.2 → weatherdb-1.2.3}/docs/source/Methode.md +0 -0
  27. {weatherdb-1.2.2 → weatherdb-1.2.3}/docs/source/_static/custom.css +0 -0
  28. {weatherdb-1.2.2 → weatherdb-1.2.3}/docs/source/_static/favicon.ico +0 -0
  29. {weatherdb-1.2.2 → weatherdb-1.2.3}/docs/source/_static/logo.png +0 -0
  30. {weatherdb-1.2.2 → weatherdb-1.2.3}/docs/source/api/api.rst +0 -0
  31. {weatherdb-1.2.2 → weatherdb-1.2.3}/docs/source/api/cli.rst +0 -0
  32. {weatherdb-1.2.2 → weatherdb-1.2.3}/docs/source/api/weatherdb.broker.rst +0 -0
  33. {weatherdb-1.2.2 → weatherdb-1.2.3}/docs/source/api/weatherdb.config.rst +0 -0
  34. {weatherdb-1.2.2 → weatherdb-1.2.3}/docs/source/api/weatherdb.db.rst +0 -0
  35. {weatherdb-1.2.2 → weatherdb-1.2.3}/docs/source/api/weatherdb.rst +0 -0
  36. {weatherdb-1.2.2 → weatherdb-1.2.3}/docs/source/api/weatherdb.station.GroupStation.rst +0 -0
  37. {weatherdb-1.2.2 → weatherdb-1.2.3}/docs/source/api/weatherdb.station.StationBases.rst +0 -0
  38. {weatherdb-1.2.2 → weatherdb-1.2.3}/docs/source/api/weatherdb.station.StationET.rst +0 -0
  39. {weatherdb-1.2.2 → weatherdb-1.2.3}/docs/source/api/weatherdb.station.StationP.rst +0 -0
  40. {weatherdb-1.2.2 → weatherdb-1.2.3}/docs/source/api/weatherdb.station.StationPD.rst +0 -0
  41. {weatherdb-1.2.2 → weatherdb-1.2.3}/docs/source/api/weatherdb.station.StationT.rst +0 -0
  42. {weatherdb-1.2.2 → weatherdb-1.2.3}/docs/source/api/weatherdb.station.rst +0 -0
  43. {weatherdb-1.2.2 → weatherdb-1.2.3}/docs/source/api/weatherdb.stations.StationsBase.rst +0 -0
  44. {weatherdb-1.2.2 → weatherdb-1.2.3}/docs/source/api/weatherdb.stations.StationsET.rst +0 -0
  45. {weatherdb-1.2.2 → weatherdb-1.2.3}/docs/source/api/weatherdb.stations.StationsP.rst +0 -0
  46. {weatherdb-1.2.2 → weatherdb-1.2.3}/docs/source/api/weatherdb.stations.StationsPD.rst +0 -0
  47. {weatherdb-1.2.2 → weatherdb-1.2.3}/docs/source/api/weatherdb.stations.StationsT.rst +0 -0
  48. {weatherdb-1.2.2 → weatherdb-1.2.3}/docs/source/api/weatherdb.stations.rst +0 -0
  49. {weatherdb-1.2.2 → weatherdb-1.2.3}/docs/source/api/weatherdb.utils.rst +0 -0
  50. {weatherdb-1.2.2 → weatherdb-1.2.3}/docs/source/conf.py +0 -0
  51. {weatherdb-1.2.2 → weatherdb-1.2.3}/docs/source/index.rst +0 -0
  52. {weatherdb-1.2.2 → weatherdb-1.2.3}/docs/source/setup/Configuration.md +0 -0
  53. {weatherdb-1.2.2 → weatherdb-1.2.3}/docs/source/setup/Hosting.md +0 -0
  54. {weatherdb-1.2.2 → weatherdb-1.2.3}/docs/source/setup/Install.md +0 -0
  55. {weatherdb-1.2.2 → weatherdb-1.2.3}/docs/source/setup/Quickstart.md +0 -0
  56. {weatherdb-1.2.2 → weatherdb-1.2.3}/docs/source/setup/setup.rst +0 -0
  57. {weatherdb-1.2.2 → weatherdb-1.2.3}/pyproject.toml +0 -0
  58. {weatherdb-1.2.2 → weatherdb-1.2.3}/setup.cfg +0 -0
  59. {weatherdb-1.2.2 → weatherdb-1.2.3}/tests/test-data/DEM/COP-DEM_GLO-30-DGED__2023_1_clipped.tif +0 -0
  60. {weatherdb-1.2.2 → weatherdb-1.2.3}/tests/test-data/DEM/README.md +0 -0
  61. {weatherdb-1.2.2 → weatherdb-1.2.3}/tests/test-data/DEM/eula_F.pdf +0 -0
  62. {weatherdb-1.2.2 → weatherdb-1.2.3}/tests/test-data/regionalisation/DWD-grid_ma_1991_2020_DGM25_clipped.tif +0 -0
  63. {weatherdb-1.2.2 → weatherdb-1.2.3}/tests/test-data/regionalisation/HYRAS_ma_1991_2020_DGM25_clipped.tif +0 -0
  64. {weatherdb-1.2.2 → weatherdb-1.2.3}/tests/test-data/regionalisation/README.md +0 -0
  65. {weatherdb-1.2.2 → weatherdb-1.2.3}/tests/test-data/test-data-config.ini +0 -0
  66. {weatherdb-1.2.2 → weatherdb-1.2.3}/weatherdb/__init__.py +0 -0
  67. {weatherdb-1.2.2 → weatherdb-1.2.3}/weatherdb/alembic/README.md +0 -0
  68. {weatherdb-1.2.2 → weatherdb-1.2.3}/weatherdb/alembic/alembic.ini +0 -0
  69. {weatherdb-1.2.2 → weatherdb-1.2.3}/weatherdb/alembic/config.py +0 -0
  70. {weatherdb-1.2.2 → weatherdb-1.2.3}/weatherdb/alembic/env.py +0 -0
  71. {weatherdb-1.2.2 → weatherdb-1.2.3}/weatherdb/alembic/script.py.mako +0 -0
  72. {weatherdb-1.2.2 → weatherdb-1.2.3}/weatherdb/alembic/versions/V1.0.0_initial_database_creation.py +0 -0
  73. {weatherdb-1.2.2 → weatherdb-1.2.3}/weatherdb/alembic/versions/V1.0.2_more_charachters_for_settings+term_station_ma_raster.py +0 -0
  74. {weatherdb-1.2.2 → weatherdb-1.2.3}/weatherdb/alembic/versions/V1.0.5_fix-ma-raster-values.py +0 -0
  75. {weatherdb-1.2.2 → weatherdb-1.2.3}/weatherdb/alembic/versions/V1.0.6_update-views.py +0 -0
  76. {weatherdb-1.2.2 → weatherdb-1.2.3}/weatherdb/broker.py +0 -0
  77. {weatherdb-1.2.2 → weatherdb-1.2.3}/weatherdb/cli.py +0 -0
  78. {weatherdb-1.2.2 → weatherdb-1.2.3}/weatherdb/config/ConfigParser.py +0 -0
  79. {weatherdb-1.2.2 → weatherdb-1.2.3}/weatherdb/config/__init__.py +0 -0
  80. {weatherdb-1.2.2 → weatherdb-1.2.3}/weatherdb/config/config_default.ini +0 -0
  81. {weatherdb-1.2.2 → weatherdb-1.2.3}/weatherdb/db/__init__.py +0 -0
  82. {weatherdb-1.2.2 → weatherdb-1.2.3}/weatherdb/db/connections.py +0 -0
  83. {weatherdb-1.2.2 → weatherdb-1.2.3}/weatherdb/db/fixtures/RichterParameters.json +0 -0
  84. {weatherdb-1.2.2 → weatherdb-1.2.3}/weatherdb/db/models.py +0 -0
  85. {weatherdb-1.2.2 → weatherdb-1.2.3}/weatherdb/db/queries/get_quotient.py +0 -0
  86. {weatherdb-1.2.2 → weatherdb-1.2.3}/weatherdb/db/views.py +0 -0
  87. {weatherdb-1.2.2 → weatherdb-1.2.3}/weatherdb/station/GroupStation.py +0 -0
  88. {weatherdb-1.2.2 → weatherdb-1.2.3}/weatherdb/station/StationET.py +0 -0
  89. {weatherdb-1.2.2 → weatherdb-1.2.3}/weatherdb/station/StationPD.py +0 -0
  90. {weatherdb-1.2.2 → weatherdb-1.2.3}/weatherdb/station/StationT.py +0 -0
  91. {weatherdb-1.2.2 → weatherdb-1.2.3}/weatherdb/station/__init__.py +0 -0
  92. {weatherdb-1.2.2 → weatherdb-1.2.3}/weatherdb/station/constants.py +0 -0
  93. {weatherdb-1.2.2 → weatherdb-1.2.3}/weatherdb/stations/GroupStations.py +0 -0
  94. {weatherdb-1.2.2 → weatherdb-1.2.3}/weatherdb/stations/StationsBase.py +0 -0
  95. {weatherdb-1.2.2 → weatherdb-1.2.3}/weatherdb/stations/StationsBaseTET.py +0 -0
  96. {weatherdb-1.2.2 → weatherdb-1.2.3}/weatherdb/stations/StationsET.py +0 -0
  97. {weatherdb-1.2.2 → weatherdb-1.2.3}/weatherdb/stations/StationsP.py +0 -0
  98. {weatherdb-1.2.2 → weatherdb-1.2.3}/weatherdb/stations/StationsPD.py +0 -0
  99. {weatherdb-1.2.2 → weatherdb-1.2.3}/weatherdb/stations/StationsT.py +0 -0
  100. {weatherdb-1.2.2 → weatherdb-1.2.3}/weatherdb/stations/__init__.py +0 -0
  101. {weatherdb-1.2.2 → weatherdb-1.2.3}/weatherdb/utils/TimestampPeriod.py +0 -0
  102. {weatherdb-1.2.2 → weatherdb-1.2.3}/weatherdb/utils/__init__.py +0 -0
  103. {weatherdb-1.2.2 → weatherdb-1.2.3}/weatherdb/utils/dwd.py +0 -0
  104. {weatherdb-1.2.2 → weatherdb-1.2.3}/weatherdb/utils/geometry.py +0 -0
  105. {weatherdb-1.2.2 → weatherdb-1.2.3}/weatherdb/utils/get_data.py +0 -0
  106. {weatherdb-1.2.2 → weatherdb-1.2.3}/weatherdb/utils/logging.py +0 -0
  107. {weatherdb-1.2.2 → weatherdb-1.2.3}/weatherdb.egg-info/SOURCES.txt +0 -0
  108. {weatherdb-1.2.2 → weatherdb-1.2.3}/weatherdb.egg-info/dependency_links.txt +0 -0
  109. {weatherdb-1.2.2 → weatherdb-1.2.3}/weatherdb.egg-info/entry_points.txt +0 -0
  110. {weatherdb-1.2.2 → weatherdb-1.2.3}/weatherdb.egg-info/requires.txt +0 -0
  111. {weatherdb-1.2.2 → weatherdb-1.2.3}/weatherdb.egg-info/top_level.txt +0 -0
@@ -16,7 +16,7 @@ test_single:
16
16
  - if: $CI_PIPELINE_SOURCE == "merge_request_event"
17
17
  image: "python:$PYTHON_VERSION"
18
18
  services:
19
- - name: postgis/postgis:16-3.4
19
+ - name: timescale/timescaledb-ha:pg17
20
20
  alias: postgres
21
21
  command: ["postgres", "-c", "fsync=off"]
22
22
  before_script:
@@ -44,7 +44,7 @@ test_single:
44
44
  - $WEATHERDB_TEST_ARTIFACT_DIR/*
45
45
  interruptible: true
46
46
  variables:
47
- PYTHON_VERSION: 3.8
47
+ PYTHON_VERSION: 3.12
48
48
  PIP_CACHE_DIR: $CI_PROJECT_DIR/.cache/pip
49
49
  POSTGRES_USER: postgres
50
50
  POSTGRES_PASSWORD: postgres
@@ -77,7 +77,7 @@ test_matrix:
77
77
  extends: test_single
78
78
  parallel:
79
79
  matrix:
80
- - PY_VERSION: ["3.9","3.10","3.11","3.12","3.13"]
80
+ - PY_VERSION: ["3.8", "3.9","3.10","3.11","3.13"]
81
81
  variables:
82
82
  PYTHON_VERSION: $PY_VERSION
83
83
 
@@ -92,8 +92,7 @@ test_download_rasters:
92
92
  variables:
93
93
  PYTHON_VERSION: $PY_VERSION
94
94
  parallel:
95
- matrix:
96
- - PY_VERSION: ["3.9","3.10","3.11","3.12","3.13"]
95
+ matrix: !reference [test_matrix, parallel, matrix ]
97
96
 
98
97
  build:
99
98
  stage: build
@@ -101,7 +100,7 @@ build:
101
100
  - if: $CI_COMMIT_TAG =~ /^[Vv]*\d+\.\d+\.\d+$/
102
101
  dependencies:
103
102
  - test_matrix
104
- image: python:3.11
103
+ image: python:3.12
105
104
  script:
106
105
  - python -m pip install --upgrade pip --root-user-action=ignore
107
106
  - python -m pip install setuptools wheel build setuptools-scm --root-user-action=ignore
@@ -1,5 +1,11 @@
1
1
  # Change-log
2
2
 
3
+ ## Version 1.2.3
4
+
5
+ - fix: dropping stations
6
+ - fix: test environment as DWD kicked station 2388
7
+ - docker: optimize image with timescaledb image instead of postgis
8
+
3
9
  ## Version 1.2.2
4
10
 
5
11
  - config: define utf-8 as default encoding for config files
@@ -7,7 +13,7 @@
7
13
 
8
14
  ## Version 1.2.1
9
15
 
10
- - fix: filllup linear regression did not take configuration value and therefor did never work
16
+ - fix: fillup linear regression did not take configuration value and therefor did never work
11
17
  - config: change LINEAR_INTERPOLATION_LIMIT to be a category
12
18
  - cli: add version parameter
13
19
  - multiprocessing: make process count configurable through user configuration
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: weatherdb
3
- Version: 1.2.2
3
+ Version: 1.2.3
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
@@ -693,8 +693,27 @@ Classifier: Intended Audience :: Science/Research
693
693
  Classifier: Natural Language :: English
694
694
  Requires-Python: <3.14,>=3.8
695
695
  Description-Content-Type: text/markdown
696
- Provides-Extra: optionals
697
696
  License-File: LICENSE
697
+ Requires-Dist: geopandas
698
+ Requires-Dist: shapely>=2
699
+ Requires-Dist: pandas
700
+ Requires-Dist: numpy
701
+ Requires-Dist: progressbar2
702
+ Requires-Dist: rasterio
703
+ Requires-Dist: sqlalchemy>2.0
704
+ Requires-Dist: psycopg2-binary
705
+ Requires-Dist: GeoAlchemy2
706
+ Requires-Dist: alembic
707
+ Requires-Dist: requests
708
+ Requires-Dist: keyring
709
+ Requires-Dist: keyrings.alt; sys_platform == "linux"
710
+ Requires-Dist: rasterstats
711
+ Requires-Dist: click
712
+ Requires-Dist: setuptools>=61.0
713
+ Requires-Dist: setuptools_scm
714
+ Provides-Extra: optionals
715
+ Requires-Dist: coloredlogs; extra == "optionals"
716
+ Requires-Dist: colorama; extra == "optionals"
698
717
 
699
718
  # WeatherDB - module
700
719
 
@@ -38,11 +38,13 @@ services:
38
38
  target: /src/tests
39
39
 
40
40
  db:
41
- image: postgis/postgis:16-3.4
41
+ image: timescale/timescaledb-ha:pg17 # about 1 minute faster for tests
42
+ # image: postgis/postgis:17-3.4
42
43
  environment:
43
44
  POSTGRES_DB: weatherdb
44
45
  POSTGRES_USER: postgres
45
46
  POSTGRES_PASSWORD_FILE: /run/secrets/db_password
47
+ shm_size: '2g'
46
48
  ports:
47
49
  - 5454:5432
48
50
  volumes:
@@ -0,0 +1 @@
1
+ __version__ = "1.2.3"
@@ -595,7 +595,7 @@ class StationBase:
595
595
  DROP TABLE IF EXISTS timeseries."{self.id}_{self._para}";
596
596
  DELETE FROM meta_{self._para} WHERE station_id={self.id};
597
597
  DELETE FROM station_ma_raster WHERE station_id={self.id} and parameter='{self._para}';
598
- DELETE FROM station_ma_timeseries WHERE station_id={self.id} and parameter='{self._para}';
598
+ DELETE FROM station_ma_timeserie WHERE station_id={self.id} and parameter='{self._para}';
599
599
  INSERT INTO dropped_stations(station_id, parameter, why, timestamp)
600
600
  VALUES ('{self.id}', '{self._para}', '{why}', NOW())
601
601
  ON CONFLICT (station_id, parameter)
@@ -240,8 +240,8 @@ class StationP(StationPBase):
240
240
  @db_engine.deco_create_privilege
241
241
  def _create_timeseries_table(self):
242
242
  """Create the timeseries table in the DB if it is not yet existing."""
243
- sql_add_table = '''
244
- CREATE TABLE IF NOT EXISTS timeseries."{stid}_{para}" (
243
+ sql_add_table = f'''
244
+ CREATE TABLE IF NOT EXISTS timeseries."{self.id}_{self._para}" (
245
245
  timestamp timestamp PRIMARY KEY,
246
246
  raw int4,
247
247
  qn smallint,
@@ -250,7 +250,7 @@ class StationP(StationPBase):
250
250
  filled_by int2,
251
251
  corr int4
252
252
  );
253
- '''.format(stid=self.id, para=self._para)
253
+ '''
254
254
  with db_engine.connect() as con:
255
255
  con.execute(sqltxt(sql_add_table))
256
256
  con.commit()
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: weatherdb
3
- Version: 1.2.2
3
+ Version: 1.2.3
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
@@ -693,8 +693,27 @@ Classifier: Intended Audience :: Science/Research
693
693
  Classifier: Natural Language :: English
694
694
  Requires-Python: <3.14,>=3.8
695
695
  Description-Content-Type: text/markdown
696
- Provides-Extra: optionals
697
696
  License-File: LICENSE
697
+ Requires-Dist: geopandas
698
+ Requires-Dist: shapely>=2
699
+ Requires-Dist: pandas
700
+ Requires-Dist: numpy
701
+ Requires-Dist: progressbar2
702
+ Requires-Dist: rasterio
703
+ Requires-Dist: sqlalchemy>2.0
704
+ Requires-Dist: psycopg2-binary
705
+ Requires-Dist: GeoAlchemy2
706
+ Requires-Dist: alembic
707
+ Requires-Dist: requests
708
+ Requires-Dist: keyring
709
+ Requires-Dist: keyrings.alt; sys_platform == "linux"
710
+ Requires-Dist: rasterstats
711
+ Requires-Dist: click
712
+ Requires-Dist: setuptools>=61.0
713
+ Requires-Dist: setuptools_scm
714
+ Provides-Extra: optionals
715
+ Requires-Dist: coloredlogs; extra == "optionals"
716
+ Requires-Dist: colorama; extra == "optionals"
698
717
 
699
718
  # WeatherDB - module
700
719
 
@@ -1 +0,0 @@
1
- __version__ = "1.2.2"
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
File without changes