eodash_catalog 0.0.32__tar.gz → 0.0.34__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.

Potentially problematic release.


This version of eodash_catalog might be problematic. Click here for more details.

Files changed (33) hide show
  1. {eodash_catalog-0.0.32 → eodash_catalog-0.0.34}/.bumpversion.cfg +1 -1
  2. {eodash_catalog-0.0.32 → eodash_catalog-0.0.34}/.github/workflows/ci.yml +1 -1
  3. {eodash_catalog-0.0.32 → eodash_catalog-0.0.34}/PKG-INFO +3 -3
  4. {eodash_catalog-0.0.32 → eodash_catalog-0.0.34}/pyproject.toml +2 -2
  5. {eodash_catalog-0.0.32 → eodash_catalog-0.0.34}/requirements.txt +3 -3
  6. {eodash_catalog-0.0.32 → eodash_catalog-0.0.34}/src/eodash_catalog/__about__.py +1 -1
  7. {eodash_catalog-0.0.32 → eodash_catalog-0.0.34}/src/eodash_catalog/endpoints.py +26 -7
  8. {eodash_catalog-0.0.32 → eodash_catalog-0.0.34}/.github/workflows/python-publish.yml +0 -0
  9. {eodash_catalog-0.0.32 → eodash_catalog-0.0.34}/.gitignore +0 -0
  10. {eodash_catalog-0.0.32 → eodash_catalog-0.0.34}/.vscode/extensions.json +0 -0
  11. {eodash_catalog-0.0.32 → eodash_catalog-0.0.34}/.vscode/settings.json +0 -0
  12. {eodash_catalog-0.0.32 → eodash_catalog-0.0.34}/LICENSE.txt +0 -0
  13. {eodash_catalog-0.0.32 → eodash_catalog-0.0.34}/README.md +0 -0
  14. {eodash_catalog-0.0.32 → eodash_catalog-0.0.34}/ruff.toml +0 -0
  15. {eodash_catalog-0.0.32 → eodash_catalog-0.0.34}/src/eodash_catalog/__init__.py +0 -0
  16. {eodash_catalog-0.0.32 → eodash_catalog-0.0.34}/src/eodash_catalog/duration.py +0 -0
  17. {eodash_catalog-0.0.32 → eodash_catalog-0.0.34}/src/eodash_catalog/generate_indicators.py +0 -0
  18. {eodash_catalog-0.0.32 → eodash_catalog-0.0.34}/src/eodash_catalog/sh_endpoint.py +0 -0
  19. {eodash_catalog-0.0.32 → eodash_catalog-0.0.34}/src/eodash_catalog/stac_handling.py +0 -0
  20. {eodash_catalog-0.0.32 → eodash_catalog-0.0.34}/src/eodash_catalog/thumbnails.py +0 -0
  21. {eodash_catalog-0.0.32 → eodash_catalog-0.0.34}/src/eodash_catalog/utils.py +0 -0
  22. {eodash_catalog-0.0.32 → eodash_catalog-0.0.34}/tests/__init__.py +0 -0
  23. {eodash_catalog-0.0.32 → eodash_catalog-0.0.34}/tests/test-data/regional_forecast.json +0 -0
  24. {eodash_catalog-0.0.32 → eodash_catalog-0.0.34}/tests/test_generate.py +0 -0
  25. {eodash_catalog-0.0.32 → eodash_catalog-0.0.34}/tests/testing-catalogs/testing.yaml +0 -0
  26. {eodash_catalog-0.0.32 → eodash_catalog-0.0.34}/tests/testing-collections/test_CROPOMAT1.yaml +0 -0
  27. {eodash_catalog-0.0.32 → eodash_catalog-0.0.34}/tests/testing-collections/test_see_solar_energy.yaml +0 -0
  28. {eodash_catalog-0.0.32 → eodash_catalog-0.0.34}/tests/testing-collections/test_tif_demo_1.yaml +0 -0
  29. {eodash_catalog-0.0.32 → eodash_catalog-0.0.34}/tests/testing-collections/test_tif_demo_2.yaml +0 -0
  30. {eodash_catalog-0.0.32 → eodash_catalog-0.0.34}/tests/testing-collections/test_wms_no_time.yaml +0 -0
  31. {eodash_catalog-0.0.32 → eodash_catalog-0.0.34}/tests/testing-indicators/test_indicator.yaml +0 -0
  32. {eodash_catalog-0.0.32 → eodash_catalog-0.0.34}/tests/testing-layers/baselayers.yaml +0 -0
  33. {eodash_catalog-0.0.32 → eodash_catalog-0.0.34}/tests/testing-layers/overlays.yaml +0 -0
@@ -1,5 +1,5 @@
1
1
  [bumpversion]
2
- current_version = 0.0.32
2
+ current_version = 0.0.34
3
3
  commit = True
4
4
  tag = True
5
5
  parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+)\.(?P<build>\d+))?
@@ -8,7 +8,7 @@ jobs:
8
8
  runs-on: ubuntu-latest
9
9
  strategy:
10
10
  matrix:
11
- python-version: ["3.10", "3.12"]
11
+ python-version: ["3.10", "3.11", "3.12"]
12
12
 
13
13
  steps:
14
14
  - uses: actions/checkout@v4
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: eodash_catalog
3
- Version: 0.0.32
3
+ Version: 0.0.34
4
4
  Summary: This package is intended to help create a compatible STAC catalog for the eodash dashboard client. It supports configuration of multiple endpoint types for information extraction.
5
5
  Project-URL: Documentation, https://github.com/eodash/eodash_catalog#readme
6
6
  Project-URL: Issues, https://github.com/eodash/eodash_catalog/issues
@@ -23,8 +23,8 @@ Requires-Dist: mergedeep
23
23
  Requires-Dist: oauthlib<3.3
24
24
  Requires-Dist: owslib
25
25
  Requires-Dist: pygeofilter[backend-native]==0.2.0
26
- Requires-Dist: pystac-client<0.6
27
- Requires-Dist: pystac[validation]<=1.8.3
26
+ Requires-Dist: pystac-client<1
27
+ Requires-Dist: pystac[validation]<2
28
28
  Requires-Dist: python-dateutil<3
29
29
  Requires-Dist: python-dotenv<1.1.0
30
30
  Requires-Dist: pyyaml<7
