Skip to content

Runtime validation cases#42

Merged
jonblower merged 5 commits intocovjson:mainfrom
murithigeo:exhaustive-validation
Mar 12, 2026
Merged

Runtime validation cases#42
jonblower merged 5 commits intocovjson:mainfrom
murithigeo:exhaustive-validation

Conversation

@murithigeo
Copy link
Copy Markdown
Contributor

@murithigeo murithigeo commented Mar 2, 2026

  1. Arguments: No need to specify that document is a URL via the source=url flag. Remember to use absolute URLs with scheme
  2. NdArray: axisNames,shape, tileShape contains valid lengths and arrangement. Does not check for edge tiles though. Ranges also reference existing parameters
  3. Validate that the dataType and axisNames from a loaded TileSet are the same as those of parent TiledNdArray
  4. categoryEncoding: If specified, then the member categories is expected in the observedProperty
  5. TiledNdArray: Validate that urlTemplate is valid (variables are of tiled axisNames).
  6. media type: If an URL is passed, then expect the response to have the correct content-type header. If it is application/prs.coverage+json, warn of the deprecation, else warn of the incorrect header value
  7. categoryEncoding: If specified, values of categories are unique. Because of the approach, expect that values of ranges are integers
  8. categoryEncoding: If specified, then the values of the NdArray's should only include those in categoryEncoding
  9. Add tests to validate the runtime_validator
  10. Add sanity checks for the runtime_validator
  11. ParameterGroup: elements of members reference existing parameters

This MR partially addresses #opengeospatial/CoverageJSON#179
This validation approach fetches all variations of a TiledNdArray and recursively tests resulting ranges thus increasing validation time

@murithigeo murithigeo marked this pull request as draft March 3, 2026 09:29
…ape`, `shape` and `tileShape`.

tileSet: Validate only tiled variables appear in the urlTemplate
parameterGroup: Add validation, in covcollection and coverage,
fix cases where ValueError is raised due to incorrect check, catEncoding was inproperly validated
Run validator inside runtime_validator instead of main
@murithigeo murithigeo marked this pull request as ready for review March 3, 2026 12:54
@jonblower jonblower requested review from jonblower March 12, 2026 11:26
Copy link
Copy Markdown
Member

@jonblower jonblower left a comment

Choose a reason for hiding this comment

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

Must admit that I haven't reviewed the code in detail but it looks reasonable and the tests behave as expected. Many thanks for this important contribution!

@jonblower jonblower merged commit b28a86e into covjson:main Mar 12, 2026
1 check passed
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