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

enhance support for limits (RFC5) (#1856) #1892

Merged
merged 5 commits into from
Jan 23, 2025
Merged

enhance support for limits (RFC5) (#1856) #1892

merged 5 commits into from
Jan 23, 2025

Conversation

tomkralidis
Copy link
Member

@tomkralidis tomkralidis commented Dec 31, 2024

Overview

This PR implements RFC5 to provide enhanced limit handling implementation in support of better definition and control on data query limiting.

Related Issue / discussion

#1856

Additional information

This PR needs PSC approval of RFC5 in order to be merged.

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

@tomkralidis tomkralidis added enhancement New feature or request OGC API - Features OGC API - Features OGC API - Records OGC API - Records labels Dec 31, 2024
@tomkralidis tomkralidis added this to the 0.20.0 milestone Dec 31, 2024
@tomkralidis tomkralidis changed the title [WIP] enhance support for limits (RFC5) (#1856) enhance support for limits (RFC5) (#1856) Jan 6, 2025
Copy link
Contributor

@totycro totycro left a comment

Choose a reason for hiding this comment

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

The implementation looks good to me!

With this change, the old limit setting is now ignored, so if anybody updates to the new version without changing the config, then the default limits apply again. We could detect this old setting and print an informational message .

@pvgenuchten
Copy link
Contributor

very nice Tom, can we also port it to pycsw?

Copy link
Member

@webb-ben webb-ben left a comment

Choose a reason for hiding this comment

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

+1

@tomkralidis tomkralidis force-pushed the limits branch 2 times, most recently from 063a4ed to 0eec84f Compare January 14, 2025 10:01
@doublebyte1
Copy link
Contributor

I think this is a really nice improvement! 👍🏽

Should the pygeoapi example configuration file also be changed?

limit: 10

I would suggest changing it to a different number on default and max:

limits:
    defaultitems: 10  # applies to vector data
    maxitems: 100  # applies to vector data
    maxdistance: [x, y]  # applies to all datasets
    units: m  # as per UCUM https://ucum.org/ucum#section-Tables-of-Terminal-Symbols
    on_exceed: error  # one of error, throttle

@tomkralidis tomkralidis force-pushed the limits branch 2 times, most recently from 2ea0505 to 1f758b5 Compare January 15, 2025 03:39
@tomkralidis tomkralidis added OGC API - Processes OGC API - Processes OGC API - Environmental Data Retrieval OGC API - Environmental Data Retrieval labels Jan 23, 2025
@tomkralidis tomkralidis merged commit f93246e into master Jan 23, 2025
7 checks passed
@tomkralidis tomkralidis deleted the limits branch January 23, 2025 14:55
webb-ben added a commit to geopython/pygeoapi-examples that referenced this pull request Jan 23, 2025
Update to align with RFC5 as implemented in geopython/pygeoapi#1892
tomkralidis pushed a commit to geopython/pygeoapi-examples that referenced this pull request Jan 23, 2025
Update to align with RFC5 as implemented in geopython/pygeoapi#1892
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request OGC API - Environmental Data Retrieval OGC API - Environmental Data Retrieval OGC API - Features OGC API - Features OGC API - Processes OGC API - Processes OGC API - Records OGC API - Records
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants