Skip to content

Commit

Permalink
Merge pull request #224 from stac-utils/clean-up
Browse files Browse the repository at this point in the history
Clean up, docstrings
  • Loading branch information
jonhealy1 authored Feb 20, 2023
2 parents 3f5ef40 + 428463e commit 15c7a38
Show file tree
Hide file tree
Showing 33 changed files with 3,441 additions and 204 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ repos:
hooks:
- id: flake8
- repo: https://github.com/timothycrosley/isort
rev: 5.8.0
rev: 5.11.5
hooks:
- id: isort
args: ["--profile", "black"]
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.

The format is (loosely) based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

### Added

- Core item and collection schemas to the project so that they don't have to be requested online https://github.com/stac-utils/stac-validator/pull/224
- Docstrings https://github.com/stac-utils/stac-validator/pull/224

## [v3.3.1] - 2022-12-16

### Fixed
Expand Down
124 changes: 124 additions & 0 deletions stac_validator/schemas/v0.8.0/catalog.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
{
"$id": "catalog.json#",
"$schema": "http://json-schema.org/draft-07/schema#",
"allOf": [
{
"$ref": "#/definitions/catalog"
}
],
"definitions": {
"catalog": {
"properties": {
"description": {
"title": "Description",
"type": "string"
},
"id": {
"title": "Identifier",
"type": "string"
},
"links": {
"items": {
"$ref": "#/definitions/link"
},
"title": "Links",
"type": "array"
},
"stac_extensions": {
"items": {
"type": "string"
},
"title": "STAC extensions",
"type": "array",
"uniqueItems": true
},
"stac_version": {
"const": "0.8.0",
"title": "STAC version",
"type": "string"
},
"summaries": {
"$ref": "#/definitions/summaries"
},
"title": {
"title": "Title",
"type": "string"
}
},
"required": [
"stac_version",
"id",
"description",
"links"
],
"title": "Catalog",
"type": "object"
},
"link": {
"properties": {
"href": {
"title": "Link reference",
"type": "string"
},
"rel": {
"title": "Link relation type",
"type": "string"
},
"title": {
"title": "Link title",
"type": "string"
},
"type": {
"title": "Link type",
"type": "string"
}
},
"required": [
"rel",
"href"
],
"type": "object"
},
"summaries": {
"additionalProperties": {
"oneOf": [
{
"properties": {
"max": {
"title": "Maximum value",
"type": [
"number",
"string"
]
},
"min": {
"title": "Minimum value",
"type": [
"number",
"string"
]
}
},
"required": [
"min",
"max"
],
"title": "Stats",
"type": "object"
},
{
"items": {
"description": "Any data type could occur."
},
"minItems": 1,
"title": "Set of values",
"type": "array"
}
]
},
"type": "object"
}
},
"description": "This object represents Catalogs in a SpatioTemporal Asset Catalog.",
"title": "STAC Catalog Specification"
}
162 changes: 162 additions & 0 deletions stac_validator/schemas/v0.8.0/collection.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
{
"$id": "collection.json#",
"$schema": "http://json-schema.org/draft-07/schema#",
"allOf": [
{
"$ref": "catalog.json"
},
{
"$ref": "#/definitions/collection"
}
],
"definitions": {
"collection": {
"description": "These are the fields specific to a STAC Collection. All other fields are inherited from STAC Catalog.",
"properties": {
"extent": {
"properties": {
"spatial": {
"properties": {
"bbox": {
"items": {
"items": {
"type": "number"
},
"maxItems": 6,
"minItems": 4,
"title": "Spatial extent",
"type": "array"
},
"minItems": 1,
"title": "Spatial extents",
"type": "array"
}
},
"required": [
"bbox"
],
"title": "Spatial extent object",
"type": "object"
},
"temporal": {
"properties": {
"interval": {
"items": {
"items": {
"format": "date-time",
"type": [
"string",
"null"
]
},
"maxItems": 2,
"minItems": 2,
"title": "Temporal extent",
"type": "array"
},
"minItems": 1,
"title": "Temporal extents",
"type": "array"
}
},
"required": [
"interval"
],
"title": "Temporal extent object",
"type": "object"
}
},
"required": [
"spatial",
"temporal"
],
"title": "Extents",
"type": "object"
},
"keywords": {
"items": {
"type": "string"
},
"title": "Keywords",
"type": "array"
},
"license": {
"title": "Collection License Name",
"type": "string"
},
"properties": {
"title": "Common properties",
"type": "object"
},
"providers": {
"items": {
"properties": {
"description": {
"title": "Provider description",
"type": "string"
},
"name": {
"title": "Organization name",
"type": "string"
},
"roles": {
"items": {
"enum": [
"producer",
"licensor",
"processor",
"host"
],
"type": "string"
},
"title": "Organization roles",
"type": "array"
},
"url": {
"format": "url",
"title": "Homepage",
"type": "string"
}
}
},
"type": "array"
},
"stac_extensions": {
"items": {
"anyOf": [
{
"format": "uri",
"title": "Reference to a JSON Schema",
"type": "string"
},
{
"enum": [
"asset",
"checksum",
"scientific"
],
"title": "Reference to a core extension",
"type": "string"
}
]
},
"title": "STAC extensions",
"type": "array",
"uniqueItems": true
},
"version": {
"title": "Collection Version",
"type": "string"
}
},
"required": [
"license",
"extent"
],
"title": "STAC Collection",
"type": "object"
}
},
"description": "This object represents Collections in a SpatioTemporal Asset Catalog.",
"title": "STAC Collection Specification"
}
Loading

0 comments on commit 15c7a38

Please sign in to comment.