eodash_catalog 0.0.33__tar.gz → 0.0.35__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.0.33 → eodash_catalog-0.0.35}/.bumpversion.cfg +1 -1
- {eodash_catalog-0.0.33 → eodash_catalog-0.0.35}/.github/workflows/ci.yml +1 -1
- {eodash_catalog-0.0.33 → eodash_catalog-0.0.35}/PKG-INFO +3 -3
- {eodash_catalog-0.0.33 → eodash_catalog-0.0.35}/pyproject.toml +2 -2
- {eodash_catalog-0.0.33 → eodash_catalog-0.0.35}/requirements.txt +3 -3
- {eodash_catalog-0.0.33 → eodash_catalog-0.0.35}/src/eodash_catalog/__about__.py +1 -1
- {eodash_catalog-0.0.33 → eodash_catalog-0.0.35}/src/eodash_catalog/endpoints.py +3 -1
- {eodash_catalog-0.0.33 → eodash_catalog-0.0.35}/src/eodash_catalog/sh_endpoint.py +8 -5
- {eodash_catalog-0.0.33 → eodash_catalog-0.0.35}/.github/workflows/python-publish.yml +0 -0
- {eodash_catalog-0.0.33 → eodash_catalog-0.0.35}/.gitignore +0 -0
- {eodash_catalog-0.0.33 → eodash_catalog-0.0.35}/.vscode/extensions.json +0 -0
- {eodash_catalog-0.0.33 → eodash_catalog-0.0.35}/.vscode/settings.json +0 -0
- {eodash_catalog-0.0.33 → eodash_catalog-0.0.35}/LICENSE.txt +0 -0
- {eodash_catalog-0.0.33 → eodash_catalog-0.0.35}/README.md +0 -0
- {eodash_catalog-0.0.33 → eodash_catalog-0.0.35}/ruff.toml +0 -0
- {eodash_catalog-0.0.33 → eodash_catalog-0.0.35}/src/eodash_catalog/__init__.py +0 -0
- {eodash_catalog-0.0.33 → eodash_catalog-0.0.35}/src/eodash_catalog/duration.py +0 -0
- {eodash_catalog-0.0.33 → eodash_catalog-0.0.35}/src/eodash_catalog/generate_indicators.py +0 -0
- {eodash_catalog-0.0.33 → eodash_catalog-0.0.35}/src/eodash_catalog/stac_handling.py +0 -0
- {eodash_catalog-0.0.33 → eodash_catalog-0.0.35}/src/eodash_catalog/thumbnails.py +0 -0
- {eodash_catalog-0.0.33 → eodash_catalog-0.0.35}/src/eodash_catalog/utils.py +0 -0
- {eodash_catalog-0.0.33 → eodash_catalog-0.0.35}/tests/__init__.py +0 -0
- {eodash_catalog-0.0.33 → eodash_catalog-0.0.35}/tests/test-data/regional_forecast.json +0 -0
- {eodash_catalog-0.0.33 → eodash_catalog-0.0.35}/tests/test_generate.py +0 -0
- {eodash_catalog-0.0.33 → eodash_catalog-0.0.35}/tests/testing-catalogs/testing.yaml +0 -0
- {eodash_catalog-0.0.33 → eodash_catalog-0.0.35}/tests/testing-collections/test_CROPOMAT1.yaml +0 -0
- {eodash_catalog-0.0.33 → eodash_catalog-0.0.35}/tests/testing-collections/test_see_solar_energy.yaml +0 -0
- {eodash_catalog-0.0.33 → eodash_catalog-0.0.35}/tests/testing-collections/test_tif_demo_1.yaml +0 -0
- {eodash_catalog-0.0.33 → eodash_catalog-0.0.35}/tests/testing-collections/test_tif_demo_2.yaml +0 -0
- {eodash_catalog-0.0.33 → eodash_catalog-0.0.35}/tests/testing-collections/test_wms_no_time.yaml +0 -0
- {eodash_catalog-0.0.33 → eodash_catalog-0.0.35}/tests/testing-indicators/test_indicator.yaml +0 -0
- {eodash_catalog-0.0.33 → eodash_catalog-0.0.35}/tests/testing-layers/baselayers.yaml +0 -0
- {eodash_catalog-0.0.33 → eodash_catalog-0.0.35}/tests/testing-layers/overlays.yaml +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: eodash_catalog
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.35
|
|
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<
|
|
27
|
-
Requires-Dist: pystac[validation]
|
|
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<
|
|
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]
|
|
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
|
|
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
|
|
17
|
+
OWSLib==0.31
|
|
18
18
|
spdx-lookup<=0.3.3
|
|
19
|
-
pystac[validation]
|
|
19
|
+
pystac[validation]==1.10.1
|
|
20
20
|
|
|
21
21
|
# dev tooling
|
|
22
22
|
pytest==8.1.1
|
|
@@ -212,7 +212,9 @@ def process_STACAPI_Endpoint(
|
|
|
212
212
|
)
|
|
213
213
|
# We keep track of potential duplicate times in this list
|
|
214
214
|
added_times = {}
|
|
215
|
+
any_item_added = False
|
|
215
216
|
for item in results.items():
|
|
217
|
+
any_item_added = True
|
|
216
218
|
item_datetime = item.get_datetime()
|
|
217
219
|
if item_datetime is not None:
|
|
218
220
|
iso_date = item_datetime.isoformat()[:10]
|
|
@@ -272,7 +274,7 @@ def process_STACAPI_Endpoint(
|
|
|
272
274
|
endpoint_config,
|
|
273
275
|
item,
|
|
274
276
|
)
|
|
275
|
-
if
|
|
277
|
+
if any_item_added:
|
|
276
278
|
collection.update_extent_from_items()
|
|
277
279
|
else:
|
|
278
280
|
LOGGER.warn(
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import os
|
|
2
|
+
import time
|
|
2
3
|
|
|
3
4
|
from oauthlib.oauth2 import BackendApplicationClient
|
|
4
5
|
from requests_oauthlib import OAuth2Session
|
|
5
6
|
|
|
6
7
|
SH_TOKEN_URL = "https://services.sentinel-hub.com/oauth/token"
|
|
7
|
-
_token_cache: dict[str,
|
|
8
|
+
_token_cache: dict[str, dict] = {}
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
def get_SH_token(endpoint_config: dict) -> str:
|
|
@@ -14,8 +15,10 @@ def get_SH_token(endpoint_config: dict) -> str:
|
|
|
14
15
|
if env_id := endpoint_config.get("CustomSHEnvId"):
|
|
15
16
|
client_id = os.getenv(f"SH_CLIENT_ID_{env_id}", "")
|
|
16
17
|
client_secret = os.getenv(f"SH_CLIENT_SECRET_{env_id}", "")
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
|
|
19
|
+
if client_id in _token_cache and _token_cache[client_id]["expires_at"] > time.time():
|
|
20
|
+
print("returning from cache")
|
|
21
|
+
return _token_cache[client_id]["access_token"]
|
|
19
22
|
# Create a session
|
|
20
23
|
client = BackendApplicationClient(client_id=client_id)
|
|
21
24
|
oauth = OAuth2Session(client=client)
|
|
@@ -25,6 +28,6 @@ def get_SH_token(endpoint_config: dict) -> str:
|
|
|
25
28
|
client_secret=client_secret,
|
|
26
29
|
)
|
|
27
30
|
access_token = token["access_token"]
|
|
28
|
-
_token_cache[client_id] = access_token
|
|
29
|
-
|
|
31
|
+
_token_cache[client_id] = {"access_token": access_token, "expires_at": token["expires_at"]}
|
|
32
|
+
print("returning directly")
|
|
30
33
|
return access_token
|
|
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.0.33 → eodash_catalog-0.0.35}/tests/testing-collections/test_CROPOMAT1.yaml
RENAMED
|
File without changes
|
{eodash_catalog-0.0.33 → eodash_catalog-0.0.35}/tests/testing-collections/test_see_solar_energy.yaml
RENAMED
|
File without changes
|
{eodash_catalog-0.0.33 → eodash_catalog-0.0.35}/tests/testing-collections/test_tif_demo_1.yaml
RENAMED
|
File without changes
|
{eodash_catalog-0.0.33 → eodash_catalog-0.0.35}/tests/testing-collections/test_tif_demo_2.yaml
RENAMED
|
File without changes
|
{eodash_catalog-0.0.33 → eodash_catalog-0.0.35}/tests/testing-collections/test_wms_no_time.yaml
RENAMED
|
File without changes
|
{eodash_catalog-0.0.33 → eodash_catalog-0.0.35}/tests/testing-indicators/test_indicator.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|