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: README.md
+55Lines changed: 55 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)
@@ -88,6 +89,60 @@ Options:
88
89
--help Show this message and exit.
89
90
```
90
91
92
+
### Configuration
93
+
94
+
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.
95
+
96
+
The configuration file has two main sections:
97
+
98
+
1.**linting**: Controls which best practices checks are enabled
99
+
2.**settings**: Configures thresholds for certain checks
100
+
101
+
Here's an example of the configuration options:
102
+
103
+
```yaml
104
+
linting:
105
+
# Identifiers should consist of only lowercase characters, numbers, '_', and '-'
106
+
searchable_identifiers: true
107
+
# Item name should not contain ':' or '/'
108
+
percent_encoded: true
109
+
# Item file names should match their ids
110
+
item_id_file_name: true
111
+
# Collections and catalogs should be named collection.json and catalog.json
112
+
catalog_id_file_name: true
113
+
# A STAC collection should contain a summaries field
114
+
check_summaries: true
115
+
# Datetime fields should not be set to null
116
+
null_datetime: true
117
+
# Check unlocated items to make sure bbox field is not set
118
+
check_unlocated: true
119
+
# Check if bbox matches the bounds of the geometry
120
+
check_bbox_geometry_match: true
121
+
# Check to see if there are too many links
122
+
bloated_links: true
123
+
# Check for bloated metadata in properties
124
+
bloated_metadata: true
125
+
# Ensure thumbnail is a small file size ["png", "jpeg", "jpg", "webp"]
126
+
check_thumbnail: true
127
+
# Ensure that links in catalogs and collections include a title field
128
+
links_title: true
129
+
# Ensure that links in catalogs and collections include self link
130
+
links_self: true
131
+
132
+
settings:
133
+
# Number of links before the bloated links warning is shown
134
+
max_links: 20
135
+
# Number of properties before the bloated metadata warning is shown
136
+
max_properties: 20
137
+
```
138
+
139
+
To use a custom configuration file, set the `STAC_CHECK_CONFIG` environment variable to the path of your configuration file:
0 commit comments