Skip to content

Commit

Permalink
Merge pull request #114 from vprivat-ads/http_headers
Browse files Browse the repository at this point in the history
Allow to provide HTTP headers, Configure whether to open URLs when validating assets
  • Loading branch information
jonhealy1 authored Jan 16, 2025
2 parents 1395e49 + a5dea87 commit 9e35465
Show file tree
Hide file tree
Showing 13 changed files with 4,397 additions and 2,820 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ The format is (loosely) based on [Keep a Changelog](http://keepachangelog.com/)

## Unreleased

### Added

- Allow to provide HTTP headers ([#114](https://github.com/stac-utils/stac-check/pull/114))
- Configure whether to open URLs when validating assets ([#114](https://github.com/stac-utils/stac-check/pull/114))

### Changed

- No longer use the deprecated pkg-resources package.
Expand Down
40 changes: 34 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ Options:
argument to get full recursion. Ignored if
`recursive == False`.
-r, --recursive Recursively validate all related stac objects.
--no-assets-urls Disables the opening of href links when validating assets
(enabled by default).
--header KEY VALUE HTTP header to include in the requests. Can be used
multiple times.
--help Show this message and exit. Show this message and exit.
```
---
Expand Down Expand Up @@ -62,7 +66,7 @@ stac-check: STAC spec validation and linting tool
Please upgrade from version 0.9.0 to version 1.0.0!
Validator: stac-validator 3.1.0
Validator: stac-validator 3.5.0
Recursive: Validate all assets in a collection or catalog
Expand Down Expand Up @@ -102,7 +106,7 @@ Error Message: Expecting value: line 1 column 1 (char 0)

Please upgrade from version 0.9.0 to version 1.0.0!

Validator: stac-validator 2.3.0
Validator: stac-validator 3.5.0

Valid ITEM: True

Expand Down Expand Up @@ -130,7 +134,7 @@ This object has 4 links

Thanks for using STAC version 1.0.0!

Validator: stac-validator 2.3.0
Validator: stac-validator 3.5.0

Valid ITEM: True

Expand Down Expand Up @@ -165,7 +169,7 @@ This object has 4 links

Thanks for using STAC version 1.0.0!

Validator: stac-validator 2.3.0
Validator: stac-validator 3.5.0

Valid ITEM: True

Expand Down Expand Up @@ -207,7 +211,7 @@ This object has 4 links

Please upgrade from version 0.9.0 to version 1.0.0!

Validator: stac-validator 2.3.0
Validator: stac-validator 3.5.0

Valid : False

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

This object has 5 links
</pre>

``` 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```
<pre>
<b>stac-check: STAC spec validation and linting tool</b>

Thanks for using STAC version 1.0.0!

Validator: stac-validator 3.5.0

Valid ITEM: True

Schemas validated:
https://stac-extensions.github.io/timestamps/v1.1.0/schema.json
https://schemas.stacspec.org/v1.0.0/item-spec/json-schema/item.json

STAC Best Practices:
A STAC collection should contain a summaries field
It is recommended to store information like eo:bands in summaries


No ASSET format errors!

This object has 4 links
</pre>
---
### Create local docs in the /docs folder
`$ pdoc --html --output-dir pdoc stac_check --force`
`$ pdoc --output-dir pdoc ./stac_check`
7 changes: 7 additions & 0 deletions pdoc/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="refresh" content="0; url=./stac_check.html"/>
</head>
</html>
46 changes: 46 additions & 0 deletions pdoc/search.js

Large diffs are not rendered by default.

234 changes: 234 additions & 0 deletions pdoc/stac_check.html

Large diffs are not rendered by default.

1,191 changes: 719 additions & 472 deletions pdoc/stac_check/cli.html

Large diffs are not rendered by default.

65 changes: 0 additions & 65 deletions pdoc/stac_check/index.html

This file was deleted.

Loading

0 comments on commit 9e35465

Please sign in to comment.