Skip to content

Commit 9e35465

Browse files
authored
Merge pull request #114 from vprivat-ads/http_headers
Allow to provide HTTP headers, Configure whether to open URLs when validating assets
2 parents 1395e49 + a5dea87 commit 9e35465

File tree

13 files changed

+4397
-2820
lines changed

13 files changed

+4397
-2820
lines changed

CHANGELOG.md

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

77
## Unreleased
88

9+
### Added
10+
11+
- Allow to provide HTTP headers ([#114](https://github.com/stac-utils/stac-check/pull/114))
12+
- Configure whether to open URLs when validating assets ([#114](https://github.com/stac-utils/stac-check/pull/114))
13+
914
### Changed
1015

1116
- No longer use the deprecated pkg-resources package.

README.md

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ Options:
2828
argument to get full recursion. Ignored if
2929
`recursive == False`.
3030
-r, --recursive Recursively validate all related stac objects.
31+
--no-assets-urls Disables the opening of href links when validating assets
32+
(enabled by default).
33+
--header KEY VALUE HTTP header to include in the requests. Can be used
34+
multiple times.
3135
--help Show this message and exit. Show this message and exit.
3236
```
3337
---
@@ -62,7 +66,7 @@ stac-check: STAC spec validation and linting tool
6266
6367
Please upgrade from version 0.9.0 to version 1.0.0!
6468
65-
Validator: stac-validator 3.1.0
69+
Validator: stac-validator 3.5.0
6670
6771
6872
Recursive: Validate all assets in a collection or catalog
@@ -102,7 +106,7 @@ Error Message: Expecting value: line 1 column 1 (char 0)
102106

103107
Please upgrade from version 0.9.0 to version 1.0.0!
104108

105-
Validator: stac-validator 2.3.0
109+
Validator: stac-validator 3.5.0
106110

107111
Valid ITEM: True
108112

@@ -130,7 +134,7 @@ This object has 4 links
130134

131135
Thanks for using STAC version 1.0.0!
132136

133-
Validator: stac-validator 2.3.0
137+
Validator: stac-validator 3.5.0
134138

135139
Valid ITEM: True
136140

@@ -165,7 +169,7 @@ This object has 4 links
165169

166170
Thanks for using STAC version 1.0.0!
167171

168-
Validator: stac-validator 2.3.0
172+
Validator: stac-validator 3.5.0
169173

170174
Valid ITEM: True
171175

@@ -207,7 +211,7 @@ This object has 4 links
207211

208212
Please upgrade from version 0.9.0 to version 1.0.0!
209213

210-
Validator: stac-validator 2.3.0
214+
Validator: stac-validator 3.5.0
211215

212216
Valid : False
213217

@@ -224,6 +228,30 @@ Validation error message:
224228

225229
This object has 5 links
226230
</pre>
231+
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```
233+
<pre>
234+
<b>stac-check: STAC spec validation and linting tool</b>
235+
236+
Thanks for using STAC version 1.0.0!
237+
238+
Validator: stac-validator 3.5.0
239+
240+
Valid ITEM: True
241+
242+
Schemas validated:
243+
https://stac-extensions.github.io/timestamps/v1.1.0/schema.json
244+
https://schemas.stacspec.org/v1.0.0/item-spec/json-schema/item.json
245+
246+
STAC Best Practices:
247+
A STAC collection should contain a summaries field
248+
It is recommended to store information like eo:bands in summaries
249+
250+
251+
No ASSET format errors!
252+
253+
This object has 4 links
254+
</pre>
227255
---
228256
### Create local docs in the /docs folder
229-
`$ pdoc --html --output-dir pdoc stac_check --force`
257+
`$ pdoc --output-dir pdoc ./stac_check`

pdoc/index.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="refresh" content="0; url=./stac_check.html"/>
6+
</head>
7+
</html>

pdoc/search.js

Lines changed: 46 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pdoc/stac_check.html

Lines changed: 234 additions & 0 deletions
Large diffs are not rendered by default.

pdoc/stac_check/cli.html

Lines changed: 719 additions & 472 deletions
Large diffs are not rendered by default.

pdoc/stac_check/index.html

Lines changed: 0 additions & 65 deletions
This file was deleted.

0 commit comments

Comments
 (0)