This repository has been archived by the owner on Sep 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Anil Natha <[email protected]> * Added support for custom metadata definition and search (#81) * Added support for custom metadata definition and search * Updated CHANGELOG.md * Update collection.py (#82) remove print statement that was annoying me. * Stac updates (#84) * added stac out put options to data_services call, added properties parsing to datasets * aded test dataset for properties * updated changelog * bump version * Update CHANGELOG.md Updated 0.4.0 release and date. --------- Co-authored-by: Anil Natha <[email protected]> Co-authored-by: Rishi Verma <[email protected]> Co-authored-by: Anil Natha <[email protected]> Co-authored-by: Rob Tapella <[email protected]> Co-authored-by: Nga Chung <[email protected]>
- Loading branch information
1 parent
8e70052
commit d40a2f6
Showing
12 changed files
with
289 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[TEST] | ||
client_id = THIS_IS_A_TEST_CLIENT_ID |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"numberMatched":{"total_size":2},"numberReturned":2,"stac_version":"1.0.0","type":"FeatureCollection","links":[{"rel":"self","href":"https://dxebrgu0bc9w7.cloudfront.net/am-uds-dapa/collections/urn:nasa:unity:unity:test:SBG-L2B_FRCOV___1/items?limit=10"},{"rel":"root","href":"https://dxebrgu0bc9w7.cloudfront.net"}],"features":[{"type":"Feature","stac_version":"1.0.0","id":"urn:nasa:unity:unity:test:SBG-L2B_FRCOV___1:SISTER_EMIT_L2B_FRCOV_20230807T182755_001","properties":{"Description":"This catalog contains the output data products of the SISTER fractional cover PGE, including a fractional cover cloud-optimized GeoTIFF. Execution artifacts including the runconfig file and execution log file are included with the fractional cover data.","soil":{"0.0":0.0,"0.1":0.0,"0.2":0.0,"0.3":0.0,"0.4":0.0,"0.5":0.0,"0.6":0.0,"0.7":0.0,"0.8":0.0,"0.9":0.0,"1.0":0.0},"vegetation":{"0.0":0.0,"0.1":0.0,"0.2":0.0,"0.3":0.0,"0.4":0.0,"0.5":0.0,"0.6":0.0,"0.7":0.0,"0.8":0.0,"0.9":0.0,"1.0":0.0},"water":{"0.0":0.0,"0.1":0.0,"0.2":0.0,"0.3":0.0,"0.4":0.0,"0.5":0.0,"0.6":0.0,"0.7":0.0,"0.8":0.0,"0.9":0.0,"1.0":0.0},"snow_ice":{"0.0":1862737.0,"0.1":0.0,"0.2":0.0,"0.3":0.0,"0.4":0.0,"0.5":0.0,"0.6":0.0,"0.7":0.0,"0.8":0.0,"0.9":0.0,"1.0":0.0},"datetime":"2024-03-19T04:54:33.703000Z","start_datetime":"2023-08-07T18:27:55Z","end_datetime":"2023-08-07T18:28:07Z","created":"2023-08-07T18:27:55Z","updated":"2024-03-19T04:55:14.767000Z","status":"completed","provider":"unity"},"geometry":{"type":"Point","coordinates":[0.0,0.0]},"links":[{"rel":"collection","href":"."},{"rel":"self","href":"https://dxebrgu0bc9w7.cloudfront.net/am-uds-dapa/collections/urn:nasa:unity:unity:test:SBG-L2B_FRCOV___1/items/urn:nasa:unity:unity:test:SBG-L2B_FRCOV___1:SISTER_EMIT_L2B_FRCOV_20230807T182755_001","type":"application/json","title":"urn:nasa:unity:unity:test:SBG-L2B_FRCOV___1:SISTER_EMIT_L2B_FRCOV_20230807T182755_001"}],"assets":{"SISTER_EMIT_L2B_FRCOV_20230807T182755_001.cmr.xml":{"href":"s3://sps-test-ds-storage/urn:nasa:unity:unity:test:SBG-L2B_FRCOV___1/urn:nasa:unity:unity:test:SBG-L2B_FRCOV___1:SISTER_EMIT_L2B_FRCOV_20230807T182755_001/SISTER_EMIT_L2B_FRCOV_20230807T182755_001.cmr.xml","title":"SISTER_EMIT_L2B_FRCOV_20230807T182755_001.cmr.xml","description":"size=1766;checksumType=md5;checksum=bd1eec65627f63e998113952c3778f6d;","roles":["metadata"]},"SISTER_EMIT_L2B_FRCOV_20230807T182755_001.json":{"href":"s3://sps-test-ds-storage/urn:nasa:unity:unity:test:SBG-L2B_FRCOV___1/urn:nasa:unity:unity:test:SBG-L2B_FRCOV___1:SISTER_EMIT_L2B_FRCOV_20230807T182755_001/SISTER_EMIT_L2B_FRCOV_20230807T182755_001.json","title":"SISTER_EMIT_L2B_FRCOV_20230807T182755_001.json","description":"size=-1;checksumType=md5;checksum=unknown;","roles":["metadata"]},"SISTER_EMIT_L2B_FRCOV_20230807T182755_001.tif":{"href":"s3://sps-test-ds-storage/urn:nasa:unity:unity:test:SBG-L2B_FRCOV___1/urn:nasa:unity:unity:test:SBG-L2B_FRCOV___1:SISTER_EMIT_L2B_FRCOV_20230807T182755_001/SISTER_EMIT_L2B_FRCOV_20230807T182755_001.tif","title":"SISTER_EMIT_L2B_FRCOV_20230807T182755_001.tif","description":"size=-1;checksumType=md5;checksum=unknown;","roles":["data"]},"SISTER_EMIT_L2B_FRCOV_20230807T182755_001.log":{"href":"s3://sps-test-ds-storage/urn:nasa:unity:unity:test:SBG-L2B_FRCOV___1/urn:nasa:unity:unity:test:SBG-L2B_FRCOV___1:SISTER_EMIT_L2B_FRCOV_20230807T182755_001/SISTER_EMIT_L2B_FRCOV_20230807T182755_001.log","title":"SISTER_EMIT_L2B_FRCOV_20230807T182755_001.log","description":"size=-1;checksumType=md5;checksum=unknown;","roles":["metadata"]},"SISTER_EMIT_L2B_FRCOV_20230807T182755_001.png":{"href":"s3://sps-test-ds-storage/urn:nasa:unity:unity:test:SBG-L2B_FRCOV___1/urn:nasa:unity:unity:test:SBG-L2B_FRCOV___1:SISTER_EMIT_L2B_FRCOV_20230807T182755_001/SISTER_EMIT_L2B_FRCOV_20230807T182755_001.png","title":"SISTER_EMIT_L2B_FRCOV_20230807T182755_001.png","description":"size=-1;checksumType=md5;checksum=unknown;","roles":["browse"]}},"bbox":[-180.0,-90.0,180.0,90.0],"stac_extensions":[],"collection":"urn:nasa:unity:unity:test:SBG-L2B_FRCOV___1"},{"type":"Feature","stac_version":"1.0.0","id":"urn:nasa:unity:unity:test:SBG-L2B_FRCOV___1:SISTER_EMIT_L2B_FRCOV_20240103T131936_001","properties":{"Description":"This catalog contains the output data products of the SISTER fractional cover PGE, including a fractional cover cloud-optimized GeoTIFF. Execution artifacts including the runconfig file and execution log file are included with the fractional cover data.","soil":{"0.0":0.0,"0.1":0.0,"0.2":0.0,"0.3":0.0,"0.4":0.0,"0.5":0.0,"0.6":0.0,"0.7":0.0,"0.8":0.0,"0.9":0.0,"1.0":0.0},"vegetation":{"0.0":0.0,"0.1":0.0,"0.2":0.0,"0.3":0.0,"0.4":0.0,"0.5":0.0,"0.6":0.0,"0.7":0.0,"0.8":0.0,"0.9":0.0,"1.0":0.0},"water":{"0.0":0.0,"0.1":0.0,"0.2":0.0,"0.3":0.0,"0.4":0.0,"0.5":0.0,"0.6":0.0,"0.7":0.0,"0.8":0.0,"0.9":0.0,"1.0":0.0},"snow_ice":{"0.0":93871.0,"0.1":0.0,"0.2":0.0,"0.3":0.0,"0.4":0.0,"0.5":0.0,"0.6":0.0,"0.7":0.0,"0.8":0.0,"0.9":0.0,"1.0":0.0},"datetime":"2024-03-18T18:04:15.591000Z","start_datetime":"2024-01-03T13:19:36Z","end_datetime":"2024-01-03T13:19:48Z","created":"2024-01-03T13:19:36Z","updated":"2024-03-18T18:04:27.773000Z","status":"completed","provider":"unity"},"geometry":{"type":"Point","coordinates":[0.0,0.0]},"links":[{"rel":"collection","href":"."},{"rel":"self","href":"https://dxebrgu0bc9w7.cloudfront.net/am-uds-dapa/collections/urn:nasa:unity:unity:test:SBG-L2B_FRCOV___1/items/urn:nasa:unity:unity:test:SBG-L2B_FRCOV___1:SISTER_EMIT_L2B_FRCOV_20240103T131936_001","type":"application/json","title":"urn:nasa:unity:unity:test:SBG-L2B_FRCOV___1:SISTER_EMIT_L2B_FRCOV_20240103T131936_001"}],"assets":{"SISTER_EMIT_L2B_FRCOV_20240103T131936_001.cmr.xml":{"href":"s3://sps-test-ds-storage/urn:nasa:unity:unity:test:SBG-L2B_FRCOV___1/urn:nasa:unity:unity:test:SBG-L2B_FRCOV___1:SISTER_EMIT_L2B_FRCOV_20240103T131936_001/SISTER_EMIT_L2B_FRCOV_20240103T131936_001.cmr.xml","title":"SISTER_EMIT_L2B_FRCOV_20240103T131936_001.cmr.xml","description":"size=1766;checksumType=md5;checksum=a8c0e55579d2f1b47eb6e99188082559;","roles":["metadata"]},"SISTER_EMIT_L2B_FRCOV_20240103T131936_001.json":{"href":"s3://sps-test-ds-storage/urn:nasa:unity:unity:test:SBG-L2B_FRCOV___1/urn:nasa:unity:unity:test:SBG-L2B_FRCOV___1:SISTER_EMIT_L2B_FRCOV_20240103T131936_001/SISTER_EMIT_L2B_FRCOV_20240103T131936_001.json","title":"SISTER_EMIT_L2B_FRCOV_20240103T131936_001.json","description":"size=-1;checksumType=md5;checksum=unknown;","roles":["metadata"]},"SISTER_EMIT_L2B_FRCOV_20240103T131936_001.tif":{"href":"s3://sps-test-ds-storage/urn:nasa:unity:unity:test:SBG-L2B_FRCOV___1/urn:nasa:unity:unity:test:SBG-L2B_FRCOV___1:SISTER_EMIT_L2B_FRCOV_20240103T131936_001/SISTER_EMIT_L2B_FRCOV_20240103T131936_001.tif","title":"SISTER_EMIT_L2B_FRCOV_20240103T131936_001.tif","description":"size=-1;checksumType=md5;checksum=unknown;","roles":["data"]},"SISTER_EMIT_L2B_FRCOV_20240103T131936_001.png":{"href":"s3://sps-test-ds-storage/urn:nasa:unity:unity:test:SBG-L2B_FRCOV___1/urn:nasa:unity:unity:test:SBG-L2B_FRCOV___1:SISTER_EMIT_L2B_FRCOV_20240103T131936_001/SISTER_EMIT_L2B_FRCOV_20240103T131936_001.png","title":"SISTER_EMIT_L2B_FRCOV_20240103T131936_001.png","description":"size=-1;checksumType=md5;checksum=unknown;","roles":["browse"]},"SISTER_EMIT_L2B_FRCOV_20240103T131936_001.log":{"href":"s3://sps-test-ds-storage/urn:nasa:unity:unity:test:SBG-L2B_FRCOV___1/urn:nasa:unity:unity:test:SBG-L2B_FRCOV___1:SISTER_EMIT_L2B_FRCOV_20240103T131936_001/SISTER_EMIT_L2B_FRCOV_20240103T131936_001.log","title":"SISTER_EMIT_L2B_FRCOV_20240103T131936_001.log","description":"size=-1;checksumType=md5;checksum=unknown;","roles":["metadata"]}},"bbox":[-180.0,-90.0,180.0,90.0],"stac_extensions":[],"collection":"urn:nasa:unity:unity:test:SBG-L2B_FRCOV___1"}]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
from unity_sds_client.unity import Unity | ||
from unity_sds_client.unity_exception import UnityException | ||
from unity_sds_client.unity_session import UnitySession | ||
from unity_sds_client.resources.collection import Collection | ||
from unity_sds_client.unity_services import UnityServices as Services | ||
|
||
import pytest | ||
|
||
|
||
@pytest.fixture | ||
def cleanup_update_test(): | ||
yield None | ||
print("Cleanup...") | ||
|
||
|
||
def test_collection_creation(cleanup_update_test): | ||
#no venue, project | ||
with pytest.raises(UnityException): | ||
s = Unity() | ||
ds = s.client(Services.DATA_SERVICE) | ||
ds.create_collection(Collection("urn:nasa:unity:myproject:myvenue:identifier"), True) | ||
#no Venue | ||
with pytest.raises(UnityException): | ||
s = Unity() | ||
s.set_project("unity") | ||
ds = s.client(Services.DATA_SERVICE) | ||
ds.create_collection(Collection("urn:nasa:unity:myproject:myvenue:identifier"), True) | ||
#null collections | ||
# does not match name | ||
with pytest.raises(UnityException): | ||
s = Unity() | ||
s.set_project("unity") | ||
s.set_venue("test") | ||
ds = s.client(Services.DATA_SERVICE) | ||
ds.create_collection(None, True) | ||
|
||
#does not match name | ||
with pytest.raises(UnityException): | ||
s = Unity() | ||
s.set_project("unity") | ||
s.set_venue("test") | ||
ds = s.client(Services.DATA_SERVICE) | ||
ds.create_collection( Collection("urn:nasa:unity:myproject:myvenue:identifier"), True) | ||
|
||
# does not match name | ||
s = Unity() | ||
s.set_project("unity") | ||
s.set_venue("test") | ||
ds = s.client(Services.DATA_SERVICE) | ||
ds.create_collection(Collection("urn:nasa:unity:unity:test:my_collection_id"), True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.