Repository navigation
docs(adr): propose 0014, one declared value per OGC service - #444
Closed
thodson-usgs wants to merge 1 commit into
Closed
thodson-usgs wants to merge 1 commit into
thodson-usgs wants to merge 1 commit into
Conversation
…value An adapter currently tells the shared OGC code about its service through six per-call arguments and through facts hard-coded in the core (Water Data's date parameters, its last_modified exemption, duration support, one open-start spelling). ADR 0003 forbids importing a service, not naming one, which is how DOI-USGS#443 broke open-start requests to NGWMN and STAC. Proposes OgcService(adapter, base_url, dialect) as the one value an adapter declares; the core implements the standard, each deviation is a dialect field defaulting to it, the core names nothing a declaration supplies, dialect fields are grouped by the code that reads them, collection facts stay per call, and services are data passed to functions rather than clients or subclasses. Adds the OGC service glossary entry and restates Dialect as a rule. Proposed ahead of the implementation, which follows in this PR.
Collaborator
Author
|
Superseded by #445. Its ADR 0014 generalizes this proposal: the name and default URL belong to a package-wide Service declaration, not an OGC-only value, and each API is an Endpoint with its own dialect. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Proposes ADR 0014, Describe each OGC service with one declared value, and the glossary entries it needs. Docs only, opened as a draft so the design is reviewed before it is implemented. Once the record is agreed, the implementation will be generated from it and added to this PR, which is where the record will be marked Accepted.
Why
Reviewing #442 and #443 turned up service-specific facts hard-coded in the shared OGC code: Water Data's date parameter names listed as "the OGC date parameters", a
last_modifiedexemption by name, duration pass-through for every service, and one open-start spelling (../), which the NGWMN and STAC firewalls reject with HTTP 403. ADR 0003 stopsogcfrom importing a service. It says nothing about naming one, and a string literal is not an import. #443's review missed the open-start regression because no rule covered it.What the record decides
OgcService(adapter, base_url, dialect), and that is everything the shared code knows about the service. Core entry points take it as their first argument.OgcServicedeclares.DateDialect(also used on its own by the STAC ratings catalog), request construction, result shaping.output_id,spatial) stay per call.Compliance: a fitness function over string literals in
ogc/, live monitors for each dialect field, and four recorded variances.Review questions
OgcServicefields and the split between per-service and per-collection facts right?base_urlas a function (resolved once per call) acceptable as the one non-data field?Sequencing
#442 and #443 merge first, unchanged. This branch is based on
main. After it is reviewed, I'll rebase it ontomainwith both merged and add the implementation. A prototype of the date-dialect part already exists onthodson-usgs:refactor/ogc-date-dialectand will be regenerated from the final record.Tested
The docs build has no warnings from the new record, and
tests/architecture_test.pypasses, including the ADR-reference check. The server behaviors in the record's Context table were observed live on 2026-10-11.