Skip to content

Commit

Permalink
Merge branch 'main' into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
baloola committed Jun 20, 2024
2 parents ed1a4a0 + 51513e7 commit ed2645f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 243 deletions.
239 changes: 0 additions & 239 deletions .github/ISSUE_TEMPLATE/data-request.yml

This file was deleted.

9 changes: 5 additions & 4 deletions stac/stac-generator/test/validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,20 +73,21 @@ def validate_item(item: pystac.item.Item):
# Time (Begin/End)
assert "extent" in time.keys() or "values" in time.keys()
# Resolution of Time Axis (Interval)
if "values" in time.keys():
if "extent" in time.keys():
assert "step" in time.keys(), "No step in time dimensions"
assert isinstance(time["step"], str), "time's step must be a string"
# Unit of measure
assert isinstance(time["unit"], str), "time's unit must be a string"
# Unit of measure
assert "unit" in time.keys(), "No unit in time dimensions"
assert isinstance(time["unit"], str), "time's unit must be a string"


# Range Data validation
assert "raster:bands" in item.properties.keys() or "bands" in item.properties.keys()

#TODO figure out a way to validate edc items , the ones with "bands"

if "raster:bands" in item.properties.keys():
bands = item.properties["raster:bands"]
assert len(bands) > 0, "bands list must not be empty"
for band in bands:
# Range Data Type
assert "data_type" in band.keys(), "No data_type in band"
Expand Down

0 comments on commit ed2645f

Please sign in to comment.