Skip to content

Commit

Permalink
Adjust open_params and add get_item_collection
Browse files Browse the repository at this point in the history
  • Loading branch information
konstntokas committed May 3, 2024
1 parent 916d671 commit dcb8604
Show file tree
Hide file tree
Showing 31 changed files with 8,479 additions and 67 deletions.
2 changes: 2 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ channels:
dependencies:
# Required
- pystac
- pystac-client
- xarray
- xcube
# for testing
- black
- flake8
- pytest
- pytest-recording
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ readme = {file = "README.md", content-type = "text/markdown"}
license = {text = "MIT"}
requires-python = ">=3.10"
dependencies = [
"pystac",
"pystac-client",
"xarray",
"pystac"
"xcube"
]

[tool.setuptools.dynamic]
Expand All @@ -35,6 +37,7 @@ exclude = [
dev = [
"pytest",
"pytest-cov",
"pytest-recording",
"black",
"flake8"
]
Expand Down
150 changes: 150 additions & 0 deletions test/cassettes/test_opener/StacDataOpenerTest.test_describe_data.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
interactions:
- request:
body: null
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate, br
Connection:
- keep-alive
User-Agent:
- python-requests/2.31.0
method: GET
uri: https://raw.githubusercontent.com/stac-extensions/label/main/examples/multidataset/catalog.json
response:
body:
string: "{\n \"stac_version\": \"1.0.0-rc.1\",\n \"type\": \"Catalog\",\n
\ \"id\": \"label_extension_demo\",\n \"title\": \"label extension demo\",\n
\ \"description\": \"Sample ML training data labels in the STAC format\",\n
\ \"links\": [\n {\n \"rel\": \"root\",\n \"href\": \"./catalog.json\"\n
\ },\n {\n \"rel\": \"child\",\n \"href\": \"zanzibar/collection.json\"\n
\ },\n {\n \"rel\": \"child\",\n \"href\": \"spacenet-buildings/collection.json\"\n
\ }\n ]\n}"
headers:
Accept-Ranges:
- bytes
Access-Control-Allow-Origin:
- '*'
Cache-Control:
- max-age=300
Connection:
- keep-alive
Content-Encoding:
- gzip
Content-Length:
- '236'
Content-Security-Policy:
- default-src 'none'; style-src 'unsafe-inline'; sandbox
Content-Type:
- text/plain; charset=utf-8
Cross-Origin-Resource-Policy:
- cross-origin
Date:
- Fri, 03 May 2024 15:25:09 GMT
ETag:
- W/"acb7a8d6636e24e32f4018c14f1c4ff418a82567b2746560f9eae6ad97a48a54"
Expires:
- Fri, 03 May 2024 15:30:09 GMT
Source-Age:
- '0'
Strict-Transport-Security:
- max-age=31536000
Vary:
- Authorization,Accept-Encoding,Origin
Via:
- 1.1 varnish
X-Cache:
- HIT
X-Cache-Hits:
- '12'
X-Content-Type-Options:
- nosniff
X-Fastly-Request-ID:
- 0a4e232284200ad72c67ee912e80a4079534af08
X-Frame-Options:
- deny
X-GitHub-Request-Id:
- BACE:2E8F4B:1CE9F67:1E6FB08:6634FE90
X-Served-By:
- cache-cph2320050-CPH
X-Timer:
- S1714749909.235819,VS0,VE142
X-XSS-Protection:
- 1; mode=block
status:
code: 200
message: OK
- request:
body: null
headers:
Connection:
- close
Host:
- raw.githubusercontent.com
User-Agent:
- Python-urllib/3.12
method: GET
uri: https://raw.githubusercontent.com/stac-extensions/label/main/examples/multidataset/catalog.json
response:
body:
string: "{\n \"stac_version\": \"1.0.0-rc.1\",\n \"type\": \"Catalog\",\n
\ \"id\": \"label_extension_demo\",\n \"title\": \"label extension demo\",\n
\ \"description\": \"Sample ML training data labels in the STAC format\",\n
\ \"links\": [\n {\n \"rel\": \"root\",\n \"href\": \"./catalog.json\"\n
\ },\n {\n \"rel\": \"child\",\n \"href\": \"zanzibar/collection.json\"\n
\ },\n {\n \"rel\": \"child\",\n \"href\": \"spacenet-buildings/collection.json\"\n
\ }\n ]\n}"
headers:
Accept-Ranges:
- bytes
Access-Control-Allow-Origin:
- '*'
Cache-Control:
- max-age=300
Connection:
- close
Content-Length:
- '436'
Content-Security-Policy:
- default-src 'none'; style-src 'unsafe-inline'; sandbox
Content-Type:
- text/plain; charset=utf-8
Cross-Origin-Resource-Policy:
- cross-origin
Date:
- Fri, 03 May 2024 15:25:09 GMT
ETag:
- '"e74ebcbc46d43c5b693ecb995381fbeba03583627e6d65b21ed7678a10d94729"'
Expires:
- Fri, 03 May 2024 15:30:09 GMT
Source-Age:
- '0'
Strict-Transport-Security:
- max-age=31536000
Vary:
- Authorization,Accept-Encoding,Origin
Via:
- 1.1 varnish
X-Cache:
- HIT
X-Cache-Hits:
- '0'
X-Content-Type-Options:
- nosniff
X-Fastly-Request-ID:
- 540d936ced87a52cdd17861b4757844b6bc7b71e
X-Frame-Options:
- deny
X-GitHub-Request-Id:
- BACE:2E8F4B:1CE9F92:1E6FB29:6634FE90
X-Served-By:
- cache-cph2320056-CPH
X-Timer:
- S1714749909.439882,VS0,VE153
X-XSS-Protection:
- 1; mode=block
status:
code: 200
message: OK
version: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
interactions:
- request:
body: null
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate, br
Connection:
- keep-alive
User-Agent:
- python-requests/2.31.0
method: GET
uri: https://raw.githubusercontent.com/stac-extensions/label/main/examples/multidataset/catalog.json
response:
body:
string: "{\n \"stac_version\": \"1.0.0-rc.1\",\n \"type\": \"Catalog\",\n
\ \"id\": \"label_extension_demo\",\n \"title\": \"label extension demo\",\n
\ \"description\": \"Sample ML training data labels in the STAC format\",\n
\ \"links\": [\n {\n \"rel\": \"root\",\n \"href\": \"./catalog.json\"\n
\ },\n {\n \"rel\": \"child\",\n \"href\": \"zanzibar/collection.json\"\n
\ },\n {\n \"rel\": \"child\",\n \"href\": \"spacenet-buildings/collection.json\"\n
\ }\n ]\n}"
headers:
Accept-Ranges:
- bytes
Access-Control-Allow-Origin:
- '*'
Cache-Control:
- max-age=300
Connection:
- keep-alive
Content-Encoding:
- gzip
Content-Length:
- '236'
Content-Security-Policy:
- default-src 'none'; style-src 'unsafe-inline'; sandbox
Content-Type:
- text/plain; charset=utf-8
Cross-Origin-Resource-Policy:
- cross-origin
Date:
- Fri, 03 May 2024 15:25:09 GMT
ETag:
- W/"acb7a8d6636e24e32f4018c14f1c4ff418a82567b2746560f9eae6ad97a48a54"
Expires:
- Fri, 03 May 2024 15:30:09 GMT
Source-Age:
- '0'
Strict-Transport-Security:
- max-age=31536000
Vary:
- Authorization,Accept-Encoding,Origin
Via:
- 1.1 varnish
X-Cache:
- HIT
X-Cache-Hits:
- '1'
X-Content-Type-Options:
- nosniff
X-Fastly-Request-ID:
- 946111bff5a656f86ac42d826e730bc3ed27e7a6
X-Frame-Options:
- deny
X-GitHub-Request-Id:
- BACE:2E8F4B:1CE9F67:1E6FB08:6634FE90
X-Served-By:
- cache-cph2320055-CPH
X-Timer:
- S1714749910.668303,VS0,VE1
X-XSS-Protection:
- 1; mode=block
status:
code: 200
message: OK
- request:
body: null
headers:
Connection:
- close
Host:
- raw.githubusercontent.com
User-Agent:
- Python-urllib/3.12
method: GET
uri: https://raw.githubusercontent.com/stac-extensions/label/main/examples/multidataset/catalog.json
response:
body:
string: "{\n \"stac_version\": \"1.0.0-rc.1\",\n \"type\": \"Catalog\",\n
\ \"id\": \"label_extension_demo\",\n \"title\": \"label extension demo\",\n
\ \"description\": \"Sample ML training data labels in the STAC format\",\n
\ \"links\": [\n {\n \"rel\": \"root\",\n \"href\": \"./catalog.json\"\n
\ },\n {\n \"rel\": \"child\",\n \"href\": \"zanzibar/collection.json\"\n
\ },\n {\n \"rel\": \"child\",\n \"href\": \"spacenet-buildings/collection.json\"\n
\ }\n ]\n}"
headers:
Accept-Ranges:
- bytes
Access-Control-Allow-Origin:
- '*'
Cache-Control:
- max-age=300
Connection:
- close
Content-Length:
- '436'
Content-Security-Policy:
- default-src 'none'; style-src 'unsafe-inline'; sandbox
Content-Type:
- text/plain; charset=utf-8
Cross-Origin-Resource-Policy:
- cross-origin
Date:
- Fri, 03 May 2024 15:25:09 GMT
ETag:
- '"e74ebcbc46d43c5b693ecb995381fbeba03583627e6d65b21ed7678a10d94729"'
Expires:
- Fri, 03 May 2024 15:30:09 GMT
Source-Age:
- '0'
Strict-Transport-Security:
- max-age=31536000
Vary:
- Authorization,Accept-Encoding,Origin
Via:
- 1.1 varnish
X-Cache:
- HIT
X-Cache-Hits:
- '1'
X-Content-Type-Options:
- nosniff
X-Fastly-Request-ID:
- e8716da96d920c901211df1579fabcff085f2dc1
X-Frame-Options:
- deny
X-GitHub-Request-Id:
- BACE:2E8F4B:1CE9F92:1E6FB29:6634FE90
X-Served-By:
- cache-cph2320042-CPH
X-Timer:
- S1714749910.704696,VS0,VE1
X-XSS-Protection:
- 1; mode=block
status:
code: 200
message: OK
version: 1
Loading

0 comments on commit dcb8604

Please sign in to comment.