eodash_catalog 0.0.3__py3-none-any.whl → 0.0.5__py3-none-any.whl
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/__about__.py +1 -1
- eodash_catalog/generate_indicators.py +44 -18
- {eodash_catalog-0.0.3.dist-info → eodash_catalog-0.0.5.dist-info}/METADATA +1 -1
- eodash_catalog-0.0.5.dist-info/RECORD +11 -0
- eodash_catalog-0.0.3.dist-info/RECORD +0 -11
- {eodash_catalog-0.0.3.dist-info → eodash_catalog-0.0.5.dist-info}/WHEEL +0 -0
- {eodash_catalog-0.0.3.dist-info → eodash_catalog-0.0.5.dist-info}/entry_points.txt +0 -0
- {eodash_catalog-0.0.3.dist-info → eodash_catalog-0.0.5.dist-info}/licenses/LICENSE.txt +0 -0
eodash_catalog/__about__.py
CHANGED
|
@@ -93,12 +93,19 @@ def process_catalog_file(file_path, options):
|
|
|
93
93
|
process_indicator_file(config, file_path, catalog, options)
|
|
94
94
|
else:
|
|
95
95
|
# if not try to see if indicator definition available
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
96
|
+
file_path = "%s/%s.yaml" % (options.indicatorspath, collection)
|
|
97
|
+
if os.path.isfile(file_path):
|
|
98
|
+
process_indicator_file(
|
|
99
|
+
config,
|
|
100
|
+
"%s/%s.yaml" % (options.indicatorspath, collection),
|
|
101
|
+
catalog,
|
|
102
|
+
options,
|
|
103
|
+
)
|
|
104
|
+
else:
|
|
105
|
+
print(
|
|
106
|
+
"Warning: neither collection nor indicator found for %s"
|
|
107
|
+
% collection
|
|
108
|
+
)
|
|
102
109
|
|
|
103
110
|
strategy = TemplateLayoutStrategy(item_template="${collection}/${year}")
|
|
104
111
|
catalog.normalize_hrefs(
|
|
@@ -249,7 +256,8 @@ def process_collection_file(config, file_path, catalog, options):
|
|
|
249
256
|
countries.append(sub_coll_def["Country"])
|
|
250
257
|
process_collection_file(
|
|
251
258
|
config,
|
|
252
|
-
"
|
|
259
|
+
"%s/%s.yaml"
|
|
260
|
+
% (options.collectionspath, sub_coll_def["Collection"]),
|
|
253
261
|
parent_collection,
|
|
254
262
|
options,
|
|
255
263
|
)
|
|
@@ -281,7 +289,8 @@ def process_collection_file(config, file_path, catalog, options):
|
|
|
281
289
|
)
|
|
282
290
|
process_collection_file(
|
|
283
291
|
config,
|
|
284
|
-
"
|
|
292
|
+
"%s/%s.yaml"
|
|
293
|
+
% (options.collectionspath, sub_coll_def["Collection"]),
|
|
285
294
|
tmp_catalog,
|
|
286
295
|
options,
|
|
287
296
|
)
|
|
@@ -1477,29 +1486,35 @@ class Options:
|
|
|
1477
1486
|
|
|
1478
1487
|
|
|
1479
1488
|
@click.command()
|
|
1489
|
+
@click.option(
|
|
1490
|
+
"--catalog",
|
|
1491
|
+
"-ctl",
|
|
1492
|
+
help="id of catalog configuration file to be used",
|
|
1493
|
+
default=None,
|
|
1494
|
+
)
|
|
1480
1495
|
@click.option(
|
|
1481
1496
|
"--catalogspath",
|
|
1482
1497
|
"-ctp",
|
|
1483
1498
|
help="path to catalog configuration files",
|
|
1484
|
-
default="
|
|
1499
|
+
default="catalogs",
|
|
1485
1500
|
)
|
|
1486
1501
|
@click.option(
|
|
1487
1502
|
"--collectionspath",
|
|
1488
1503
|
"-clp",
|
|
1489
1504
|
help="path to collection configuration files",
|
|
1490
|
-
default="
|
|
1505
|
+
default="collections",
|
|
1491
1506
|
)
|
|
1492
1507
|
@click.option(
|
|
1493
1508
|
"--indicatorspath",
|
|
1494
1509
|
"-inp",
|
|
1495
|
-
help="path to
|
|
1496
|
-
default="
|
|
1510
|
+
help="path to indicator configuration files",
|
|
1511
|
+
default="indicators",
|
|
1497
1512
|
)
|
|
1498
1513
|
@click.option(
|
|
1499
1514
|
"--outputpath",
|
|
1500
1515
|
"-o",
|
|
1501
1516
|
help="path where the generated catalogs will be saved",
|
|
1502
|
-
default="
|
|
1517
|
+
default="build",
|
|
1503
1518
|
)
|
|
1504
1519
|
@click.option(
|
|
1505
1520
|
"-vd",
|
|
@@ -1519,7 +1534,15 @@ class Options:
|
|
|
1519
1534
|
nargs=-1,
|
|
1520
1535
|
)
|
|
1521
1536
|
def process_catalogs(
|
|
1522
|
-
|
|
1537
|
+
catalog,
|
|
1538
|
+
catalogspath,
|
|
1539
|
+
collectionspath,
|
|
1540
|
+
indicatorspath,
|
|
1541
|
+
outputpath,
|
|
1542
|
+
vd,
|
|
1543
|
+
ni,
|
|
1544
|
+
tn,
|
|
1545
|
+
collections,
|
|
1523
1546
|
):
|
|
1524
1547
|
"""STAC generator and harvester:
|
|
1525
1548
|
This library goes over configured endpoints extracting as much information
|
|
@@ -1538,9 +1561,12 @@ def process_catalogs(
|
|
|
1538
1561
|
for file_name in os.listdir(catalogspath):
|
|
1539
1562
|
file_path = os.path.join(catalogspath, file_name)
|
|
1540
1563
|
if os.path.isfile(file_path):
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1564
|
+
if catalog == None or os.path.splitext(file_name)[0] == catalog:
|
|
1565
|
+
tasks.append(
|
|
1566
|
+
RaisingThread(
|
|
1567
|
+
target=process_catalog_file, args=(file_path, options)
|
|
1568
|
+
)
|
|
1569
|
+
)
|
|
1570
|
+
tasks[-1].start()
|
|
1545
1571
|
for task in tasks:
|
|
1546
1572
|
task.join()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: eodash_catalog
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.5
|
|
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
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
eodash_catalog/__about__.py,sha256=ZfDJZXDGJEGGrB1wiMfBDZ5ZIVlRCJpUhvHXTANnD88,137
|
|
2
|
+
eodash_catalog/__init__.py,sha256=_W_9emPYf6FUqc0P8L2SmADx6hGSd7PlQV3yRmCk5uM,115
|
|
3
|
+
eodash_catalog/duration.py,sha256=6rxALD9MZS6rTE1AZgvjrABr7zwg8S-kLc_w9BltvY0,11007
|
|
4
|
+
eodash_catalog/generate_indicators.py,sha256=Pdl4a4AZ2rDgyA1paTC_yfM7zQW5n68s2u1xdvFPNzY,60144
|
|
5
|
+
eodash_catalog/sh_endpoint.py,sha256=KyZGmVrjZOCIuJizmYSy8VSWrfqqn2r-Ggh_8Q-s2vI,581
|
|
6
|
+
eodash_catalog/utils.py,sha256=NbwqHE5Qhd3Fke_fbl3HY803qSKJJKP1atTNrGPO7KY,6097
|
|
7
|
+
eodash_catalog-0.0.5.dist-info/METADATA,sha256=n63xtKFZPqXCnPKLjStUExSCTn7VCR7FAlqVnxJaIDU,2156
|
|
8
|
+
eodash_catalog-0.0.5.dist-info/WHEEL,sha256=TJPnKdtrSue7xZ_AVGkp9YXcvDrobsjBds1du3Nx6dc,87
|
|
9
|
+
eodash_catalog-0.0.5.dist-info/entry_points.txt,sha256=kuUQrDG1PtYd8kPjf5XM6H_NtQd9Ozwl0jjiGtAvZSM,87
|
|
10
|
+
eodash_catalog-0.0.5.dist-info/licenses/LICENSE.txt,sha256=oJCW5zQxnFD-J0hGz6Zh5Lkpdk1oAndmWhseTmV224E,1107
|
|
11
|
+
eodash_catalog-0.0.5.dist-info/RECORD,,
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
eodash_catalog/__about__.py,sha256=XwGUn_fck5BM1feQDYsxZXExk2qm1bl87CumqjZGi90,137
|
|
2
|
-
eodash_catalog/__init__.py,sha256=_W_9emPYf6FUqc0P8L2SmADx6hGSd7PlQV3yRmCk5uM,115
|
|
3
|
-
eodash_catalog/duration.py,sha256=6rxALD9MZS6rTE1AZgvjrABr7zwg8S-kLc_w9BltvY0,11007
|
|
4
|
-
eodash_catalog/generate_indicators.py,sha256=oRZEITNeClFA3xiI-OJrTqC0eeUCCi3mhzY83i9IIN0,59442
|
|
5
|
-
eodash_catalog/sh_endpoint.py,sha256=KyZGmVrjZOCIuJizmYSy8VSWrfqqn2r-Ggh_8Q-s2vI,581
|
|
6
|
-
eodash_catalog/utils.py,sha256=NbwqHE5Qhd3Fke_fbl3HY803qSKJJKP1atTNrGPO7KY,6097
|
|
7
|
-
eodash_catalog-0.0.3.dist-info/METADATA,sha256=6rH58-poXqU6Z9-6l1SDKaNFFvm-OhxdKoqaXSKyiEg,2156
|
|
8
|
-
eodash_catalog-0.0.3.dist-info/WHEEL,sha256=TJPnKdtrSue7xZ_AVGkp9YXcvDrobsjBds1du3Nx6dc,87
|
|
9
|
-
eodash_catalog-0.0.3.dist-info/entry_points.txt,sha256=kuUQrDG1PtYd8kPjf5XM6H_NtQd9Ozwl0jjiGtAvZSM,87
|
|
10
|
-
eodash_catalog-0.0.3.dist-info/licenses/LICENSE.txt,sha256=oJCW5zQxnFD-J0hGz6Zh5Lkpdk1oAndmWhseTmV224E,1107
|
|
11
|
-
eodash_catalog-0.0.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|