You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,13 @@ The format is (loosely) based on [Keep a Changelog](http://keepachangelog.com/)
13
13
- Detects and reports cases where a bbox incorrectly "belts the globe" instead of properly crossing the antimeridian
14
14
- Provides clear error messages to help users fix incorrectly formatted bboxes
15
15
- Added sponsors and supporters section with logos ([#122](https://github.com/stac-utils/stac-check/pull/122))
16
+
- Added check to verify that bbox matches item's polygon geometry ([#123](https://github.com/stac-utils/stac-check/pull/123))
17
+
- Added configuration documentation to README ([#124](https://github.com/stac-utils/stac-check/pull/124))
18
+
- Added `--pydantic` option for validating STAC objects using stac-pydantic models, providing enhanced type checking and validation ([#126](https://github.com/stac-utils/stac-check/pull/126))
19
+
20
+
### Enhanced
21
+
22
+
- Improved bbox validation output to show detailed information about mismatches between bbox and geometry bounds, including which specific coordinates differ and by how much ([#126](https://github.com/stac-utils/stac-check/pull/126))
Copy file name to clipboardExpand all lines: README.md
+56Lines changed: 56 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,7 @@ The intent of this project is to provide a validation tool that also follows the
25
25
-[Docker](#docker)
26
26
-[Usage](#usage)
27
27
-[CLI Usage](#cli-usage)
28
+
-[Configuration](#configuration)
28
29
-[Python API Usage](#python-api-usage)
29
30
-[Examples](#examples)
30
31
-[Basic Validation](#basic-validation)
@@ -85,9 +86,64 @@ Options:
85
86
(enabled by default).
86
87
--header KEY VALUE HTTP header to include in the requests. Can be used
87
88
multiple times.
89
+
--pydantic Use stac-pydantic for enhanced validation with Pydantic models.
88
90
--help Show this message and exit.
89
91
```
90
92
93
+
### Configuration
94
+
95
+
stac-check uses a configuration file to control which validation checks are performed. By default, it uses the built-in configuration at `stac_check/stac-check.config.yml`. You can customize the validation behavior by creating your own configuration file.
96
+
97
+
The configuration file has two main sections:
98
+
99
+
1.**linting**: Controls which best practices checks are enabled
100
+
2.**settings**: Configures thresholds for certain checks
101
+
102
+
Here's an example of the configuration options:
103
+
104
+
```yaml
105
+
linting:
106
+
# Identifiers should consist of only lowercase characters, numbers, '_', and '-'
107
+
searchable_identifiers: true
108
+
# Item name should not contain ':' or '/'
109
+
percent_encoded: true
110
+
# Item file names should match their ids
111
+
item_id_file_name: true
112
+
# Collections and catalogs should be named collection.json and catalog.json
113
+
catalog_id_file_name: true
114
+
# A STAC collection should contain a summaries field
115
+
check_summaries: true
116
+
# Datetime fields should not be set to null
117
+
null_datetime: true
118
+
# Check unlocated items to make sure bbox field is not set
119
+
check_unlocated: true
120
+
# Check if bbox matches the bounds of the geometry
121
+
check_bbox_geometry_match: true
122
+
# Check to see if there are too many links
123
+
bloated_links: true
124
+
# Check for bloated metadata in properties
125
+
bloated_metadata: true
126
+
# Ensure thumbnail is a small file size ["png", "jpeg", "jpg", "webp"]
127
+
check_thumbnail: true
128
+
# Ensure that links in catalogs and collections include a title field
129
+
links_title: true
130
+
# Ensure that links in catalogs and collections include self link
131
+
links_self: true
132
+
133
+
settings:
134
+
# Number of links before the bloated links warning is shown
135
+
max_links: 20
136
+
# Number of properties before the bloated metadata warning is shown
137
+
max_properties: 20
138
+
```
139
+
140
+
To use a custom configuration file, set the `STAC_CHECK_CONFIG` environment variable to the path of your configuration file:
0 commit comments