Skip to main content

Linting and validation tool for STAC assets

Project description

stac-check

Linting and validation tool for STAC assets

This project is a work in progress. The intent is to provide a validation tool that also follows the official STAC Best Practices document: https://github.com/radiantearth/stac-spec/blob/master/best-practices.md

pip install -e .

stac_check https://raw.githubusercontent.com/stac-utils/pystac/main/tests/data-files/examples/0.9.0/collection-spec/examples/landsat-collection.json --recursive

 ____  ____  __    ___       ___  _  _  ____  ___  __ _ 
/ ___)(_  _)/ _\  / __)___  / __)/ )( \(  __)/ __)(  / )
\___ \  )( /    \( (__(___)( (__ ) __ ( ) _)( (__  )  ( 
(____/ (__)\_/\_/ \___)     \___)\_)(_/(____)\___)(__\_)
    
stac-check: STAC spec validaton and linting tool

Please upgrade from version 0.9.0 to version 1.0.0!

Validator: pystac 1.1.0
    Recursive: Validate all assets in a collection or catalog

Valid COLLECTION: True

Schemas validated: 
    https://cdn.staclint.com/v0.9.0/collection.json

STAC Best Practices: 
    Object should be called 'collection.json' not 'landsat-collection.json'

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

    Links in catalogs and collections should always have a 'title' field


Recursive validation has failed!
Recursive validation error message: 
    Exception Could not read uri https://landsat-stac.s3.amazonaws.com/landsat-8-l1/paths/catalog.json

This object has 4 links

stac_check sample_files/0.9.0/landsat8-sample.json

stac-check: STAC spec validaton and linting tool

Please upgrade from version 0.9.0 to version 1.0.0!

Validator: stac-validator 2.3.0

Valid ITEM: True

Schemas validated: 
    https://cdn.staclint.com/v0.9.0/extension/eo.json
    https://cdn.staclint.com/v0.9.0/extension/view.json
    https://cdn.staclint.com/v0.9.0/item.json

STAC Best Practices: 
    Item name 'LC81530252014153LGN00' should only contain Searchable identifiers
    Identifiers should consist of only lowercase characters, numbers, '_', and '-'
    https://github.com/radiantearth/stac-spec/blob/master/best-practices.md#searchable-identifiers

    Item file names should match their ids: 'landsat8-sample' not equal to 'LC81530252014153LGN00

    A link to 'self' in links is strongly recommended


This object has 4 links

stac_check sample_files/1.0.0/core-item.json --assets

stac-check: STAC spec validaton and linting tool

Thanks for using STAC version 1.0.0!

Validator: stac-validator 2.3.0

Valid ITEM: True

Schemas validated: 
    https://schemas.stacspec.org/v1.0.0/item-spec/json-schema/item.json

STAC Best Practices: 
    Item name '20201211_223832_CS2' should only contain Searchable identifiers
    Identifiers should consist of only lowercase characters, numbers, '_', and '-'
    https://github.com/radiantearth/stac-spec/blob/master/best-practices.md#searchable-identifiers

    Item file names should match their ids: 'core-item' not equal to '20201211_223832_CS2

    Please avoid setting the datetime field to null, many clients search on this field

    A link to 'self' in links is strongly recommended


No ASSET format errors!

ASSET request errors: 
    http://cool-sat.com/catalog/20201211_223832_CS2/20201211_223832_CS2.EPH

This object has 4 links

stac_check sample_files/1.0.0/core-item-bad-links.json --links --assets

stac-check: STAC spec validaton and linting tool

Thanks for using STAC version 1.0.0!

Validator: stac-validator 2.3.0

Valid ITEM: True

Schemas validated: 
    https://schemas.stacspec.org/v1.0.0/item-spec/json-schema/item.json

STAC Best Practices: 
    Item name '20201211_223832_CS2' should only contain Searchable identifiers
    Identifiers should consist of only lowercase characters, numbers, '_', and '-'
    https://github.com/radiantearth/stac-spec/blob/master/best-practices.md#searchable-identifiers

    Item file names should match their ids: 'core-item-bad-links' not equal to '20201211_223832_CS2

    Please avoid setting the datetime field to null, many clients search on this field

    A link to 'self' in links is strongly recommended


ASSET format errors: 
    https:/storage.googleapis.com/open-cogs/stac-examples/20201211_223832_CS2.jpg

ASSET request errors: 
    https:/storage.googleapis.com/open-cogs/stac-examples/20201211_223832_CS2.jpg
    http://cool-sat.com/catalog/20201211_223832_CS2/20201211_223832_CS2.EPH

LINK format errors: 
    http:/remotdata.io/catalog/20201211_223832_CS2/index.html

LINK request errors: 
    http://catalog/collection.json
    http:/remotdata.io/catalog/20201211_223832_CS2/index.html

This object has 4 links

stac_check sample_files/0.9.0/bad-item.json

stac-check: STAC spec validaton and linting tool

Please upgrade from version 0.9.0 to version 1.0.0!

Validator: stac-validator 2.3.0

Valid : False

Schemas validated: 
    https://cdn.staclint.com/v0.9.0/item.json

STAC Best Practices: 
    A link to 'self' in links is strongly recommended

Validation error type: 
    ValidationError
Validation error message: 
    'id' is a required property of the root of the STAC object

This object has 5 links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stac_check-1.0.0.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

stac_check-1.0.0-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file stac_check-1.0.0.tar.gz.

File metadata

  • Download URL: stac_check-1.0.0.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for stac_check-1.0.0.tar.gz
Algorithm Hash digest
SHA256 208e2a30ab97e909ad5bf0826f47c1a287480202e11f017d6c2bd619473a4a03
MD5 ba8f1c3caabbdb6b2dd00a538ce5c5fc
BLAKE2b-256 6d775d9340b698e4f7ea83e33ee2699c44dc619ec620d6bfaf8357f3b266a57d

See more details on using hashes here.

File details

Details for the file stac_check-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: stac_check-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for stac_check-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2e7b45089181edcbfb714ecd796a78500141f36aecf3a47f7718d474b9c5fbfe
MD5 06d93810e3a88e0d90a38385701590c0
BLAKE2b-256 04e72b4fb45f17d05015528723b0580832ad2da55a89000cf900a070526c5d97

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page