eodash_catalog 0.3.17__tar.gz → 0.3.19__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.
- {eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/.bumpversion.cfg +1 -1
- {eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/Dockerfile +1 -1
- {eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/PKG-INFO +1 -1
- {eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/src/eodash_catalog/__about__.py +1 -1
- {eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/src/eodash_catalog/generate_indicators.py +8 -0
- {eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/src/eodash_catalog/stac_handling.py +26 -10
- {eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/.dockerignore +0 -0
- {eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/.github/workflows/ci.yml +0 -0
- {eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/.github/workflows/python-publish.yml +0 -0
- {eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/.gitignore +0 -0
- {eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/.vscode/extensions.json +0 -0
- {eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/.vscode/settings.json +0 -0
- {eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/LICENSE.txt +0 -0
- {eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/README.md +0 -0
- {eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/pyproject.toml +0 -0
- {eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/requirements.txt +0 -0
- {eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/ruff.toml +0 -0
- {eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/src/eodash_catalog/__init__.py +0 -0
- {eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/src/eodash_catalog/duration.py +0 -0
- {eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/src/eodash_catalog/endpoints.py +0 -0
- {eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/src/eodash_catalog/sh_endpoint.py +0 -0
- {eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/src/eodash_catalog/thumbnails.py +0 -0
- {eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/src/eodash_catalog/utils.py +0 -0
- {eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/tests/__init__.py +0 -0
- {eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/tests/test-data/regional_forecast.json +0 -0
- {eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/tests/test_generate.py +0 -0
- {eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/tests/test_geoparquet.py +0 -0
- {eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/tests/testing-catalogs/testing-json.json +0 -0
- {eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/tests/testing-catalogs/testing.yaml +0 -0
- {eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/tests/testing-collections/test_CROPOMAT1.yaml +0 -0
- {eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/tests/testing-collections/test_cmems.json +0 -0
- {eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/tests/testing-collections/test_cog.json +0 -0
- {eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/tests/testing-collections/test_geodb.yaml +0 -0
- {eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/tests/testing-collections/test_geodb_locations.yaml +0 -0
- {eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/tests/testing-collections/test_geojson.yaml +0 -0
- {eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/tests/testing-collections/test_locations_processing.json +0 -0
- {eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/tests/testing-collections/test_process.yaml +0 -0
- {eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/tests/testing-collections/test_projection.json +0 -0
- {eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/tests/testing-collections/test_see_solar_energy.yaml +0 -0
- {eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/tests/testing-collections/test_sh_wms.json +0 -0
- {eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/tests/testing-collections/test_sh_wms_locations.json +0 -0
- {eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/tests/testing-collections/test_tif_demo_1.yaml +0 -0
- {eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/tests/testing-collections/test_tif_demo_1_json.json +0 -0
- {eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/tests/testing-collections/test_tif_demo_2.yaml +0 -0
- {eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/tests/testing-collections/test_veda.json +0 -0
- {eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/tests/testing-collections/test_veda_tiles.json +0 -0
- {eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/tests/testing-collections/test_wms_no_time.yaml +0 -0
- {eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/tests/testing-indicators/test_indicator.yaml +0 -0
- {eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/tests/testing-layers/baselayers.yaml +0 -0
- {eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/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.3.
|
|
3
|
+
Version: 0.3.19
|
|
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
|
|
@@ -458,12 +458,20 @@ def add_to_catalog(
|
|
|
458
458
|
link.extra_fields["endpointtype"] = endpoint["Name"]
|
|
459
459
|
if collection_config.get("Subtitle"):
|
|
460
460
|
link.extra_fields["subtitle"] = collection_config["Subtitle"]
|
|
461
|
+
if collection_config.get("ShortDescription"):
|
|
462
|
+
link.extra_fields["shortdescription"] = collection_config["ShortDescription"]
|
|
461
463
|
link.extra_fields["title"] = collection.title
|
|
462
464
|
if collection_config.get("EodashIdentifier"):
|
|
463
465
|
link.extra_fields["code"] = collection_config["EodashIdentifier"]
|
|
464
466
|
link.extra_fields["id"] = collection_config["Name"]
|
|
465
467
|
if collection_config.get("Themes"):
|
|
466
468
|
link.extra_fields["themes"] = collection_config["Themes"]
|
|
469
|
+
if collection_config.get("Provider"):
|
|
470
|
+
# get all provider names
|
|
471
|
+
link.extra_fields["providers"] = [
|
|
472
|
+
provider.get("Name") or provider.get("Url")
|
|
473
|
+
for provider in collection_config["Provider"]
|
|
474
|
+
]
|
|
467
475
|
# Check for summaries and bubble up info
|
|
468
476
|
if disable:
|
|
469
477
|
link.extra_fields["roles"] = ["disable"]
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import uuid
|
|
2
2
|
from datetime import datetime, timezone
|
|
3
|
+
from urllib.parse import parse_qs, urlparse
|
|
3
4
|
|
|
4
5
|
import requests
|
|
5
6
|
import spdx_lookup as lookup
|
|
@@ -312,6 +313,10 @@ def add_collection_information(
|
|
|
312
313
|
|
|
313
314
|
if collection_config.get("Subtitle"):
|
|
314
315
|
collection.extra_fields["subtitle"] = collection_config["Subtitle"]
|
|
316
|
+
|
|
317
|
+
if collection_config.get("ShortDescription"):
|
|
318
|
+
collection.extra_fields["shortdescription"] = collection_config["ShortDescription"]
|
|
319
|
+
|
|
315
320
|
if collection_config.get("Legend"):
|
|
316
321
|
collection.add_asset(
|
|
317
322
|
"legend",
|
|
@@ -321,15 +326,26 @@ def add_collection_information(
|
|
|
321
326
|
roles=["metadata"],
|
|
322
327
|
),
|
|
323
328
|
)
|
|
324
|
-
if collection_config.get("
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
)
|
|
332
|
-
|
|
329
|
+
if stories := collection_config.get("Stories"):
|
|
330
|
+
for story in stories:
|
|
331
|
+
story_url = story.get("Url")
|
|
332
|
+
if not story_url.startswith("http"):
|
|
333
|
+
story_url = f'{catalog_config.get("stories_endpoint")}/{story_url}'
|
|
334
|
+
parsed_url = urlparse(story_url)
|
|
335
|
+
# check if it is URL with a query parameter id=story-identifier
|
|
336
|
+
if parsed_url.query and len(parse_qs(parsed_url.query).get("id")) > 0:
|
|
337
|
+
story_id = parse_qs(parsed_url.query).get("id")[0]
|
|
338
|
+
else:
|
|
339
|
+
story_id = parsed_url.path.rsplit("/")[-1].replace(".md", "").replace(".MD", "")
|
|
340
|
+
collection.add_asset(
|
|
341
|
+
story_id,
|
|
342
|
+
Asset(
|
|
343
|
+
title=story.get("Name"),
|
|
344
|
+
href=story_url,
|
|
345
|
+
media_type="text/markdown",
|
|
346
|
+
roles=["metadata", "story"],
|
|
347
|
+
),
|
|
348
|
+
)
|
|
333
349
|
if collection_config.get("Image"):
|
|
334
350
|
# Check if absolute URL or relative path
|
|
335
351
|
if collection_config["Image"].startswith("http"):
|
|
@@ -617,7 +633,7 @@ def add_projection_info(
|
|
|
617
633
|
|
|
618
634
|
|
|
619
635
|
def add_authentication(stac_object: Item | Collection | Catalog, url: str, extra_fields_link: dict):
|
|
620
|
-
if "
|
|
636
|
+
if "mapbox" in url:
|
|
621
637
|
# add authentication info
|
|
622
638
|
auth_extension = "https://stac-extensions.github.io/authentication/v1.1.0/schema.json"
|
|
623
639
|
if auth_extension not in stac_object.stac_extensions:
|
|
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
|
|
File without changes
|
|
File without changes
|
{eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/tests/testing-collections/test_CROPOMAT1.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/tests/testing-collections/test_geodb_locations.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/tests/testing-collections/test_projection.json
RENAMED
|
File without changes
|
{eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/tests/testing-collections/test_see_solar_energy.yaml
RENAMED
|
File without changes
|
|
File without changes
|
{eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/tests/testing-collections/test_sh_wms_locations.json
RENAMED
|
File without changes
|
{eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/tests/testing-collections/test_tif_demo_1.yaml
RENAMED
|
File without changes
|
{eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/tests/testing-collections/test_tif_demo_1_json.json
RENAMED
|
File without changes
|
{eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/tests/testing-collections/test_tif_demo_2.yaml
RENAMED
|
File without changes
|
|
File without changes
|
{eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/tests/testing-collections/test_veda_tiles.json
RENAMED
|
File without changes
|
{eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/tests/testing-collections/test_wms_no_time.yaml
RENAMED
|
File without changes
|
{eodash_catalog-0.3.17 → eodash_catalog-0.3.19}/tests/testing-indicators/test_indicator.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|