Skip to content

Commit 659a2b6

Browse files
committed
added tests for migration
1 parent a919888 commit 659a2b6

File tree

17 files changed

+2794
-0
lines changed

17 files changed

+2794
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
interactions:
2+
- request:
3+
body: null
4+
headers:
5+
Accept:
6+
- '*/*'
7+
Accept-Encoding:
8+
- gzip, deflate
9+
Connection:
10+
- keep-alive
11+
User-Agent:
12+
- python-requests/2.32.3
13+
method: GET
14+
uri: https://raw.githubusercontent.com/stac-extensions/mlm/refs/tags/v1.0.0/examples/item_basic.json
15+
response:
16+
body:
17+
string: "{\n \"stac_version\": \"1.0.0\",\n \"stac_extensions\": [\n \"https://crim-ca.github.io/mlm-extension/v1.0.0/schema.json\"\n
18+
\ ],\n \"type\": \"Feature\",\n \"id\": \"example-model\",\n \"collection\":
19+
\"ml-model-examples\",\n \"geometry\": {\n \"type\": \"Polygon\",\n \"coordinates\":
20+
[\n [\n [\n -7.882190080512502,\n 37.13739173208318\n
21+
\ ],\n [\n -7.882190080512502,\n 58.21798141355221\n
22+
\ ],\n [\n 27.911651652899923,\n 58.21798141355221\n
23+
\ ],\n [\n 27.911651652899923,\n 37.13739173208318\n
24+
\ ],\n [\n -7.882190080512502,\n 37.13739173208318\n
25+
\ ]\n ]\n ]\n },\n \"bbox\": [\n -7.882190080512502,\n
26+
\ 37.13739173208318,\n 27.911651652899923,\n 58.21798141355221\n ],\n
27+
\ \"properties\": {\n \"description\": \"Basic STAC Item with only the
28+
MLM extension and no other extension cross-references.\",\n \"datetime\":
29+
null,\n \"start_datetime\": \"1900-01-01T00:00:00Z\",\n \"end_datetime\":
30+
\"9999-12-31T23:59:59Z\",\n \"mlm:name\": \"example-model\",\n \"mlm:tasks\":
31+
[\n \"classification\"\n ],\n \"mlm:architecture\": \"ResNet\",\n
32+
\ \"mlm:input\": [\n {\n \"name\": \"Model with RGB input that
33+
does not refer to any band.\",\n \"bands\": [],\n \"input\":
34+
{\n \"shape\": [\n -1,\n 3,\n 64,\n
35+
\ 64\n ],\n \"dim_order\": [\n \"batch\",\n
36+
\ \"channel\",\n \"height\",\n \"width\"\n
37+
\ ],\n \"data_type\": \"float32\"\n }\n }\n ],\n
38+
\ \"mlm:output\": [\n {\n \"name\": \"classification\",\n \"tasks\":
39+
[\n \"classification\"\n ],\n \"result\": {\n \"shape\":
40+
[\n -1,\n 1\n ],\n \"dim_order\":
41+
[\n \"batch\",\n \"class\"\n ],\n \"data_type\":
42+
\"uint8\"\n },\n \"classification_classes\": [\n {\n
43+
\ \"value\": 0,\n \"name\": \"BACKGROUND\",\n \"description\":
44+
\"Background non-city.\",\n \"color_hint\": [\n 0,\n
45+
\ 0,\n 0\n ]\n },\n {\n
46+
\ \"value\": 1,\n \"name\": \"CITY\",\n \"description\":
47+
\"A city is detected.\",\n \"color_hint\": [\n 0,\n
48+
\ 0,\n 255\n ]\n }\n ]\n
49+
\ }\n ]\n },\n \"assets\": {\n \"model\": {\n \"href\": \"https://huggingface.co/example/model-card\",\n
50+
\ \"title\": \"Pytorch weights checkpoint\",\n \"description\": \"Example
51+
model.\",\n \"type\": \"text/html\",\n \"roles\": [\n \"mlm:model\"\n
52+
\ ]\n }\n },\n \"links\": [\n {\n \"rel\": \"collection\",\n
53+
\ \"href\": \"./collection.json\",\n \"type\": \"application/json\"\n
54+
\ },\n {\n \"rel\": \"self\",\n \"href\": \"./item_basic.json\",\n
55+
\ \"type\": \"application/geo+json\"\n }\n ]\n}\n"
56+
headers:
57+
Accept-Ranges:
58+
- bytes
59+
Access-Control-Allow-Origin:
60+
- '*'
61+
Cache-Control:
62+
- max-age=300
63+
Connection:
64+
- keep-alive
65+
Content-Encoding:
66+
- gzip
67+
Content-Length:
68+
- '931'
69+
Content-Security-Policy:
70+
- default-src 'none'; style-src 'unsafe-inline'; sandbox
71+
Content-Type:
72+
- text/plain; charset=utf-8
73+
Cross-Origin-Resource-Policy:
74+
- cross-origin
75+
Date:
76+
- Tue, 29 Apr 2025 08:30:25 GMT
77+
ETag:
78+
- W/"06b55e576e4efab26350d8d7551913db9419014d18bff024af7e5818a2366f4b"
79+
Expires:
80+
- Tue, 29 Apr 2025 08:35:25 GMT
81+
Source-Age:
82+
- '120'
83+
Strict-Transport-Security:
84+
- max-age=31536000
85+
Vary:
86+
- Authorization,Accept-Encoding,Origin
87+
Via:
88+
- 1.1 varnish
89+
X-Cache:
90+
- HIT
91+
X-Cache-Hits:
92+
- '0'
93+
X-Content-Type-Options:
94+
- nosniff
95+
X-Fastly-Request-ID:
96+
- cbb71f87565b003068eeb6cf1d44e3e92f0b75fb
97+
X-Frame-Options:
98+
- deny
99+
X-GitHub-Request-Id:
100+
- EAA8:1C62A6:B8FA8E:D1A987:681087C4
101+
X-Served-By:
102+
- cache-fra-etou8220124-FRA
103+
X-Timer:
104+
- S1745915426.697783,VS0,VE1
105+
X-XSS-Protection:
106+
- 1; mode=block
107+
status:
108+
code: 200
109+
message: OK
110+
version: 1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
interactions:
2+
- request:
3+
body: null
4+
headers:
5+
Accept:
6+
- '*/*'
7+
Accept-Encoding:
8+
- gzip, deflate
9+
Connection:
10+
- keep-alive
11+
User-Agent:
12+
- python-requests/2.32.3
13+
method: GET
14+
uri: https://raw.githubusercontent.com/stac-extensions/mlm/refs/tags/v1.1.0/examples/item_basic.json
15+
response:
16+
body:
17+
string: "{\n \"stac_version\": \"1.0.0\",\n \"stac_extensions\": [\n \"https://crim-ca.github.io/mlm-extension/v1.1.0/schema.json\"\n
18+
\ ],\n \"type\": \"Feature\",\n \"id\": \"example-model\",\n \"collection\":
19+
\"ml-model-examples\",\n \"geometry\": {\n \"type\": \"Polygon\",\n \"coordinates\":
20+
[\n [\n [\n -7.882190080512502,\n 37.13739173208318\n
21+
\ ],\n [\n -7.882190080512502,\n 58.21798141355221\n
22+
\ ],\n [\n 27.911651652899923,\n 58.21798141355221\n
23+
\ ],\n [\n 27.911651652899923,\n 37.13739173208318\n
24+
\ ],\n [\n -7.882190080512502,\n 37.13739173208318\n
25+
\ ]\n ]\n ]\n },\n \"bbox\": [\n -7.882190080512502,\n
26+
\ 37.13739173208318,\n 27.911651652899923,\n 58.21798141355221\n ],\n
27+
\ \"properties\": {\n \"description\": \"Basic STAC Item with only the
28+
MLM extension and no other extension cross-references.\",\n \"datetime\":
29+
null,\n \"start_datetime\": \"1900-01-01T00:00:00Z\",\n \"end_datetime\":
30+
\"9999-12-31T23:59:59Z\",\n \"mlm:name\": \"example-model\",\n \"mlm:tasks\":
31+
[\n \"classification\"\n ],\n \"mlm:architecture\": \"ResNet\",\n
32+
\ \"mlm:input\": [\n {\n \"name\": \"Model with RGB input that
33+
does not refer to any band.\",\n \"bands\": [],\n \"input\":
34+
{\n \"shape\": [\n -1,\n 3,\n 64,\n
35+
\ 64\n ],\n \"dim_order\": [\n \"batch\",\n
36+
\ \"channel\",\n \"height\",\n \"width\"\n
37+
\ ],\n \"data_type\": \"float32\"\n }\n }\n ],\n
38+
\ \"mlm:output\": [\n {\n \"name\": \"classification\",\n \"tasks\":
39+
[\n \"classification\"\n ],\n \"result\": {\n \"shape\":
40+
[\n -1,\n 1\n ],\n \"dim_order\":
41+
[\n \"batch\",\n \"class\"\n ],\n \"data_type\":
42+
\"uint8\"\n },\n \"classification_classes\": [\n {\n
43+
\ \"value\": 0,\n \"name\": \"BACKGROUND\",\n \"description\":
44+
\"Background non-city.\",\n \"color_hint\": [\n 0,\n
45+
\ 0,\n 0\n ]\n },\n {\n
46+
\ \"value\": 1,\n \"name\": \"CITY\",\n \"description\":
47+
\"A city is detected.\",\n \"color_hint\": [\n 0,\n
48+
\ 0,\n 255\n ]\n }\n ]\n
49+
\ }\n ]\n },\n \"assets\": {\n \"model\": {\n \"href\": \"https://huggingface.co/example/model-card\",\n
50+
\ \"title\": \"Pytorch weights checkpoint\",\n \"description\": \"Example
51+
model.\",\n \"type\": \"text/html\",\n \"roles\": [\n \"mlm:model\"\n
52+
\ ]\n }\n },\n \"links\": [\n {\n \"rel\": \"collection\",\n
53+
\ \"href\": \"./collection.json\",\n \"type\": \"application/json\"\n
54+
\ },\n {\n \"rel\": \"self\",\n \"href\": \"./item_basic.json\",\n
55+
\ \"type\": \"application/geo+json\"\n }\n ]\n}\n"
56+
headers:
57+
Accept-Ranges:
58+
- bytes
59+
Access-Control-Allow-Origin:
60+
- '*'
61+
Cache-Control:
62+
- max-age=300
63+
Connection:
64+
- keep-alive
65+
Content-Encoding:
66+
- gzip
67+
Content-Length:
68+
- '933'
69+
Content-Security-Policy:
70+
- default-src 'none'; style-src 'unsafe-inline'; sandbox
71+
Content-Type:
72+
- text/plain; charset=utf-8
73+
Cross-Origin-Resource-Policy:
74+
- cross-origin
75+
Date:
76+
- Tue, 29 Apr 2025 08:30:25 GMT
77+
ETag:
78+
- W/"60cdf768894e2f4eaafeb01906736c2bb03903640b6615f1cea0dd4ace03a6d3"
79+
Expires:
80+
- Tue, 29 Apr 2025 08:35:25 GMT
81+
Source-Age:
82+
- '120'
83+
Strict-Transport-Security:
84+
- max-age=31536000
85+
Vary:
86+
- Authorization,Accept-Encoding,Origin
87+
Via:
88+
- 1.1 varnish
89+
X-Cache:
90+
- HIT
91+
X-Cache-Hits:
92+
- '0'
93+
X-Content-Type-Options:
94+
- nosniff
95+
X-Fastly-Request-ID:
96+
- fdaeae3f7f917f5f4c801f2719acdc47c172defb
97+
X-Frame-Options:
98+
- deny
99+
X-GitHub-Request-Id:
100+
- 5BEA:6EEED:C4E1E6:DE2B23:68108DA9
101+
X-Served-By:
102+
- cache-fra-etou8220128-FRA
103+
X-Timer:
104+
- S1745915426.768525,VS0,VE2
105+
X-XSS-Protection:
106+
- 1; mode=block
107+
status:
108+
code: 200
109+
message: OK
110+
version: 1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
interactions:
2+
- request:
3+
body: null
4+
headers:
5+
Accept:
6+
- '*/*'
7+
Accept-Encoding:
8+
- gzip, deflate
9+
Connection:
10+
- keep-alive
11+
User-Agent:
12+
- python-requests/2.32.3
13+
method: GET
14+
uri: https://raw.githubusercontent.com/stac-extensions/mlm/refs/tags/v1.2.0/examples/item_basic.json
15+
response:
16+
body:
17+
string: "{\n \"stac_version\": \"1.0.0\",\n \"stac_extensions\": [\n \"https://crim-ca.github.io/mlm-extension/v1.2.0/schema.json\"\n
18+
\ ],\n \"type\": \"Feature\",\n \"id\": \"example-model\",\n \"collection\":
19+
\"ml-model-examples\",\n \"geometry\": {\n \"type\": \"Polygon\",\n \"coordinates\":
20+
[\n [\n [\n -7.882190080512502,\n 37.13739173208318\n
21+
\ ],\n [\n -7.882190080512502,\n 58.21798141355221\n
22+
\ ],\n [\n 27.911651652899923,\n 58.21798141355221\n
23+
\ ],\n [\n 27.911651652899923,\n 37.13739173208318\n
24+
\ ],\n [\n -7.882190080512502,\n 37.13739173208318\n
25+
\ ]\n ]\n ]\n },\n \"bbox\": [\n -7.882190080512502,\n
26+
\ 37.13739173208318,\n 27.911651652899923,\n 58.21798141355221\n ],\n
27+
\ \"properties\": {\n \"description\": \"Basic STAC Item with only the
28+
MLM extension and no other extension cross-references.\",\n \"datetime\":
29+
null,\n \"start_datetime\": \"1900-01-01T00:00:00Z\",\n \"end_datetime\":
30+
\"9999-12-31T23:59:59Z\",\n \"mlm:name\": \"example-model\",\n \"mlm:tasks\":
31+
[\n \"classification\"\n ],\n \"mlm:architecture\": \"ResNet\",\n
32+
\ \"mlm:input\": [\n {\n \"name\": \"Model with RGB input that
33+
does not refer to any band.\",\n \"bands\": [],\n \"input\":
34+
{\n \"shape\": [\n -1,\n 3,\n 64,\n
35+
\ 64\n ],\n \"dim_order\": [\n \"batch\",\n
36+
\ \"channel\",\n \"height\",\n \"width\"\n
37+
\ ],\n \"data_type\": \"float32\"\n }\n }\n ],\n
38+
\ \"mlm:output\": [\n {\n \"name\": \"classification\",\n \"tasks\":
39+
[\n \"classification\"\n ],\n \"result\": {\n \"shape\":
40+
[\n -1,\n 1\n ],\n \"dim_order\":
41+
[\n \"batch\",\n \"class\"\n ],\n \"data_type\":
42+
\"uint8\"\n },\n \"classification_classes\": [\n {\n
43+
\ \"value\": 0,\n \"name\": \"BACKGROUND\",\n \"description\":
44+
\"Background non-city.\",\n \"color_hint\": [\n 0,\n
45+
\ 0,\n 0\n ]\n },\n {\n
46+
\ \"value\": 1,\n \"name\": \"CITY\",\n \"description\":
47+
\"A city is detected.\",\n \"color_hint\": [\n 0,\n
48+
\ 0,\n 255\n ]\n }\n ]\n
49+
\ }\n ]\n },\n \"assets\": {\n \"model\": {\n \"href\": \"https://huggingface.co/example/model-card\",\n
50+
\ \"title\": \"Pytorch weights checkpoint\",\n \"description\": \"Example
51+
model.\",\n \"type\": \"text/html\",\n \"roles\": [\n \"mlm:model\"\n
52+
\ ]\n }\n },\n \"links\": [\n {\n \"rel\": \"collection\",\n
53+
\ \"href\": \"./collection.json\",\n \"type\": \"application/json\"\n
54+
\ },\n {\n \"rel\": \"self\",\n \"href\": \"./item_basic.json\",\n
55+
\ \"type\": \"application/geo+json\"\n }\n ]\n}\n"
56+
headers:
57+
Accept-Ranges:
58+
- bytes
59+
Access-Control-Allow-Origin:
60+
- '*'
61+
Cache-Control:
62+
- max-age=300
63+
Connection:
64+
- keep-alive
65+
Content-Encoding:
66+
- gzip
67+
Content-Length:
68+
- '934'
69+
Content-Security-Policy:
70+
- default-src 'none'; style-src 'unsafe-inline'; sandbox
71+
Content-Type:
72+
- text/plain; charset=utf-8
73+
Cross-Origin-Resource-Policy:
74+
- cross-origin
75+
Date:
76+
- Tue, 29 Apr 2025 08:30:25 GMT
77+
ETag:
78+
- W/"4214e4c8a7e047eaff361f43a1e2ce58d4e403d064c4a0a9fc870a0f02f3ffd4"
79+
Expires:
80+
- Tue, 29 Apr 2025 08:35:25 GMT
81+
Source-Age:
82+
- '119'
83+
Strict-Transport-Security:
84+
- max-age=31536000
85+
Vary:
86+
- Authorization,Accept-Encoding,Origin
87+
Via:
88+
- 1.1 varnish
89+
X-Cache:
90+
- HIT
91+
X-Cache-Hits:
92+
- '0'
93+
X-Content-Type-Options:
94+
- nosniff
95+
X-Fastly-Request-ID:
96+
- dea14443ef6f269978dd64c2bb7cf0811dcd3102
97+
X-Frame-Options:
98+
- deny
99+
X-GitHub-Request-Id:
100+
- 6822:112C:B53704:CD19F6:68108DA9
101+
X-Served-By:
102+
- cache-fra-etou8220154-FRA
103+
X-Timer:
104+
- S1745915426.841928,VS0,VE1
105+
X-XSS-Protection:
106+
- 1; mode=block
107+
status:
108+
code: 200
109+
message: OK
110+
version: 1

0 commit comments

Comments
 (0)