Skip to content

Commit 8d5097e

Browse files
authored
Merge pull request #120 from stac-utils/stac-validator-3.6.0
Upgrade to stac -validator v3.6.0
2 parents 0733bf2 + c059a25 commit 8d5097e

File tree

6 files changed

+270
-7
lines changed

6 files changed

+270
-7
lines changed

.github/workflows/test-runner.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
runs-on: ubuntu-latest
4242
strategy:
4343
matrix:
44-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
44+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
4545

4646
steps:
4747
- uses: actions/checkout@v3

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,16 @@ The format is (loosely) based on [Keep a Changelog](http://keepachangelog.com/)
66

77
## Unreleased
88

9+
### Added
10+
11+
- Test for Python 3.13 in workflow ([#120](https://github.com/stac-utils/stac-check/pull/120))
12+
913
### Changed
1014

15+
### Updated
16+
17+
- Updated stac-validator to v3.6.0 ([#120](https://github.com/stac-utils/stac-check/pull/120))
18+
1119
## [v1.5.0] - 2025-01-17
1220

1321
### Added

sample_files/1.0.0/bad-item.json

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
{
2+
"stac_version": "1.0.0",
3+
"stac_extensions": [
4+
"https://stac-extensions.github.io/eo/v1.0.0/schema.json"
5+
],
6+
"type": "Feature",
7+
"bbox": [
8+
-122.59750209,
9+
37.48803556,
10+
-122.2880486,
11+
37.613537207
12+
],
13+
"geometry": {
14+
"type": "Polygon",
15+
"coordinates": [
16+
[
17+
[
18+
-122.308150179,
19+
37.488035566
20+
],
21+
[
22+
-122.597502109,
23+
37.538869539
24+
],
25+
[
26+
-122.576687533,
27+
37.613537207
28+
],
29+
[
30+
-122.2880486,
31+
37.562818007
32+
],
33+
[
34+
-122.308150179,
35+
37.488035566
36+
]
37+
]
38+
]
39+
},
40+
"properties": {
41+
"title": "Full Item",
42+
"description": "A STAC item without an id",
43+
"datetime": null,
44+
"start_datetime": "2016-05-03T13:22:30Z",
45+
"end_datetime": "2016-05-03T13:27:30Z",
46+
"created": "2016-05-04T00:00:01Z",
47+
"updated": "2017-01-01T00:30:55Z",
48+
"license": "various",
49+
"providers": [
50+
{
51+
"name": "Remote Data, Inc",
52+
"description": "Producers of awesome spatiotemporal assets",
53+
"roles": [
54+
"producer",
55+
"processor"
56+
],
57+
"url": "http://remotedata.it"
58+
}
59+
],
60+
"platform": "cool_sat2",
61+
"instruments": [
62+
"cool_sensor_v1"
63+
]
64+
},
65+
"links": [
66+
{
67+
"rel": "root",
68+
"href": "./catalog.json",
69+
"type": "application/json",
70+
"title": "Example Catalog"
71+
},
72+
{
73+
"rel": "parent",
74+
"href": "./catalog.json",
75+
"type": "application/json",
76+
"title": "Example Catalog"
77+
},
78+
{
79+
"rel": "alternate",
80+
"type": "text/html",
81+
"href": "http://cool-sat.com/catalog/CS3-20160503_132130_04/CS3-20160503_132130_04.html",
82+
"title": "HTML representation of this STAC Item"
83+
},
84+
{
85+
"rel": "license",
86+
"type": "text/html",
87+
"href": "http://remotedata.io/license.html",
88+
"title": "Data License for Remote Data, Inc."
89+
}
90+
],
91+
"assets": {
92+
"analytic": {
93+
"href": "http://cool-sat.com/catalog/CS3-20160503_132130_04/analytic.tif",
94+
"title": "4-Band Analytic",
95+
"eo:bands": [
96+
{
97+
"name": "band1"
98+
},
99+
{
100+
"name": "band1"
101+
},
102+
{
103+
"name": "band2"
104+
},
105+
{
106+
"name": "band3"
107+
}
108+
]
109+
}
110+
}
111+
}
Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
{
2+
"stac_version": "1.0.0",
3+
"stac_extensions": [
4+
"https://stac-extensions.github.io/eo/v1.0.0/schema.json",
5+
"https://stac-extensions.github.io/view/v1.0.0/schema.json"
6+
],
7+
"type": "Feature",
8+
"id": "CS3-20160503_132131_08",
9+
"bbox": [
10+
-122.59750209,
11+
37.48803556,
12+
-122.2880486,
13+
37.613537207
14+
],
15+
"geometry": {
16+
"type": "Polygon",
17+
"coordinates": [
18+
[
19+
[
20+
-122.308150179,
21+
37.488035566
22+
],
23+
[
24+
-122.597502109,
25+
37.538869539
26+
],
27+
[
28+
-122.576687533,
29+
37.613537207
30+
],
31+
[
32+
-122.2880486,
33+
37.562818007
34+
],
35+
[
36+
-122.308150179,
37+
37.488035566
38+
]
39+
]
40+
]
41+
},
42+
"properties": {
43+
"title": "Full Item",
44+
"description": "A sample STAC Item demonstrates an Item that does not have a collection, which is not recommended, but allowed by the spec.",
45+
"datetime": null,
46+
"start_datetime": "2016-05-03T13:22:30Z",
47+
"end_datetime": "2016-05-03T13:27:30Z",
48+
"created": "2016-05-04T00:00:01Z",
49+
"updated": "2017-01-01T00:30:55Z",
50+
"license": "various",
51+
"providers": [
52+
{
53+
"name": "Remote Data, Inc",
54+
"description": "Producers of awesome spatiotemporal assets",
55+
"roles": [
56+
"producer",
57+
"processor"
58+
],
59+
"url": "http://remotedata.it"
60+
}
61+
],
62+
"platform": "cool_sat2",
63+
"instruments": [
64+
"cool_sensor_v1"
65+
],
66+
"view:sun_elevation": 33.4,
67+
"gsd": 0.512,
68+
"cs:type": "scene",
69+
"cs:anomalous_pixels": 0.14,
70+
"cs:earth_sun_distance": 1.014156,
71+
"cs:sat_id": "CS3",
72+
"cs:product_level": "LV1B"
73+
},
74+
"links": [
75+
{
76+
"rel": "root",
77+
"href": "./catalog.json",
78+
"type": "application/json",
79+
"title": "Example Catalog"
80+
},
81+
{
82+
"rel": "parent",
83+
"href": "./catalog.json",
84+
"type": "application/json",
85+
"title": "Example Catalog"
86+
},
87+
{
88+
"rel": "alternate",
89+
"type": "text/html",
90+
"href": "http://cool-sat.com/catalog/CS3-20160503_132130_04/CS3-20160503_132130_04.html",
91+
"title": "HTML representation of this STAC Item"
92+
},
93+
{
94+
"rel": "license",
95+
"type": "text/html",
96+
"href": "http://remotedata.io/license.html",
97+
"title": "Data License for Remote Data, Inc."
98+
}
99+
],
100+
"assets": {
101+
"analytic": {
102+
"href": "http://cool-sat.com/catalog/CS3-20160503_132130_04/analytic.tif",
103+
"title": "4-Band Analytic",
104+
"eo:bands": [
105+
{
106+
"name": "band1"
107+
},
108+
{
109+
"name": "band1"
110+
},
111+
{
112+
"name": "band2"
113+
},
114+
{
115+
"name": "band3"
116+
}
117+
]
118+
},
119+
"thumbnail": {
120+
"href": "http://cool-sat.com/catalog/CS3-20160503_132130_04/thumbnail.png",
121+
"title": "Thumbnail",
122+
"type": "image/png",
123+
"roles": [
124+
"thumbnail"
125+
]
126+
},
127+
"udm": {
128+
"href": "http://cool-sat.com/catalog/CS3-20160503_132130_04/UDM.tif",
129+
"title": "Unusable Data Mask"
130+
},
131+
"json-metadata": {
132+
"href": "http://cool-sat.com/catalog/CS3-20160503_132130_04/extended-metadata.json",
133+
"title": "Extended Metadata",
134+
"type": "application/json",
135+
"roles": [
136+
"metadata"
137+
]
138+
},
139+
"ephemeris": {
140+
"href": "http://cool-sat.com/catalog/CS3-20160503_132130_04/S3-20160503_132130_04.EPH",
141+
"title": "Satellite Ephemeris Metadata"
142+
}
143+
}
144+
}

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"requests>=2.32.3",
2121
"jsonschema>=4.23.0",
2222
"click>=8.1.8",
23-
"stac-validator>=3.5.0",
23+
"stac-validator>=3.6.0",
2424
"PyYAML",
2525
"python-dotenv",
2626
],

tests/test_lint.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,13 @@ def test_linter_collection_recursive():
126126
assert linter.recursive == True
127127
assert linter.validate_all[0] == {
128128
"version": "1.0.0",
129-
"path": "sample_files/1.0.0/catalog-with-bad-item.json",
129+
"path": "sample_files/1.0.0/./bad-item.json",
130130
"schema": [
131-
"https://schemas.stacspec.org/v1.0.0/catalog-spec/json-schema/catalog.json"
131+
"https://schemas.stacspec.org/v1.0.0/item-spec/json-schema/item.json"
132132
],
133-
"valid_stac": True,
134-
"asset_type": "CATALOG",
135-
"validation_method": "recursive",
133+
"valid_stac": False,
134+
"error_message": "'id' is a required property",
135+
"error_type": "JSONSchemaValidationError",
136136
}
137137

138138

0 commit comments

Comments
 (0)