Skip to content

Add some Python types to the base provider #2040

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

C-Loftus
Copy link
Contributor

Overview

  • this PR adds Python types to the base provider
  • this makes it so users who are writing custom providers can more clearly understand and validate that their providers are correct
  • this should not change any runtime behavior

Related Issue / discussion

N/A

Additional information

Dependency policy (RFC2)

  • I have ensured that this PR meets RFC2 requirements

Updates to public demo

Contributions and licensing

(as per https://github.com/geopython/pygeoapi/blob/master/CONTRIBUTING.md#contributions-and-licensing)

  • I'd like to contribute [feature X|bugfix Y|docs|something else] to pygeoapi. I confirm that my contributions to pygeoapi will be compatible with the pygeoapi license guidelines at the time of contribution
  • I have already previously agreed to the pygeoapi Contributions and Licensing Guidelines

Comment on lines 49 to 59
FieldProperties = TypedDict(
"FieldProperties",
{
"type": Literal["string", "number", "integer", "boolean", "object", "array"],
"title": str,
"description": str,
"format": NotRequired[str],
"x-ogc-unit": NotRequired[str],
"x-ogc-role": NotRequired[str],
"enum": NotRequired[list[str]],
},
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@webb-ben does this seem like the correct interpretation of the queryables spec? https://docs.ogc.org/is/19-079r2/19-079r2.html#queryables

It appears there are some other properties related to uuid's / uri's but I have never actually seen these in practice. So as such not sure if they should be on the properties type.
image

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.

1 participant