eodash_catalog 0.1.6__tar.gz → 0.1.8__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.
- {eodash_catalog-0.1.6 → eodash_catalog-0.1.8}/.bumpversion.cfg +1 -1
- {eodash_catalog-0.1.6 → eodash_catalog-0.1.8}/PKG-INFO +1 -1
- {eodash_catalog-0.1.6 → eodash_catalog-0.1.8}/src/eodash_catalog/__about__.py +1 -1
- {eodash_catalog-0.1.6 → eodash_catalog-0.1.8}/src/eodash_catalog/endpoints.py +12 -1
- {eodash_catalog-0.1.6 → eodash_catalog-0.1.8}/src/eodash_catalog/generate_indicators.py +12 -3
- {eodash_catalog-0.1.6 → eodash_catalog-0.1.8}/.github/workflows/ci.yml +0 -0
- {eodash_catalog-0.1.6 → eodash_catalog-0.1.8}/.github/workflows/python-publish.yml +0 -0
- {eodash_catalog-0.1.6 → eodash_catalog-0.1.8}/.gitignore +0 -0
- {eodash_catalog-0.1.6 → eodash_catalog-0.1.8}/.vscode/extensions.json +0 -0
- {eodash_catalog-0.1.6 → eodash_catalog-0.1.8}/.vscode/settings.json +0 -0
- {eodash_catalog-0.1.6 → eodash_catalog-0.1.8}/LICENSE.txt +0 -0
- {eodash_catalog-0.1.6 → eodash_catalog-0.1.8}/README.md +0 -0
- {eodash_catalog-0.1.6 → eodash_catalog-0.1.8}/pyproject.toml +0 -0
- {eodash_catalog-0.1.6 → eodash_catalog-0.1.8}/requirements.txt +0 -0
- {eodash_catalog-0.1.6 → eodash_catalog-0.1.8}/ruff.toml +0 -0
- {eodash_catalog-0.1.6 → eodash_catalog-0.1.8}/src/eodash_catalog/__init__.py +0 -0
- {eodash_catalog-0.1.6 → eodash_catalog-0.1.8}/src/eodash_catalog/duration.py +0 -0
- {eodash_catalog-0.1.6 → eodash_catalog-0.1.8}/src/eodash_catalog/sh_endpoint.py +0 -0
- {eodash_catalog-0.1.6 → eodash_catalog-0.1.8}/src/eodash_catalog/stac_handling.py +0 -0
- {eodash_catalog-0.1.6 → eodash_catalog-0.1.8}/src/eodash_catalog/thumbnails.py +0 -0
- {eodash_catalog-0.1.6 → eodash_catalog-0.1.8}/src/eodash_catalog/utils.py +0 -0
- {eodash_catalog-0.1.6 → eodash_catalog-0.1.8}/tests/__init__.py +0 -0
- {eodash_catalog-0.1.6 → eodash_catalog-0.1.8}/tests/test-data/regional_forecast.json +0 -0
- {eodash_catalog-0.1.6 → eodash_catalog-0.1.8}/tests/test_generate.py +0 -0
- {eodash_catalog-0.1.6 → eodash_catalog-0.1.8}/tests/testing-catalogs/testing.yaml +0 -0
- {eodash_catalog-0.1.6 → eodash_catalog-0.1.8}/tests/testing-collections/test_CROPOMAT1.yaml +0 -0
- {eodash_catalog-0.1.6 → eodash_catalog-0.1.8}/tests/testing-collections/test_see_solar_energy.yaml +0 -0
- {eodash_catalog-0.1.6 → eodash_catalog-0.1.8}/tests/testing-collections/test_tif_demo_1.yaml +0 -0
- {eodash_catalog-0.1.6 → eodash_catalog-0.1.8}/tests/testing-collections/test_tif_demo_2.yaml +0 -0
- {eodash_catalog-0.1.6 → eodash_catalog-0.1.8}/tests/testing-collections/test_wms_no_time.yaml +0 -0
- {eodash_catalog-0.1.6 → eodash_catalog-0.1.8}/tests/testing-indicators/test_indicator.yaml +0 -0
- {eodash_catalog-0.1.6 → eodash_catalog-0.1.8}/tests/testing-layers/baselayers.yaml +0 -0
- {eodash_catalog-0.1.6 → eodash_catalog-0.1.8}/tests/testing-layers/overlays.yaml +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: eodash_catalog
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.8
|
|
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
|
|
@@ -120,6 +120,7 @@ def process_STAC_Datacube_Endpoint(
|
|
|
120
120
|
geometry=item.geometry,
|
|
121
121
|
datetime=dt,
|
|
122
122
|
)
|
|
123
|
+
add_visualization_info(new_item, collection_config, endpoint_config)
|
|
123
124
|
link = collection.add_item(new_item)
|
|
124
125
|
# bubble up information we want to the link
|
|
125
126
|
link.extra_fields["datetime"] = format_datetime_to_isostring_zulu(dt)
|
|
@@ -670,6 +671,9 @@ def add_visualization_info(
|
|
|
670
671
|
) -> None:
|
|
671
672
|
extra_fields: dict[str, list[str] | dict[str, str]] = {}
|
|
672
673
|
if "Attribution" in endpoint_config:
|
|
674
|
+
stac_object.stac_extensions.append(
|
|
675
|
+
"https://stac-extensions.github.io/attribution/v0.1.0/schema.json"
|
|
676
|
+
)
|
|
673
677
|
extra_fields["attribution"] = endpoint_config["Attribution"]
|
|
674
678
|
# add extension reference
|
|
675
679
|
if endpoint_config["Name"] == "Sentinel Hub" or endpoint_config["Name"] == "Sentinel Hub WMS":
|
|
@@ -821,13 +825,15 @@ def add_visualization_info(
|
|
|
821
825
|
data_projection = str(endpoint_config.get("DataProjection", 3857))
|
|
822
826
|
epsg_prefix = "" if "EPSG:" in data_projection else "EPSG:"
|
|
823
827
|
crs = f"{epsg_prefix}{data_projection}"
|
|
828
|
+
time = stac_object.get_datetime() if isinstance(stac_object, Item) else "{time}"
|
|
824
829
|
target_url = (
|
|
825
|
-
"{}/tiles/{}/{}/{{z}}/{{y}}/{{x}}" "?crs={}&time={
|
|
830
|
+
"{}/tiles/{}/{}/{{z}}/{{y}}/{{x}}" "?crs={}&time={}&vmin={}&vmax={}&cbar={}"
|
|
826
831
|
).format(
|
|
827
832
|
endpoint_config["EndPoint"],
|
|
828
833
|
endpoint_config["DatacubeId"],
|
|
829
834
|
endpoint_config["Variable"],
|
|
830
835
|
crs,
|
|
836
|
+
time,
|
|
831
837
|
vmin,
|
|
832
838
|
vmax,
|
|
833
839
|
cbar,
|
|
@@ -989,6 +995,11 @@ def handle_raw_source(
|
|
|
989
995
|
assets=assets,
|
|
990
996
|
extra_fields={},
|
|
991
997
|
)
|
|
998
|
+
if "Attribution" in endpoint_config:
|
|
999
|
+
item.stac_extensions.append(
|
|
1000
|
+
"https://stac-extensions.github.io/attribution/v0.1.0/schema.json"
|
|
1001
|
+
)
|
|
1002
|
+
asset.extra_fields["attribution"] = endpoint_config["Attribution"]
|
|
992
1003
|
add_projection_info(
|
|
993
1004
|
endpoint_config,
|
|
994
1005
|
item,
|
|
@@ -179,6 +179,7 @@ def process_indicator_file(
|
|
|
179
179
|
f"{options.collectionspath}/{collection}.yaml",
|
|
180
180
|
parent_indicator,
|
|
181
181
|
options,
|
|
182
|
+
"Disable" in indicator_config and collection in indicator_config["Disable"],
|
|
182
183
|
)
|
|
183
184
|
else:
|
|
184
185
|
# we assume that collection files can also be loaded directly
|
|
@@ -200,7 +201,11 @@ def process_indicator_file(
|
|
|
200
201
|
|
|
201
202
|
@retry((Exception), tries=3, delay=5, backoff=2, logger=LOGGER)
|
|
202
203
|
def process_collection_file(
|
|
203
|
-
catalog_config: dict,
|
|
204
|
+
catalog_config: dict,
|
|
205
|
+
file_path: str,
|
|
206
|
+
catalog: Catalog | Collection,
|
|
207
|
+
options: Options,
|
|
208
|
+
disable=False,
|
|
204
209
|
):
|
|
205
210
|
LOGGER.info(f"Processing collection: {file_path}")
|
|
206
211
|
with open(file_path) as f:
|
|
@@ -270,7 +275,9 @@ def process_collection_file(
|
|
|
270
275
|
if collection:
|
|
271
276
|
add_single_item_if_collection_empty(collection)
|
|
272
277
|
add_projection_info(endpoint_config, collection)
|
|
273
|
-
add_to_catalog(
|
|
278
|
+
add_to_catalog(
|
|
279
|
+
collection, catalog, endpoint_config, collection_config, disable
|
|
280
|
+
)
|
|
274
281
|
else:
|
|
275
282
|
raise Exception(
|
|
276
283
|
f"No collection was generated for resource {endpoint_config}"
|
|
@@ -362,7 +369,7 @@ def process_collection_file(
|
|
|
362
369
|
|
|
363
370
|
|
|
364
371
|
def add_to_catalog(
|
|
365
|
-
collection: Collection, catalog: Catalog, endpoint: dict, collection_config: dict
|
|
372
|
+
collection: Collection, catalog: Catalog, endpoint: dict, collection_config: dict, disable=False
|
|
366
373
|
):
|
|
367
374
|
# check if already in catalog, if it is do not re-add it
|
|
368
375
|
# TODO: probably we should add to the catalog only when creating
|
|
@@ -392,6 +399,8 @@ def add_to_catalog(
|
|
|
392
399
|
if "Themes" in collection_config:
|
|
393
400
|
link.extra_fields["themes"] = collection_config["Themes"]
|
|
394
401
|
# Check for summaries and bubble up info
|
|
402
|
+
if disable:
|
|
403
|
+
link.extra_fields["roles"] = ["disable"]
|
|
395
404
|
if collection.summaries.lists:
|
|
396
405
|
for summary in collection.summaries.lists:
|
|
397
406
|
link.extra_fields[summary] = collection.summaries.lists[summary]
|
|
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
|
|
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
|
{eodash_catalog-0.1.6 → eodash_catalog-0.1.8}/tests/testing-collections/test_see_solar_energy.yaml
RENAMED
|
File without changes
|
{eodash_catalog-0.1.6 → eodash_catalog-0.1.8}/tests/testing-collections/test_tif_demo_1.yaml
RENAMED
|
File without changes
|
{eodash_catalog-0.1.6 → eodash_catalog-0.1.8}/tests/testing-collections/test_tif_demo_2.yaml
RENAMED
|
File without changes
|
{eodash_catalog-0.1.6 → eodash_catalog-0.1.8}/tests/testing-collections/test_wms_no_time.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|