Skip to content

Commit fd273ec

Browse files
authored
Merge branch 'main' into data-cube-variables
2 parents 0502e4d + 12774e3 commit fd273ec

4 files changed

Lines changed: 36 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3232
(fixes [#69](https://github.com/stac-extensions/mlm/issues/69)).
3333

3434
### Changed
35-
35+
3636
- Update `stac-model==0.4.0` to provide corresponding additions for `variables` reference.
3737
- Refactor `ModelInput` and `ModelOutput` objects to use a new `ModelBandsOrVariablesReferences` definition
3838
combining the `ModelBand` and `ModelDataVariable` lists.
@@ -44,6 +44,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4444
- Refactor the JSON schema `mlm:output` property to employ a `ModelOutput` object definition
4545
rather than directly provided properties nested under the array.
4646
- Refactor the JSON schema to allow the omission of `bands` under `mlm:input` if the `variables` property is provided.
47+
- Make `total_parameters` optional in `stac-model` and enforce greater than 0 to match with JSON-schema
48+
(applied in [#101](https://github.com/stac-extensions/mlm/pull/101).
4749
- Update `stac-model==0.3.0` to provide `ValueScalingObject` from installed package.
4850

4951
### Deprecated

pyproject.toml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,38 @@ glob_exclude = [
123123
search = "https://stac-extensions.github.io/mlm/v{current_version}/schema.json"
124124
replace = "https://stac-extensions.github.io/mlm/v{new_version}/schema.json"
125125

126+
[[tool.bumpversion.files]]
127+
glob = "**/*.yml"
128+
glob_exclude = [
129+
".git/**",
130+
"**/__pycache__/**",
131+
".mypy_cache/**",
132+
".tox/**",
133+
".venv/**",
134+
"_build/**",
135+
"build/**",
136+
"dist/**",
137+
"node_modules/**",
138+
]
139+
search = "https://stac-extensions.github.io/mlm/v{current_version}/schema.json"
140+
replace = "https://stac-extensions.github.io/mlm/v{new_version}/schema.json"
141+
142+
[[tool.bumpversion.files]]
143+
glob = "**/*.yaml"
144+
glob_exclude = [
145+
".git/**",
146+
"**/__pycache__/**",
147+
".mypy_cache/**",
148+
".tox/**",
149+
".venv/**",
150+
"_build/**",
151+
"build/**",
152+
"dist/**",
153+
"node_modules/**",
154+
]
155+
search = "https://stac-extensions.github.io/mlm/v{current_version}/schema.json"
156+
replace = "https://stac-extensions.github.io/mlm/v{new_version}/schema.json"
157+
126158
[[tool.bumpversion.files]]
127159
glob = "**/*.md"
128160
glob_exclude = [

stac-model.bump.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,3 @@ replace = """
4444
name = "stac-model"
4545
version = "{new_version}"
4646
"""
47-

stac_model/schema.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class MLModelProperties(Runtime):
4949
input: list[ModelInput]
5050
output: list[ModelOutput]
5151

52-
total_parameters: int
52+
total_parameters: Annotated[int | None, OmitIfNone] = Field(default=None, ge=0)
5353
pretrained: Annotated[bool | None, OmitIfNone] = Field(default=True)
5454
pretrained_source: Annotated[str | None, OmitIfNone] = None
5555

0 commit comments

Comments
 (0)