Skip to content

Do not share query_types between subclasses of BaseEDRProvider#2049

Merged
tomkralidis merged 3 commits intogeopython:masterfrom
webb-ben:fix-edr-subclass
Jun 29, 2025
Merged

Do not share query_types between subclasses of BaseEDRProvider#2049
tomkralidis merged 3 commits intogeopython:masterfrom
webb-ben:fix-edr-subclass

Conversation

@webb-ben
Copy link
Copy Markdown
Member

@webb-ben webb-ben commented Jun 25, 2025

Overview

This PR changes the way query types are registered within pygeoapi to automatically register queries. Furthermore this implementation leaves query_types as a class variable, but subclasses do not share the information from their parent class.

Related Issue / discussion

#2048

Additional information

Here is a link to the GitHub action run before webb-ben@1ed640e fixed the shared query types https://github.com/webb-ben/pygeoapi/actions/runs/15880865957/job/44780554060

I added a regression test to tests/test_base_provider.py, which might not be the appropriate place for BaseEDR provider tests. I also had to patch test_load_and_prepare_item_missing_geojson_parts to get the base provider test passing. This file is now included in the CI testing. Here is the failed run before the patch of the unrelated test: https://github.com/webb-ben/pygeoapi/actions/runs/15880766482/job/44780212119

This removes BaseEDRProvider.register so any external EDR plugins will need to updated remove the deprecated function.

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

webb-ben added 3 commits June 25, 2025 11:36
- Automatically register EDR query types
- Ensure subclasses of `BaseEDRProvider` does not share query_types between instances of its subclass
@webb-ben webb-ben requested a review from a team June 25, 2025 16:04
@webb-ben webb-ben added bug Something isn't working OGC API - Environmental Data Retrieval OGC API - Environmental Data Retrieval labels Jun 25, 2025
@webb-ben webb-ben changed the title Do not share query_types between subclasses BaseEDRProvider instances Do not share query_types between subclasses of BaseEDRProvider Jun 25, 2025
@tomkralidis tomkralidis added this to the 0.21.0 milestone Jun 29, 2025
@tomkralidis tomkralidis merged commit 53418d7 into geopython:master Jun 29, 2025
3 checks passed
@webb-ben webb-ben deleted the fix-edr-subclass branch June 30, 2025 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working OGC API - Environmental Data Retrieval OGC API - Environmental Data Retrieval

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants