From 51513e70cdb58243d6f47a1a6f43de1906f6af89 Mon Sep 17 00:00:00 2001 From: baloola Date: Thu, 20 Jun 2024 09:47:27 +0200 Subject: [PATCH] fix time test --- .github/ISSUE_TEMPLATE/data-request.yml | 239 ------------------------ stac/stac-generator/test/validator.py | 9 +- 2 files changed, 5 insertions(+), 243 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/data-request.yml diff --git a/.github/ISSUE_TEMPLATE/data-request.yml b/.github/ISSUE_TEMPLATE/data-request.yml deleted file mode 100644 index a9a1c213..00000000 --- a/.github/ISSUE_TEMPLATE/data-request.yml +++ /dev/null @@ -1,239 +0,0 @@ -name: Data Request -description: Request a data collection to be made available to FAIRiCUBE use cases. This includes requests to ingest new data, register exisiting data, or share already registered data. -title: "[Data Request]: " -labels: ["data-request"] -assignees: - - Mohinem - - Schpidi -body: - - type: markdown - attributes: - value: | - Please provide the information requested below. Mandatory elements are marked with `*`. - - type: markdown - attributes: - value: |- - # General - - type: input - id: id - attributes: - label: ID - description: Datacube or collection identifier - placeholder: |- - Example: Windspeed - validations: - required: true - - type: textarea - id: description - attributes: - label: Description - description: Brief, nontechnical explanation of the datacube - placeholder: A timeseries of atmospheric wind speed over Europe - validations: - required: true - - type: textarea - id: project-purpose - attributes: - label: Project purpose - description: Description of the reason for collection/generation in relation to the project/WP/Task objectives. Why and how is this data collection useful? For what use case was the data resource created? - placeholder: TBD - validations: - required: false - - type: dropdown - id: preferred-platform - attributes: - label: Target Platform - multiple: true - options: - - EOxHub - - Rasdaman - - Other - - type: dropdown - id: preferred-method - attributes: - label: Preferred Method - multiple: true - options: - - Assisted by the platform provider - - Manual by the data requester themselves - - type: markdown - attributes: - value: |- - # Datacube structure - - type: textarea - id: spatial-Axes - attributes: - label: Spatial axis - description: Enumerate Spatial axis of the datacube with their description - placeholder: |- - extent: [-180.0, -90.0, 180.0, 90.0], - spatial reference: WGS84 - validations: - required: false - - type: textarea - id: temporal-axis - attributes: - label: Time - description: Description of the time axes of the datacube - placeholder: |- - start date (ISO 8601): YYYY-MM-DD, - end data (ISO 8601): YYYY-MM-DD, - resolution (number year/month/day/...etc): 1 year, - - validations: - required: false - - type: textarea - id: extra-axes - attributes: - label: Other Axes - description: Enumerate other axes of the datacube and their description - placeholder: |- - plev: pressure level, extent([upper-Value, lower-value]or[null]):[null], uom: FL - - validations: - required: false - - type: textarea - id: cell-type - attributes: - label: Cell type - description: What does each pixel/voxel represent? Indicate meaning, data type, and unit of measure - placeholder: |- - wind_u: East/West wind component, data type: uint16, uom: W/m^2 - wind_v: North/South wind component, data type: uint16, uom: W/m^2 - validations: - required: false - - type: input - id: null-values - attributes: - label: Null values - description: Set of values which express "data unavailable", "data unknown", etc. - placeholder: 9999, NaN - validations: - required: false - - type: input - id: standards - attributes: - label: (Meta) data Standards - description: Standards data complies with - placeholder: OGC, CIS - validations: - required: false - - type: markdown - attributes: - value: |- - # Datacube access - - type: input - id: apis - attributes: - label: APIs - description: Access interfaces through which datacube can be accessed - placeholder: OGC, WMS, WMTS, WCS, WCPS, API Coverages, API Processes, etc. - validations: - required: false - - type: input - id: thumbnails - attributes: - label: Thumbnails - description: Access thumbnails media of the dataset. - placeholder: OGC, WMS, WMTS, etc. - validations: - required: false - - type: input - id: access-control - attributes: - label: Access control - description: Security measures and policies applied - placeholder: Login-protected, access only for FAIRiCUBE beneficiaries - validations: - required: false - - type: markdown - attributes: - value: |- - # Curator - - type: input - id: responsible - attributes: - label: Responsible - description: Beneficiary name, contact(s) - placeholder: , , , ORCID - validations: - required: false - - type: markdown - attributes: - value: |- - # Data origin - - type: input - id: data-source - attributes: - label: Data Source - description: Origin of the data (institution, etc.) including download URL / email as appropriate where the data can be found - placeholder: DWD - validations: - required: false - - type: input - id: data-preprocessing - attributes: - label: Data Preprocessing - description: Brief description of what processing data have undergone to get into the datacube - placeholder: Extracted from DWD-provided zip-compressed GRIB2 - validations: - required: false - - type: input - id: quality-control - attributes: - label: Quality Control - description: Describe any quality measures (standardised calibration, repeated samples or measurements, data capture, data entry validation, peer review of data, or representation with controlled vocabularies) - placeholder: None in particular, DWD data are used as is - validations: - required: false - - type: input - id: documents-publications - attributes: - label: Documents & publications - description: List related publications / public deliverables, state DOI and/or permanent location - placeholder: TBD - validations: - required: false - - type: markdown - attributes: - value: |- - # Legal - - type: input - id: license - attributes: - label: License - description: Such as Creative Commons CC BY 4.0 / Open Data Commons ODC-BY20 / Creative Commons BY NC 4.021 - placeholder: CC-BY-NC on RAS side, but constrained by DWD - validations: - required: false - - type: input - id: ownership - attributes: - label: Ownership - description: IPR, Ownership (including 3rd party, citizen participation) - placeholder: RAS/DWD - validations: - required: false - - type: input - id: personal-data - attributes: - label: Personal Data - description: |- - Confirm either: - No personal data is present in the dataset - Personal data is present, managed in compliance with GDPR - If (b), describe measures taken to secure, protect and/or pseudoanonymise / anonymise data. Notify the Project DPO if an issue arises. - placeholder: No personal data are captured in this datacube - validations: - required: false - - type: markdown - attributes: - value: |- - # Other - - type: textarea - id: additional-information - attributes: - label: Additional Information - description: Any additional information that might be relevant - validations: - required: false diff --git a/stac/stac-generator/test/validator.py b/stac/stac-generator/test/validator.py index 60c0df4d..4d09bb8f 100644 --- a/stac/stac-generator/test/validator.py +++ b/stac/stac-generator/test/validator.py @@ -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"