Skip to content

Commit dcb8604

Browse files
committed
Adjust open_params and add get_item_collection
1 parent 916d671 commit dcb8604

31 files changed

+8479
-67
lines changed

environment.yml

+2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ channels:
55
dependencies:
66
# Required
77
- pystac
8+
- pystac-client
89
- xarray
910
- xcube
1011
# for testing
1112
- black
1213
- flake8
1314
- pytest
15+
- pytest-recording

pyproject.toml

+4-1
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@ readme = {file = "README.md", content-type = "text/markdown"}
1818
license = {text = "MIT"}
1919
requires-python = ">=3.10"
2020
dependencies = [
21+
"pystac",
22+
"pystac-client",
2123
"xarray",
22-
"pystac"
24+
"xcube"
2325
]
2426

2527
[tool.setuptools.dynamic]
@@ -35,6 +37,7 @@ exclude = [
3537
dev = [
3638
"pytest",
3739
"pytest-cov",
40+
"pytest-recording",
3841
"black",
3942
"flake8"
4043
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
interactions:
2+
- request:
3+
body: null
4+
headers:
5+
Accept:
6+
- '*/*'
7+
Accept-Encoding:
8+
- gzip, deflate, br
9+
Connection:
10+
- keep-alive
11+
User-Agent:
12+
- python-requests/2.31.0
13+
method: GET
14+
uri: https://raw.githubusercontent.com/stac-extensions/label/main/examples/multidataset/catalog.json
15+
response:
16+
body:
17+
string: "{\n \"stac_version\": \"1.0.0-rc.1\",\n \"type\": \"Catalog\",\n
18+
\ \"id\": \"label_extension_demo\",\n \"title\": \"label extension demo\",\n
19+
\ \"description\": \"Sample ML training data labels in the STAC format\",\n
20+
\ \"links\": [\n {\n \"rel\": \"root\",\n \"href\": \"./catalog.json\"\n
21+
\ },\n {\n \"rel\": \"child\",\n \"href\": \"zanzibar/collection.json\"\n
22+
\ },\n {\n \"rel\": \"child\",\n \"href\": \"spacenet-buildings/collection.json\"\n
23+
\ }\n ]\n}"
24+
headers:
25+
Accept-Ranges:
26+
- bytes
27+
Access-Control-Allow-Origin:
28+
- '*'
29+
Cache-Control:
30+
- max-age=300
31+
Connection:
32+
- keep-alive
33+
Content-Encoding:
34+
- gzip
35+
Content-Length:
36+
- '236'
37+
Content-Security-Policy:
38+
- default-src 'none'; style-src 'unsafe-inline'; sandbox
39+
Content-Type:
40+
- text/plain; charset=utf-8
41+
Cross-Origin-Resource-Policy:
42+
- cross-origin
43+
Date:
44+
- Fri, 03 May 2024 15:25:09 GMT
45+
ETag:
46+
- W/"acb7a8d6636e24e32f4018c14f1c4ff418a82567b2746560f9eae6ad97a48a54"
47+
Expires:
48+
- Fri, 03 May 2024 15:30:09 GMT
49+
Source-Age:
50+
- '0'
51+
Strict-Transport-Security:
52+
- max-age=31536000
53+
Vary:
54+
- Authorization,Accept-Encoding,Origin
55+
Via:
56+
- 1.1 varnish
57+
X-Cache:
58+
- HIT
59+
X-Cache-Hits:
60+
- '12'
61+
X-Content-Type-Options:
62+
- nosniff
63+
X-Fastly-Request-ID:
64+
- 0a4e232284200ad72c67ee912e80a4079534af08
65+
X-Frame-Options:
66+
- deny
67+
X-GitHub-Request-Id:
68+
- BACE:2E8F4B:1CE9F67:1E6FB08:6634FE90
69+
X-Served-By:
70+
- cache-cph2320050-CPH
71+
X-Timer:
72+
- S1714749909.235819,VS0,VE142
73+
X-XSS-Protection:
74+
- 1; mode=block
75+
status:
76+
code: 200
77+
message: OK
78+
- request:
79+
body: null
80+
headers:
81+
Connection:
82+
- close
83+
Host:
84+
- raw.githubusercontent.com
85+
User-Agent:
86+
- Python-urllib/3.12
87+
method: GET
88+
uri: https://raw.githubusercontent.com/stac-extensions/label/main/examples/multidataset/catalog.json
89+
response:
90+
body:
91+
string: "{\n \"stac_version\": \"1.0.0-rc.1\",\n \"type\": \"Catalog\",\n
92+
\ \"id\": \"label_extension_demo\",\n \"title\": \"label extension demo\",\n
93+
\ \"description\": \"Sample ML training data labels in the STAC format\",\n
94+
\ \"links\": [\n {\n \"rel\": \"root\",\n \"href\": \"./catalog.json\"\n
95+
\ },\n {\n \"rel\": \"child\",\n \"href\": \"zanzibar/collection.json\"\n
96+
\ },\n {\n \"rel\": \"child\",\n \"href\": \"spacenet-buildings/collection.json\"\n
97+
\ }\n ]\n}"
98+
headers:
99+
Accept-Ranges:
100+
- bytes
101+
Access-Control-Allow-Origin:
102+
- '*'
103+
Cache-Control:
104+
- max-age=300
105+
Connection:
106+
- close
107+
Content-Length:
108+
- '436'
109+
Content-Security-Policy:
110+
- default-src 'none'; style-src 'unsafe-inline'; sandbox
111+
Content-Type:
112+
- text/plain; charset=utf-8
113+
Cross-Origin-Resource-Policy:
114+
- cross-origin
115+
Date:
116+
- Fri, 03 May 2024 15:25:09 GMT
117+
ETag:
118+
- '"e74ebcbc46d43c5b693ecb995381fbeba03583627e6d65b21ed7678a10d94729"'
119+
Expires:
120+
- Fri, 03 May 2024 15:30:09 GMT
121+
Source-Age:
122+
- '0'
123+
Strict-Transport-Security:
124+
- max-age=31536000
125+
Vary:
126+
- Authorization,Accept-Encoding,Origin
127+
Via:
128+
- 1.1 varnish
129+
X-Cache:
130+
- HIT
131+
X-Cache-Hits:
132+
- '0'
133+
X-Content-Type-Options:
134+
- nosniff
135+
X-Fastly-Request-ID:
136+
- 540d936ced87a52cdd17861b4757844b6bc7b71e
137+
X-Frame-Options:
138+
- deny
139+
X-GitHub-Request-Id:
140+
- BACE:2E8F4B:1CE9F92:1E6FB29:6634FE90
141+
X-Served-By:
142+
- cache-cph2320056-CPH
143+
X-Timer:
144+
- S1714749909.439882,VS0,VE153
145+
X-XSS-Protection:
146+
- 1; mode=block
147+
status:
148+
code: 200
149+
message: OK
150+
version: 1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
interactions:
2+
- request:
3+
body: null
4+
headers:
5+
Accept:
6+
- '*/*'
7+
Accept-Encoding:
8+
- gzip, deflate, br
9+
Connection:
10+
- keep-alive
11+
User-Agent:
12+
- python-requests/2.31.0
13+
method: GET
14+
uri: https://raw.githubusercontent.com/stac-extensions/label/main/examples/multidataset/catalog.json
15+
response:
16+
body:
17+
string: "{\n \"stac_version\": \"1.0.0-rc.1\",\n \"type\": \"Catalog\",\n
18+
\ \"id\": \"label_extension_demo\",\n \"title\": \"label extension demo\",\n
19+
\ \"description\": \"Sample ML training data labels in the STAC format\",\n
20+
\ \"links\": [\n {\n \"rel\": \"root\",\n \"href\": \"./catalog.json\"\n
21+
\ },\n {\n \"rel\": \"child\",\n \"href\": \"zanzibar/collection.json\"\n
22+
\ },\n {\n \"rel\": \"child\",\n \"href\": \"spacenet-buildings/collection.json\"\n
23+
\ }\n ]\n}"
24+
headers:
25+
Accept-Ranges:
26+
- bytes
27+
Access-Control-Allow-Origin:
28+
- '*'
29+
Cache-Control:
30+
- max-age=300
31+
Connection:
32+
- keep-alive
33+
Content-Encoding:
34+
- gzip
35+
Content-Length:
36+
- '236'
37+
Content-Security-Policy:
38+
- default-src 'none'; style-src 'unsafe-inline'; sandbox
39+
Content-Type:
40+
- text/plain; charset=utf-8
41+
Cross-Origin-Resource-Policy:
42+
- cross-origin
43+
Date:
44+
- Fri, 03 May 2024 15:25:09 GMT
45+
ETag:
46+
- W/"acb7a8d6636e24e32f4018c14f1c4ff418a82567b2746560f9eae6ad97a48a54"
47+
Expires:
48+
- Fri, 03 May 2024 15:30:09 GMT
49+
Source-Age:
50+
- '0'
51+
Strict-Transport-Security:
52+
- max-age=31536000
53+
Vary:
54+
- Authorization,Accept-Encoding,Origin
55+
Via:
56+
- 1.1 varnish
57+
X-Cache:
58+
- HIT
59+
X-Cache-Hits:
60+
- '1'
61+
X-Content-Type-Options:
62+
- nosniff
63+
X-Fastly-Request-ID:
64+
- 946111bff5a656f86ac42d826e730bc3ed27e7a6
65+
X-Frame-Options:
66+
- deny
67+
X-GitHub-Request-Id:
68+
- BACE:2E8F4B:1CE9F67:1E6FB08:6634FE90
69+
X-Served-By:
70+
- cache-cph2320055-CPH
71+
X-Timer:
72+
- S1714749910.668303,VS0,VE1
73+
X-XSS-Protection:
74+
- 1; mode=block
75+
status:
76+
code: 200
77+
message: OK
78+
- request:
79+
body: null
80+
headers:
81+
Connection:
82+
- close
83+
Host:
84+
- raw.githubusercontent.com
85+
User-Agent:
86+
- Python-urllib/3.12
87+
method: GET
88+
uri: https://raw.githubusercontent.com/stac-extensions/label/main/examples/multidataset/catalog.json
89+
response:
90+
body:
91+
string: "{\n \"stac_version\": \"1.0.0-rc.1\",\n \"type\": \"Catalog\",\n
92+
\ \"id\": \"label_extension_demo\",\n \"title\": \"label extension demo\",\n
93+
\ \"description\": \"Sample ML training data labels in the STAC format\",\n
94+
\ \"links\": [\n {\n \"rel\": \"root\",\n \"href\": \"./catalog.json\"\n
95+
\ },\n {\n \"rel\": \"child\",\n \"href\": \"zanzibar/collection.json\"\n
96+
\ },\n {\n \"rel\": \"child\",\n \"href\": \"spacenet-buildings/collection.json\"\n
97+
\ }\n ]\n}"
98+
headers:
99+
Accept-Ranges:
100+
- bytes
101+
Access-Control-Allow-Origin:
102+
- '*'
103+
Cache-Control:
104+
- max-age=300
105+
Connection:
106+
- close
107+
Content-Length:
108+
- '436'
109+
Content-Security-Policy:
110+
- default-src 'none'; style-src 'unsafe-inline'; sandbox
111+
Content-Type:
112+
- text/plain; charset=utf-8
113+
Cross-Origin-Resource-Policy:
114+
- cross-origin
115+
Date:
116+
- Fri, 03 May 2024 15:25:09 GMT
117+
ETag:
118+
- '"e74ebcbc46d43c5b693ecb995381fbeba03583627e6d65b21ed7678a10d94729"'
119+
Expires:
120+
- Fri, 03 May 2024 15:30:09 GMT
121+
Source-Age:
122+
- '0'
123+
Strict-Transport-Security:
124+
- max-age=31536000
125+
Vary:
126+
- Authorization,Accept-Encoding,Origin
127+
Via:
128+
- 1.1 varnish
129+
X-Cache:
130+
- HIT
131+
X-Cache-Hits:
132+
- '1'
133+
X-Content-Type-Options:
134+
- nosniff
135+
X-Fastly-Request-ID:
136+
- e8716da96d920c901211df1579fabcff085f2dc1
137+
X-Frame-Options:
138+
- deny
139+
X-GitHub-Request-Id:
140+
- BACE:2E8F4B:1CE9F92:1E6FB29:6634FE90
141+
X-Served-By:
142+
- cache-cph2320042-CPH
143+
X-Timer:
144+
- S1714749910.704696,VS0,VE1
145+
X-XSS-Protection:
146+
- 1; mode=block
147+
status:
148+
code: 200
149+
message: OK
150+
version: 1

0 commit comments

Comments
 (0)