eodash_catalog 0.1.5__tar.gz → 0.1.7__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.5 → eodash_catalog-0.1.7}/.bumpversion.cfg +1 -1
- {eodash_catalog-0.1.5 → eodash_catalog-0.1.7}/PKG-INFO +1 -1
- {eodash_catalog-0.1.5 → eodash_catalog-0.1.7}/src/eodash_catalog/__about__.py +1 -1
- {eodash_catalog-0.1.5 → eodash_catalog-0.1.7}/src/eodash_catalog/endpoints.py +14 -1
- {eodash_catalog-0.1.5 → eodash_catalog-0.1.7}/src/eodash_catalog/generate_indicators.py +17 -4
- {eodash_catalog-0.1.5 → eodash_catalog-0.1.7}/.github/workflows/ci.yml +0 -0
- {eodash_catalog-0.1.5 → eodash_catalog-0.1.7}/.github/workflows/python-publish.yml +0 -0
- {eodash_catalog-0.1.5 → eodash_catalog-0.1.7}/.gitignore +0 -0
- {eodash_catalog-0.1.5 → eodash_catalog-0.1.7}/.vscode/extensions.json +0 -0
- {eodash_catalog-0.1.5 → eodash_catalog-0.1.7}/.vscode/settings.json +0 -0
- {eodash_catalog-0.1.5 → eodash_catalog-0.1.7}/LICENSE.txt +0 -0
- {eodash_catalog-0.1.5 → eodash_catalog-0.1.7}/README.md +0 -0
- {eodash_catalog-0.1.5 → eodash_catalog-0.1.7}/pyproject.toml +0 -0
- {eodash_catalog-0.1.5 → eodash_catalog-0.1.7}/requirements.txt +0 -0
- {eodash_catalog-0.1.5 → eodash_catalog-0.1.7}/ruff.toml +0 -0
- {eodash_catalog-0.1.5 → eodash_catalog-0.1.7}/src/eodash_catalog/__init__.py +0 -0
- {eodash_catalog-0.1.5 → eodash_catalog-0.1.7}/src/eodash_catalog/duration.py +0 -0
- {eodash_catalog-0.1.5 → eodash_catalog-0.1.7}/src/eodash_catalog/sh_endpoint.py +0 -0
- {eodash_catalog-0.1.5 → eodash_catalog-0.1.7}/src/eodash_catalog/stac_handling.py +0 -0
- {eodash_catalog-0.1.5 → eodash_catalog-0.1.7}/src/eodash_catalog/thumbnails.py +0 -0
- {eodash_catalog-0.1.5 → eodash_catalog-0.1.7}/src/eodash_catalog/utils.py +0 -0
- {eodash_catalog-0.1.5 → eodash_catalog-0.1.7}/tests/__init__.py +0 -0
- {eodash_catalog-0.1.5 → eodash_catalog-0.1.7}/tests/test-data/regional_forecast.json +0 -0
- {eodash_catalog-0.1.5 → eodash_catalog-0.1.7}/tests/test_generate.py +0 -0
- {eodash_catalog-0.1.5 → eodash_catalog-0.1.7}/tests/testing-catalogs/testing.yaml +0 -0
- {eodash_catalog-0.1.5 → eodash_catalog-0.1.7}/tests/testing-collections/test_CROPOMAT1.yaml +0 -0
- {eodash_catalog-0.1.5 → eodash_catalog-0.1.7}/tests/testing-collections/test_see_solar_energy.yaml +0 -0
- {eodash_catalog-0.1.5 → eodash_catalog-0.1.7}/tests/testing-collections/test_tif_demo_1.yaml +0 -0
- {eodash_catalog-0.1.5 → eodash_catalog-0.1.7}/tests/testing-collections/test_tif_demo_2.yaml +0 -0
- {eodash_catalog-0.1.5 → eodash_catalog-0.1.7}/tests/testing-collections/test_wms_no_time.yaml +0 -0
- {eodash_catalog-0.1.5 → eodash_catalog-0.1.7}/tests/testing-indicators/test_indicator.yaml +0 -0
- {eodash_catalog-0.1.5 → eodash_catalog-0.1.7}/tests/testing-layers/baselayers.yaml +0 -0
- {eodash_catalog-0.1.5 → eodash_catalog-0.1.7}/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.7
|
|
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,
|
|
@@ -970,6 +976,8 @@ def handle_raw_source(
|
|
|
970
976
|
if endpoint_config["Name"] == "COG source":
|
|
971
977
|
style_type = "text/cog-styles"
|
|
972
978
|
media_type = "image/tiff"
|
|
979
|
+
if endpoint_config["Name"] == "FlatGeobuf source":
|
|
980
|
+
media_type = "application/vnd.flatgeobuf"
|
|
973
981
|
for a in time_entry["Assets"]:
|
|
974
982
|
asset = Asset(
|
|
975
983
|
href=a["File"], roles=["data"], media_type=media_type, extra_fields={}
|
|
@@ -987,6 +995,11 @@ def handle_raw_source(
|
|
|
987
995
|
assets=assets,
|
|
988
996
|
extra_fields={},
|
|
989
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"]
|
|
990
1003
|
add_projection_info(
|
|
991
1004
|
endpoint_config,
|
|
992
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:
|
|
@@ -257,7 +262,11 @@ def process_collection_file(
|
|
|
257
262
|
collection_config,
|
|
258
263
|
catalog,
|
|
259
264
|
)
|
|
260
|
-
elif endpoint_config["Name"] in [
|
|
265
|
+
elif endpoint_config["Name"] in [
|
|
266
|
+
"COG source",
|
|
267
|
+
"GeoJSON source",
|
|
268
|
+
"FlatGeobuf source",
|
|
269
|
+
]:
|
|
261
270
|
collection = handle_raw_source(
|
|
262
271
|
catalog_config, endpoint_config, collection_config, catalog
|
|
263
272
|
)
|
|
@@ -266,7 +275,9 @@ def process_collection_file(
|
|
|
266
275
|
if collection:
|
|
267
276
|
add_single_item_if_collection_empty(collection)
|
|
268
277
|
add_projection_info(endpoint_config, collection)
|
|
269
|
-
add_to_catalog(
|
|
278
|
+
add_to_catalog(
|
|
279
|
+
collection, catalog, endpoint_config, collection_config, disable
|
|
280
|
+
)
|
|
270
281
|
else:
|
|
271
282
|
raise Exception(
|
|
272
283
|
f"No collection was generated for resource {endpoint_config}"
|
|
@@ -358,7 +369,7 @@ def process_collection_file(
|
|
|
358
369
|
|
|
359
370
|
|
|
360
371
|
def add_to_catalog(
|
|
361
|
-
collection: Collection, catalog: Catalog, endpoint: dict, collection_config: dict
|
|
372
|
+
collection: Collection, catalog: Catalog, endpoint: dict, collection_config: dict, disable=False
|
|
362
373
|
):
|
|
363
374
|
# check if already in catalog, if it is do not re-add it
|
|
364
375
|
# TODO: probably we should add to the catalog only when creating
|
|
@@ -388,6 +399,8 @@ def add_to_catalog(
|
|
|
388
399
|
if "Themes" in collection_config:
|
|
389
400
|
link.extra_fields["themes"] = collection_config["Themes"]
|
|
390
401
|
# Check for summaries and bubble up info
|
|
402
|
+
if disable:
|
|
403
|
+
link.extra_fields["roles"] = ["disable"]
|
|
391
404
|
if collection.summaries.lists:
|
|
392
405
|
for summary in collection.summaries.lists:
|
|
393
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.5 → eodash_catalog-0.1.7}/tests/testing-collections/test_see_solar_energy.yaml
RENAMED
|
File without changes
|
{eodash_catalog-0.1.5 → eodash_catalog-0.1.7}/tests/testing-collections/test_tif_demo_1.yaml
RENAMED
|
File without changes
|
{eodash_catalog-0.1.5 → eodash_catalog-0.1.7}/tests/testing-collections/test_tif_demo_2.yaml
RENAMED
|
File without changes
|
{eodash_catalog-0.1.5 → eodash_catalog-0.1.7}/tests/testing-collections/test_wms_no_time.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|