Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/ add symbol model properties #14

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Roconda
Copy link
Collaborator

@Roconda Roconda commented Nov 4, 2024

Added title and description fields.

The value and type fields are required as mentioned in the OGC specification requirements section A.25H. https://docs.ogc.org/is/19-086r6/19-086r6.html#req_edr_rc-parameters

A parameter object MAY have a member with the name "unit" where the value is an object which SHALL have either or both the members "label" or/and "symbol", and which MAY have the member "id". If given, the value of "symbol" SHALL either be a string of the symbolic notation of the unit, or an object with the members "value" and "type" where "value" is the symbolic unit notation and "type" references the unit serialization scheme that is used. "type" SHALL HAVE the value "http://www.opengis.net/def/uom/UCUM/" if UCUM is used, or a custom value as recommended in section "Extensions". If given, the value of "label" SHALL be an i18n object of the name of the unit and SHOULD be short. If given, the value of "id" SHALL be a string and SHOULD be a common identifier. It is RECOMMENDED to reference a unit serialization scheme to allow automatic unit conversion.

Copy link

codecov bot commented Nov 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.04%. Comparing base (ca0ab14) to head (d4b689f).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #14      +/-   ##
==========================================
+ Coverage   98.02%   98.04%   +0.01%     
==========================================
  Files          10       10              
  Lines         203      205       +2     
==========================================
+ Hits          199      201       +2     
  Misses          4        4              
Flag Coverage Δ
unittests 98.04% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines +12 to +13
title: Optional[str] = None
description: Optional[str] = None
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The link you gave points to Annex A (informative), and shows just having value and type is correct:
https://docs.ogc.org/is/19-086r6/19-086r6.html#req_edr_rc-parameters

The table you base you changes on is inconsistent with this (also C.13 is different):
https://docs.ogc.org/is/19-086r6/19-086r6.html#_5378d779-6a38-4607-9051-6f12c3d3107b

The schema also says just value and type is correct:
https://schemas.opengis.net/ogcapi/edr/1.1/openapi/schemas/collections/units.yaml

CovJSON spec also says what we currently have is correct:
https://docs.ogc.org/cs/21-069r2/21-069r2.html

So the spec is inconsistent. So far the conclusion has been that the schema is leading.

We should make an issue on the OGC EDR repo to clarify what the intention was, something like this:
opengeospatial/ogcapi-environmental-data-retrieval#582

Note that the extra=allow means you can already add those fields in your implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants