Skip to content

Update Conformance logic #61

Closed
Closed
@matthewhanson

Description

@matthewhanson

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions