Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
226 changes: 226 additions & 0 deletions tests/test_validate_item_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -661,3 +661,229 @@ def test_validate_item_collection_remote_pages():
"validation_method": "default",
},
]


def test_validate_item_collection_remote_pages_1_v110():
stac_file = "https://stac.dataspace.copernicus.eu/v1/collections/sentinel-3-olci-2-wfr-nrt/items"
stac = stac_validator.StacValidate(stac_file, item_collection=True, pages=1)
stac.validate_item_collection()
assert stac.message == [
{
"asset_type": "ITEM",
"path": "https://stac.dataspace.copernicus.eu/v1/collections/sentinel-3-olci-2-wfr-nrt/items",
"schema": [
"https://cs-si.github.io/eopf-stac-extension/v1.2.0/schema.json",
"https://stac-extensions.github.io/alternate-assets/v1.2.0/schema.json",
"https://stac-extensions.github.io/authentication/v1.1.0/schema.json",
"https://stac-extensions.github.io/eo/v2.0.0/schema.json",
"https://stac-extensions.github.io/file/v2.1.0/schema.json",
"https://stac-extensions.github.io/processing/v1.2.0/schema.json",
"https://stac-extensions.github.io/product/v0.1.0/schema.json",
"https://stac-extensions.github.io/projection/v2.0.0/schema.json",
"https://stac-extensions.github.io/sat/v1.1.0/schema.json",
"https://stac-extensions.github.io/storage/v2.0.0/schema.json",
"https://stac-extensions.github.io/timestamps/v1.1.0/schema.json",
"https://schemas.stacspec.org/v1.1.0/item-spec/json-schema/item.json",
],
"valid_stac": True,
"validation_method": "default",
"version": "1.1.0",
},
{
"asset_type": "ITEM",
"path": "https://stac.dataspace.copernicus.eu/v1/collections/sentinel-3-olci-2-wfr-nrt/items",
"schema": [
"https://cs-si.github.io/eopf-stac-extension/v1.2.0/schema.json",
"https://stac-extensions.github.io/alternate-assets/v1.2.0/schema.json",
"https://stac-extensions.github.io/authentication/v1.1.0/schema.json",
"https://stac-extensions.github.io/eo/v2.0.0/schema.json",
"https://stac-extensions.github.io/file/v2.1.0/schema.json",
"https://stac-extensions.github.io/processing/v1.2.0/schema.json",
"https://stac-extensions.github.io/product/v0.1.0/schema.json",
"https://stac-extensions.github.io/projection/v2.0.0/schema.json",
"https://stac-extensions.github.io/sat/v1.1.0/schema.json",
"https://stac-extensions.github.io/storage/v2.0.0/schema.json",
"https://stac-extensions.github.io/timestamps/v1.1.0/schema.json",
"https://schemas.stacspec.org/v1.1.0/item-spec/json-schema/item.json",
],
"valid_stac": True,
"validation_method": "default",
"version": "1.1.0",
},
{
"asset_type": "ITEM",
"path": "https://stac.dataspace.copernicus.eu/v1/collections/sentinel-3-olci-2-wfr-nrt/items",
"schema": [
"https://cs-si.github.io/eopf-stac-extension/v1.2.0/schema.json",
"https://stac-extensions.github.io/alternate-assets/v1.2.0/schema.json",
"https://stac-extensions.github.io/authentication/v1.1.0/schema.json",
"https://stac-extensions.github.io/eo/v2.0.0/schema.json",
"https://stac-extensions.github.io/file/v2.1.0/schema.json",
"https://stac-extensions.github.io/processing/v1.2.0/schema.json",
"https://stac-extensions.github.io/product/v0.1.0/schema.json",
"https://stac-extensions.github.io/projection/v2.0.0/schema.json",
"https://stac-extensions.github.io/sat/v1.1.0/schema.json",
"https://stac-extensions.github.io/storage/v2.0.0/schema.json",
"https://stac-extensions.github.io/timestamps/v1.1.0/schema.json",
"https://schemas.stacspec.org/v1.1.0/item-spec/json-schema/item.json",
],
"valid_stac": True,
"validation_method": "default",
"version": "1.1.0",
},
{
"asset_type": "ITEM",
"path": "https://stac.dataspace.copernicus.eu/v1/collections/sentinel-3-olci-2-wfr-nrt/items",
"schema": [
"https://cs-si.github.io/eopf-stac-extension/v1.2.0/schema.json",
"https://stac-extensions.github.io/alternate-assets/v1.2.0/schema.json",
"https://stac-extensions.github.io/authentication/v1.1.0/schema.json",
"https://stac-extensions.github.io/eo/v2.0.0/schema.json",
"https://stac-extensions.github.io/file/v2.1.0/schema.json",
"https://stac-extensions.github.io/processing/v1.2.0/schema.json",
"https://stac-extensions.github.io/product/v0.1.0/schema.json",
"https://stac-extensions.github.io/projection/v2.0.0/schema.json",
"https://stac-extensions.github.io/sat/v1.1.0/schema.json",
"https://stac-extensions.github.io/storage/v2.0.0/schema.json",
"https://stac-extensions.github.io/timestamps/v1.1.0/schema.json",
"https://schemas.stacspec.org/v1.1.0/item-spec/json-schema/item.json",
],
"valid_stac": True,
"validation_method": "default",
"version": "1.1.0",
},
{
"asset_type": "ITEM",
"path": "https://stac.dataspace.copernicus.eu/v1/collections/sentinel-3-olci-2-wfr-nrt/items",
"schema": [
"https://cs-si.github.io/eopf-stac-extension/v1.2.0/schema.json",
"https://stac-extensions.github.io/alternate-assets/v1.2.0/schema.json",
"https://stac-extensions.github.io/authentication/v1.1.0/schema.json",
"https://stac-extensions.github.io/eo/v2.0.0/schema.json",
"https://stac-extensions.github.io/file/v2.1.0/schema.json",
"https://stac-extensions.github.io/processing/v1.2.0/schema.json",
"https://stac-extensions.github.io/product/v0.1.0/schema.json",
"https://stac-extensions.github.io/projection/v2.0.0/schema.json",
"https://stac-extensions.github.io/sat/v1.1.0/schema.json",
"https://stac-extensions.github.io/storage/v2.0.0/schema.json",
"https://stac-extensions.github.io/timestamps/v1.1.0/schema.json",
"https://schemas.stacspec.org/v1.1.0/item-spec/json-schema/item.json",
],
"valid_stac": True,
"validation_method": "default",
"version": "1.1.0",
},
{
"asset_type": "ITEM",
"path": "https://stac.dataspace.copernicus.eu/v1/collections/sentinel-3-olci-2-wfr-nrt/items",
"schema": [
"https://cs-si.github.io/eopf-stac-extension/v1.2.0/schema.json",
"https://stac-extensions.github.io/alternate-assets/v1.2.0/schema.json",
"https://stac-extensions.github.io/authentication/v1.1.0/schema.json",
"https://stac-extensions.github.io/eo/v2.0.0/schema.json",
"https://stac-extensions.github.io/file/v2.1.0/schema.json",
"https://stac-extensions.github.io/processing/v1.2.0/schema.json",
"https://stac-extensions.github.io/product/v0.1.0/schema.json",
"https://stac-extensions.github.io/projection/v2.0.0/schema.json",
"https://stac-extensions.github.io/sat/v1.1.0/schema.json",
"https://stac-extensions.github.io/storage/v2.0.0/schema.json",
"https://stac-extensions.github.io/timestamps/v1.1.0/schema.json",
"https://schemas.stacspec.org/v1.1.0/item-spec/json-schema/item.json",
],
"valid_stac": True,
"validation_method": "default",
"version": "1.1.0",
},
{
"asset_type": "ITEM",
"path": "https://stac.dataspace.copernicus.eu/v1/collections/sentinel-3-olci-2-wfr-nrt/items",
"schema": [
"https://cs-si.github.io/eopf-stac-extension/v1.2.0/schema.json",
"https://stac-extensions.github.io/alternate-assets/v1.2.0/schema.json",
"https://stac-extensions.github.io/authentication/v1.1.0/schema.json",
"https://stac-extensions.github.io/eo/v2.0.0/schema.json",
"https://stac-extensions.github.io/file/v2.1.0/schema.json",
"https://stac-extensions.github.io/processing/v1.2.0/schema.json",
"https://stac-extensions.github.io/product/v0.1.0/schema.json",
"https://stac-extensions.github.io/projection/v2.0.0/schema.json",
"https://stac-extensions.github.io/sat/v1.1.0/schema.json",
"https://stac-extensions.github.io/storage/v2.0.0/schema.json",
"https://stac-extensions.github.io/timestamps/v1.1.0/schema.json",
"https://schemas.stacspec.org/v1.1.0/item-spec/json-schema/item.json",
],
"valid_stac": True,
"validation_method": "default",
"version": "1.1.0",
},
{
"asset_type": "ITEM",
"path": "https://stac.dataspace.copernicus.eu/v1/collections/sentinel-3-olci-2-wfr-nrt/items",
"schema": [
"https://cs-si.github.io/eopf-stac-extension/v1.2.0/schema.json",
"https://stac-extensions.github.io/alternate-assets/v1.2.0/schema.json",
"https://stac-extensions.github.io/authentication/v1.1.0/schema.json",
"https://stac-extensions.github.io/eo/v2.0.0/schema.json",
"https://stac-extensions.github.io/file/v2.1.0/schema.json",
"https://stac-extensions.github.io/processing/v1.2.0/schema.json",
"https://stac-extensions.github.io/product/v0.1.0/schema.json",
"https://stac-extensions.github.io/projection/v2.0.0/schema.json",
"https://stac-extensions.github.io/sat/v1.1.0/schema.json",
"https://stac-extensions.github.io/storage/v2.0.0/schema.json",
"https://stac-extensions.github.io/timestamps/v1.1.0/schema.json",
"https://schemas.stacspec.org/v1.1.0/item-spec/json-schema/item.json",
],
"valid_stac": True,
"validation_method": "default",
"version": "1.1.0",
},
{
"asset_type": "ITEM",
"path": "https://stac.dataspace.copernicus.eu/v1/collections/sentinel-3-olci-2-wfr-nrt/items",
"schema": [
"https://cs-si.github.io/eopf-stac-extension/v1.2.0/schema.json",
"https://stac-extensions.github.io/alternate-assets/v1.2.0/schema.json",
"https://stac-extensions.github.io/authentication/v1.1.0/schema.json",
"https://stac-extensions.github.io/eo/v2.0.0/schema.json",
"https://stac-extensions.github.io/file/v2.1.0/schema.json",
"https://stac-extensions.github.io/processing/v1.2.0/schema.json",
"https://stac-extensions.github.io/product/v0.1.0/schema.json",
"https://stac-extensions.github.io/projection/v2.0.0/schema.json",
"https://stac-extensions.github.io/sat/v1.1.0/schema.json",
"https://stac-extensions.github.io/storage/v2.0.0/schema.json",
"https://stac-extensions.github.io/timestamps/v1.1.0/schema.json",
"https://schemas.stacspec.org/v1.1.0/item-spec/json-schema/item.json",
],
"valid_stac": True,
"validation_method": "default",
"version": "1.1.0",
},
{
"asset_type": "ITEM",
"path": "https://stac.dataspace.copernicus.eu/v1/collections/sentinel-3-olci-2-wfr-nrt/items",
"schema": [
"https://cs-si.github.io/eopf-stac-extension/v1.2.0/schema.json",
"https://stac-extensions.github.io/alternate-assets/v1.2.0/schema.json",
"https://stac-extensions.github.io/authentication/v1.1.0/schema.json",
"https://stac-extensions.github.io/eo/v2.0.0/schema.json",
"https://stac-extensions.github.io/file/v2.1.0/schema.json",
"https://stac-extensions.github.io/processing/v1.2.0/schema.json",
"https://stac-extensions.github.io/product/v0.1.0/schema.json",
"https://stac-extensions.github.io/projection/v2.0.0/schema.json",
"https://stac-extensions.github.io/sat/v1.1.0/schema.json",
"https://stac-extensions.github.io/storage/v2.0.0/schema.json",
"https://stac-extensions.github.io/timestamps/v1.1.0/schema.json",
"https://schemas.stacspec.org/v1.1.0/item-spec/json-schema/item.json",
],
"valid_stac": True,
"validation_method": "default",
"version": "1.1.0",
},
]
assert len(stac.message) == 10


def test_validate_item_collection_remote_pages_3_v110():
stac_file = "https://stac.dataspace.copernicus.eu/v1/collections/sentinel-3-olci-2-wfr-nrt/items"
stac = stac_validator.StacValidate(stac_file, item_collection=True, pages=3)
stac.validate_item_collection()
assert len(stac.message) == 30