@@ -26,7 +26,7 @@ dependencies = [
26
26
  "oauthlib<3.3",
27
27
  "requests-oauthlib<1.3.2",
28
28
  "python-dotenv<1.1.0",
29
- "pystac-client<0.6",
29
+ "pystac-client<1",
30
30
  "pyyaml<7",
31
31
  "redis<4",
32
32
  "pygeofilter[backend-native]==0.2.0",
@@ -39,7 +39,7 @@ dependencies = [
39
39
  "structlog<22.0",
40
40
  "OWSLib",
41
41
  "spdx-lookup<=0.3.3",
42
- "pystac[validation]<=1.8.3",
42
+ "pystac[validation]<2",
43
43
  ]
44
44
  [project.scripts]
45
45
  eodash_catalog = "eodash_catalog.generate_indicators:process_catalogs"
@@ -3,7 +3,7 @@ setuptools<71
3
3
  oauthlib<3.3
4
4
  requests-oauthlib<1.3.2
5
5
  python-dotenv<1.1.0
6
- pystac-client<0.6
6
+ pystac-client==0.8.3
7
7
  pyyaml<7
8
8
  redis<4
9
9
  pygeofilter[backend-native]==0.2.0
@@ -14,9 +14,9 @@ python-dateutil<3
14
14
  swiftspec==0.0.2
15
15
  mergedeep
16
16
  structlog<22.0
17
- OWSLib<1.0
17
+ OWSLib==0.31
18
18
  spdx-lookup<=0.3.3
19
- pystac[validation]<=1.8.3
19
+ pystac[validation]==1.10.1
20
20
 
21
21
  # dev tooling
22
22
  pytest==8.1.1
@@ -1,4 +1,4 @@
1
1
  # SPDX-FileCopyrightText: 2024-present Daniel Santillan <daniel.santillan@eox.at>
2
2
  #
3
3
  # SPDX-License-Identifier: MIT
4
- __version__ = "0.0.32"
4
+ __version__ = "0.0.34"
@@ -93,7 +93,10 @@ def process_STAC_Datacube_Endpoint(
93
93
  unit = variables.get(endpoint_config.get("Variable")).get("unit")
94
94
  if unit and "yAxis" not in collection_config:
95
95
  collection_config["yAxis"] = unit
96
- collection.update_extent_from_items()
96
+ if datetimes:
97
+ collection.update_extent_from_items()
98
+ else:
99
+ LOGGER.warn(f"NO datetimes returned for collection: {collection_id}!")
97
100
 
98
101
  add_collection_information(catalog_config, collection, collection_config)
99
102
 
@@ -188,8 +191,9 @@ def process_STACAPI_Endpoint(
188
191
  ) -> Collection:
189
192
  if headers is None:
190
193
  headers = {}
194
+ collection_id = endpoint_config["CollectionId"]
191
195
  collection = get_or_create_collection(
192
- catalog, endpoint_config["CollectionId"], collection_config, catalog_config, endpoint_config
196
+ catalog, collection_id, collection_config, catalog_config, endpoint_config
193
197
  )
194
198
  datetime_query = ["1900-01-01T00:00:00Z", "3000-01-01T00:00:00Z"]
195
199
  if query := endpoint_config.get("Query"):
@@ -202,13 +206,15 @@ def process_STACAPI_Endpoint(
202
206
  if bbox is None:
203
207
  bbox = [-180, -90, 180, 90]
204
208
  results = api.search(
205
- collections=[endpoint_config["CollectionId"]],
209
+ collections=[collection_id],
206
210
  bbox=bbox,
207
211
  datetime=datetime_query, # type: ignore
208
212
  )
209
213
  # We keep track of potential duplicate times in this list
210
214
  added_times = {}
215
+ any_item_added = False
211
216
  for item in results.items():
217
+ any_item_added = True
212
218
  item_datetime = item.get_datetime()
213
219
  if item_datetime is not None:
214
220
  iso_date = item_datetime.isoformat()[:10]
@@ -268,8 +274,13 @@ def process_STACAPI_Endpoint(
268
274
  endpoint_config,
269
275
  item,
270
276
  )
271
- collection.update_extent_from_items()
272
-
277
+ if any_item_added:
278
+ collection.update_extent_from_items()
279
+ else:
280
+ LOGGER.warn(
281
+ f"""NO items returned for
282
+ bbox: {bbox}, datetime: {datetime_query}, collection: {collection_id}!"""
283
+ )
273
284
  # replace SH identifier with catalog identifier
274
285
  collection.id = collection_config["Name"]
275
286
  add_collection_information(catalog_config, collection, collection_config)
@@ -365,7 +376,10 @@ def handle_SH_WMS_endpoint(
365
376
  link.extra_fields["latlng"] = latlng
366
377
  link.extra_fields["country"] = location["Country"]
367
378
  link.extra_fields["city"] = location["Name"]
368
- collection.update_extent_from_items()
379
+ if location["Times"]:
380
+ collection.update_extent_from_items()
381
+ else:
382
+ LOGGER.warn(f"NO datetimes configured for collection: {collection_config['Name']}!")
369
383
  add_visualization_info(collection, collection_config, endpoint_config)
370
384
 
371
385
  root_collection.update_extent_from_items()
@@ -571,6 +585,8 @@ def handle_WMS_endpoint(
571
585
  link = collection.add_item(item)
572
586
  link.extra_fields["datetime"] = format_datetime_to_isostring_zulu(dt)
573
587
  collection.update_extent_from_items()
588
+ else:
589
+ LOGGER.warn(f"NO datetimes returned for collection: {collection_config['Name']}!")
574
590
 
575
591
  # Check if we should overwrite bbox
576
592
  if "OverwriteBBox" in endpoint_config:
@@ -913,6 +929,9 @@ def handle_raw_source(
913
929
  # eodash v4 compatibility, adding last referenced style to collection
914
930
  if style_link:
915
931
  collection.add_link(style_link)
932
+ collection.update_extent_from_items()
933
+ else:
934
+ LOGGER.warn(f"NO datetimes configured for collection: {collection_config['Name']}!")
935
+
916
936
  add_collection_information(catalog_config, collection, collection_config)
917
- collection.update_extent_from_items()
918
937
  return collection