Skip to content

Update Conformance logic #61

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

Closed
matthewhanson opened this issue Jun 8, 2021 · 0 comments
Closed

Update Conformance logic #61

matthewhanson opened this issue Jun 8, 2021 · 0 comments
Milestone

Comments

@matthewhanson
Copy link
Member

Combine Classes STACAPIObjectMixin and Conformance

The STACAPIObjectMixin is a class that takes in a Conformance class to determine conformance. Combine the logic into a single Conformance class that can be added to other classes, currently:

  • Client: Used to determine basic required conformance initially
  • Search: Used to determine conformance of search endpoints/parameters

Conformance is not currently used, and the code for handling non-conformance needs to be added/updated.

I see this working as follows:

  • you can always open any STAC catalog-like object with Client
  • Most (all?) functions added in the Client class (which inherits from PySTAC Catalog) should require a conformance check. If non-conformant a ConformanceError is thrown with details.
  • If there is no conformsTo array, then assume this is a static catalog. Client will functionally work as a PySTAC Catalog, but most (all?) functions should return a ConformanceErrror
  • There should be an override parameter, ignore_conformance to the Client.open() function
  • Conformance is also used to determine if certain parameters to the ItemSearch class are allowed. Thus, the ItemSearch class should be passed a ConformanceClass that can be used to check if specific query parameters are allowed. (e.g., if ItemSearch gets a field kwarg and the field conformance is not present, a ConformanceError should be thrown.
@matthewhanson matthewhanson added this to the 1.0.0 milestone Jun 8, 2021
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

No branches or pull requests

1 participant