Skip to content

Commit 0733bf2

Browse files
authored
Merge pull request #117 from stac-utils/v.1.5.0
Release v1.5.0
2 parents 9e35465 + f3a5bdf commit 0733bf2

File tree

7 files changed

+52
-24
lines changed

7 files changed

+52
-24
lines changed

CHANGELOG.md

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

77
## Unreleased
88

9+
### Changed
10+
11+
## [v1.5.0] - 2025-01-17
12+
913
### Added
1014

1115
- Allow to provide HTTP headers ([#114](https://github.com/stac-utils/stac-check/pull/114))
@@ -163,7 +167,8 @@ The format is (loosely) based on [Keep a Changelog](http://keepachangelog.com/)
163167
- Validation from stac-validator 2.3.0
164168
- Links and assets validation checks
165169

166-
[Unreleased]: https://github.com/stac-utils/stac-check/compare/v1.4.0...main
170+
[Unreleased]: https://github.com/stac-utils/stac-check/compare/v1.5.0...main
171+
[v1.5.0]: https://github.com/stac-utils/stac-check/compare/v1.4.0...v1.5.0
167172
[v1.4.0]: https://github.com/stac-utils/stac-check/compare/v1.3.3...v1.4.0
168173
[v1.3.3]: https://github.com/stac-utils/stac-check/compare/v1.3.2...v1.3.3
169174
[v1.3.2]: https://github.com/stac-utils/stac-check/compare/v1.3.1...v1.3.2

README.md

Lines changed: 32 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,29 @@
11
# stac-check
2+
23
## A linting and validation tool for STAC assets
34

45
The intent of this project is to provide a validation tool that also follows the official [STAC Best Practices document](https://github.com/radiantearth/stac-spec/blob/master/best-practices.md)
56

67
---
8+
79
### Documentation
10+
811
[stac-check.readthedocs.io](https://stac-check.readthedocs.io/en/latest/)
912

1013
---
14+
1115
### Install
16+
1217
`$ pip install stac-check`
1318

1419
or for local development
1520

1621
`$ pip install -e '.[dev]'`
1722

1823
---
24+
1925
### CLI Usage
26+
2027
```
2128
Usage: stac-check [OPTIONS] FILE
2229
@@ -34,14 +41,18 @@ Options:
3441
multiple times.
3542
--help Show this message and exit. Show this message and exit.
3643
```
44+
3745
---
46+
3847
### Docker
3948

4049
```
4150
$ make build
4251
$ make shell
4352
```
53+
4454
---
55+
4556
### Lint JSON
4657

4758
```
@@ -52,10 +63,13 @@ linter = Linter('<json_path>')
5263
for k, v in linter.create_best_practices_dict().items():
5364
print(k, ":", v)
5465
```
66+
5567
---
68+
5669
### CLI Examples
5770

58-
``` stac-check https://raw.githubusercontent.com/stac-utils/pystac/main/tests/data-files/examples/0.9.0/collection-spec/examples/landsat-collection.json --recursive ```
71+
`stac-check https://raw.githubusercontent.com/stac-utils/pystac/main/tests/data-files/examples/0.9.0/collection-spec/examples/landsat-collection.json --recursive`
72+
5973
```
6074
____ ____ __ ___ ___ _ _ ____ ___ __ _
6175
/ ___)(_ _)/ _\ / __)___ / __)/ )( \( __)/ __)( / )
@@ -64,7 +78,7 @@ for k, v in linter.create_best_practices_dict().items():
6478
6579
stac-check: STAC spec validation and linting tool
6680
67-
Please upgrade from version 0.9.0 to version 1.0.0!
81+
Please upgrade from version 0.9.0 to version 1.1.0!
6882
6983
Validator: stac-validator 3.5.0
7084
@@ -100,11 +114,11 @@ Error Message: Expecting value: line 1 column 1 (char 0)
100114
-------------------------
101115
```
102116

103-
``` stac-check sample_files/0.9.0/landsat8-sample.json```
117+
` stac-check sample_files/0.9.0/landsat8-sample.json`
104118

105119
<pre><b>stac-check: STAC spec validation and linting tool</b>
106120

107-
Please upgrade from version 0.9.0 to version 1.0.0!
121+
Please upgrade from version 0.9.0 to version 1.1.0!
108122

109123
Validator: stac-validator 3.5.0
110124

@@ -128,11 +142,12 @@ STAC Best Practices:
128142
This object has 4 links
129143
</pre>
130144

131-
``` stac-check sample_files/1.0.0/core-item.json --assets```
145+
` stac-check sample_files/1.0.0/core-item.json --assets`
146+
132147
<pre>
133148
<b>stac-check: STAC spec validation and linting tool</b>
134149

135-
Thanks for using STAC version 1.0.0!
150+
Please upgrade from version 1.0.0 to version 1.1.0!
136151

137152
Validator: stac-validator 3.5.0
138153

@@ -161,13 +176,12 @@ ASSET request errors:
161176
This object has 4 links
162177
</pre>
163178

179+
` stac-check sample_files/1.0.0/core-item-bad-links.json --links --assets`
164180

165-
166-
``` stac-check sample_files/1.0.0/core-item-bad-links.json --links --assets```
167181
<pre>
168182
<b>stac-check: STAC spec validation and linting tool</b>
169183

170-
Thanks for using STAC version 1.0.0!
184+
Please upgrade from version 1.0.0 to version 1.1.0!
171185

172186
Validator: stac-validator 3.5.0
173187

@@ -205,11 +219,12 @@ LINK request errors:
205219
This object has 4 links
206220
</pre>
207221

208-
``` stac-check sample_files/0.9.0/bad-item.json```
222+
` stac-check sample_files/0.9.0/bad-item.json`
223+
209224
<pre>
210225
<b>stac-check: STAC spec validation and linting tool</b>
211226

212-
Please upgrade from version 0.9.0 to version 1.0.0!
227+
Please upgrade from version 0.9.0 to version 1.1.0!
213228

214229
Validator: stac-validator 3.5.0
215230

@@ -229,11 +244,12 @@ Validation error message:
229244
This object has 5 links
230245
</pre>
231246

232-
``` stac-check https://stac-catalog.eu/collections/sentinel-s2-l2a/items/item1 --assets --no-assets-urls --header x-api-key $MY_API_KEY --header foo bar```
247+
` stac-check https://stac-catalog.eu/collections/sentinel-s2-l2a/items/item1 --assets --no-assets-urls --header x-api-key $MY_API_KEY --header foo bar`
248+
233249
<pre>
234250
<b>stac-check: STAC spec validation and linting tool</b>
235251

236-
Thanks for using STAC version 1.0.0!
252+
Please upgrade from version 1.0.0 to version 1.1.0!
237253

238254
Validator: stac-validator 3.5.0
239255

@@ -252,6 +268,9 @@ No ASSET format errors!
252268

253269
This object has 4 links
254270
</pre>
271+
255272
---
273+
256274
### Create local docs in the /docs folder
275+
257276
`$ pdoc --output-dir pdoc ./stac_check`

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
project = "stac-check"
1212
author = "Jonathan Healy"
13-
release = "1.3.1"
13+
release = "1.5.0"
1414

1515

1616
# -- General configuration ---------------------------------------------------

docs/index.rst

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,14 @@ CLI Usage
4141
-l, --links Validate links for format and response.
4242
-a, --assets Validate assets for format and response.
4343
-m, --max-depth INTEGER Maximum depth to traverse when recursing. Omit this
44-
argument to get full recursion. Ignored if
45-
`recursive == False`.
44+
argument to get full recursion. Ignored if
45+
`recursive == False`.
4646
-r, --recursive Recursively validate all related stac objects.
47-
--help Show this message and exit.
47+
--no-assets-urls Disables the opening of href links when validating assets
48+
(enabled by default).
49+
--header KEY VALUE HTTP header to include in the requests. Can be used
50+
multiple times.
51+
--help Show this message and exit. Show this message and exit.
4852
4953
Examples
5054
~~~~~~~~
@@ -91,7 +95,7 @@ STAC Versions supported
9195
9296
``stac-check`` supports the following STAC versions:
9397
94-
``[0.8.0, 0.8.1, 0.9.0, 1.0.0-beta.1, 1.0.0-beta.2, 1.0.0-rc.1, 1.0.0-rc.2, 1.0.0-rc.3, 1.0.0-rc.4, 1.0.0]``
98+
``[0.8.0, 0.8.1, 0.9.0, 1.0.0-beta.1, 1.0.0-beta.2, 1.0.0-rc.1, 1.0.0-rc.2, 1.0.0-rc.3, 1.0.0-rc.4, 1.0.0, 1.1.0]``
9599
96100
.. toctree::
97101
:maxdepth: 1

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
from setuptools import find_packages, setup
55

6-
__version__ = "1.4.0"
6+
__version__ = "1.5.0"
77

88
with open("README.md", "r") as fh:
99
long_description = fh.read()

stac_check/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def intro_message(linter: Linter) -> None:
8080

8181
click.secho()
8282

83-
if linter.version == "1.0.0":
83+
if linter.version == "1.1.0":
8484
click.secho(linter.set_update_message(), fg="green")
8585
else:
8686
click.secho(linter.set_update_message(), fg="red")

stac_check/lint.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -322,10 +322,10 @@ def set_update_message(self) -> str:
322322
Returns:
323323
A string containing a message for users to update their STAC version.
324324
"""
325-
if self.version != "1.0.0":
326-
return f"Please upgrade from version {self.version} to version 1.0.0!"
325+
if self.version != "1.1.0":
326+
return f"Please upgrade from version {self.version} to version 1.1.0!"
327327
else:
328-
return "Thanks for using STAC version 1.0.0!"
328+
return "Thanks for using STAC version 1.1.0!"
329329

330330
def check_links_assets(
331331
self, num_links: int, url_type: str, format_type: str

0 commit comments

Comments
 (0)