oapi-profile-builder 2.4.0__tar.gz → 2.5.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (19) hide show
  1. {oapi_profile_builder-2.4.0/src/oapi_profile_builder.egg-info → oapi_profile_builder-2.5.0}/PKG-INFO +1 -1
  2. {oapi_profile_builder-2.4.0 → oapi_profile_builder-2.5.0}/pyproject.toml +1 -1
  3. {oapi_profile_builder-2.4.0 → oapi_profile_builder-2.5.0}/src/oapi_profile_builder/models.py +22 -9
  4. {oapi_profile_builder-2.4.0 → oapi_profile_builder-2.5.0/src/oapi_profile_builder.egg-info}/PKG-INFO +1 -1
  5. {oapi_profile_builder-2.4.0 → oapi_profile_builder-2.5.0}/LICENSE +0 -0
  6. {oapi_profile_builder-2.4.0 → oapi_profile_builder-2.5.0}/README.md +0 -0
  7. {oapi_profile_builder-2.4.0 → oapi_profile_builder-2.5.0}/setup.cfg +0 -0
  8. {oapi_profile_builder-2.4.0 → oapi_profile_builder-2.5.0}/src/oapi_profile_builder/__init__.py +0 -0
  9. {oapi_profile_builder-2.4.0 → oapi_profile_builder-2.5.0}/src/oapi_profile_builder/cite.py +0 -0
  10. {oapi_profile_builder-2.4.0 → oapi_profile_builder-2.5.0}/src/oapi_profile_builder/cite_features.py +0 -0
  11. {oapi_profile_builder-2.4.0 → oapi_profile_builder-2.5.0}/src/oapi_profile_builder/cli.py +0 -0
  12. {oapi_profile_builder-2.4.0 → oapi_profile_builder-2.5.0}/src/oapi_profile_builder/compile.py +0 -0
  13. {oapi_profile_builder-2.4.0 → oapi_profile_builder-2.5.0}/src/oapi_profile_builder/generate.py +0 -0
  14. {oapi_profile_builder-2.4.0 → oapi_profile_builder-2.5.0}/src/oapi_profile_builder/server_validation.py +0 -0
  15. {oapi_profile_builder-2.4.0 → oapi_profile_builder-2.5.0}/src/oapi_profile_builder.egg-info/SOURCES.txt +0 -0
  16. {oapi_profile_builder-2.4.0 → oapi_profile_builder-2.5.0}/src/oapi_profile_builder.egg-info/dependency_links.txt +0 -0
  17. {oapi_profile_builder-2.4.0 → oapi_profile_builder-2.5.0}/src/oapi_profile_builder.egg-info/entry_points.txt +0 -0
  18. {oapi_profile_builder-2.4.0 → oapi_profile_builder-2.5.0}/src/oapi_profile_builder.egg-info/requires.txt +0 -0
  19. {oapi_profile_builder-2.4.0 → oapi_profile_builder-2.5.0}/src/oapi_profile_builder.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: oapi-profile-builder
3
- Version: 2.4.0
3
+ Version: 2.5.0
4
4
  Summary: Authoritative tooling for creating OGC API Service Profiles (EDR, Features)
5
5
  Author-email: Shane Mill <shane.mill@noaa.gov>
6
6
  License: Apache License
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "oapi-profile-builder"
7
- version = "2.4.0"
7
+ version = "2.5.0"
8
8
  description = "Authoritative tooling for creating OGC API Service Profiles (EDR, Features)"
9
9
  readme = "README.md"
10
10
  license = { file = "LICENSE" }
@@ -60,6 +60,7 @@ from pydantic import AwareDatetime, BaseModel, Field, field_validator, model_val
60
60
  # ---------------------------------------------------------------------------
61
61
 
62
62
  from edr_pydantic.base_model import EdrBaseModel # noqa: E402 — after stdlib imports
63
+ from edr_pydantic.parameter import Parameters # noqa: E402
63
64
 
64
65
 
65
66
  class TemporalWithNullBounds(EdrBaseModel):
@@ -80,18 +81,32 @@ class ExtentWithNullBounds(EDRExtent):
80
81
 
81
82
  class Collection(EDRCollection):
82
83
  """
83
- EDR Collection with a null-aware temporal extent.
84
+ EDR Collection with a null-aware temporal extent and optional parameter_names.
84
85
 
85
- Identical to edr_pydantic.collections.Collection except that
86
- extent uses ExtentWithNullBounds so open-ended intervals like
87
- ["2020-01-01T00:00:00Z", null] are accepted.
86
+ Differences from edr_pydantic.collections.Collection:
88
87
 
89
- post_queries controls whether POST operations are generated for this
90
- collection's data query endpoints. None means inherit the profile-level
91
- allow_post_queries default. Set to True or False to override per-collection.
88
+ - extent uses ExtentWithNullBounds so open-ended intervals like
89
+ ["2020-01-01T00:00:00Z", null] are accepted (spec-compliant).
90
+
91
+ - parameter_names is Optional (default None). edr-pydantic marks it as
92
+ required, but OGC API - EDR Part 3 allows a profile to define the
93
+ *schema* for parameter objects via parameter_schema without mandating
94
+ any specific parameter names in the profile document itself.
95
+
96
+ - post_queries controls whether POST operations are generated for this
97
+ collection's data query endpoints. None means inherit the profile-level
98
+ allow_post_queries default. Set to True or False to override per-collection.
92
99
  """
93
100
 
94
101
  extent: Optional[ExtentWithNullBounds] = None # type: ignore[assignment]
102
+ parameter_names: Optional[Parameters] = Field( # type: ignore[assignment]
103
+ default=None,
104
+ description=(
105
+ "Map of parameter id → Parameter object. "
106
+ "Optional — omit when using parameter_schema to describe the structure "
107
+ "without mandating specific parameter names."
108
+ ),
109
+ )
95
110
  post_queries: Optional[bool] = Field(
96
111
  default=None,
97
112
  description=(
@@ -327,13 +342,11 @@ class ServiceProfile(BaseModel):
327
342
  if not coll.parameter_names:
328
343
  continue
329
344
  for param_name, param in coll.parameter_names.root.items():
330
- # Check if unit is specified
331
345
  if not hasattr(param, 'unit') or param.unit is None:
332
346
  raise ValueError(
333
347
  f"Parameter '{param_name}' in collection '{coll.id}' must specify unit "
334
348
  f"(required by OGC API - EDR Part 3 REQ_parameter-names)"
335
349
  )
336
- # Check if observedProperty is specified (already required by edr-pydantic)
337
350
  if not hasattr(param, 'observedProperty') or param.observedProperty is None:
338
351
  raise ValueError(
339
352
  f"Parameter '{param_name}' in collection '{coll.id}' must specify observedProperty"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: oapi-profile-builder
3
- Version: 2.4.0
3
+ Version: 2.5.0
4
4
  Summary: Authoritative tooling for creating OGC API Service Profiles (EDR, Features)
5
5
  Author-email: Shane Mill <shane.mill@noaa.gov>
6
6
  License: Apache License