Skip to content

Commit

Permalink
remove noqa, make format
Browse files Browse the repository at this point in the history
  • Loading branch information
rbavery committed Nov 12, 2024
1 parent 021d0a2 commit eb2e5c6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion stac_model/examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def eurosat_resnet() -> ItemMLModelExtension:
type="z-score",
mean=mean,
stddev=stddev,
)
),
)
for mean, stddev in zip(stats_mean, stats_stddev, strict=False)
]
Expand Down
5 changes: 3 additions & 2 deletions stac_model/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ def validate_dimensions(self) -> Self:
raise ValueError("Dimension order and shape must be of equal length for corresponding indices.")
return self


class ValueScalingClipMin(MLMBaseModel):
type: Literal["clip-min"] = "clip-min"
minimum: Number
Expand Down Expand Up @@ -71,7 +72,7 @@ class ValueScalingProcessingExpression(ProcessingExpression):
ValueScalingScale,
ValueScalingProcessingExpression,
]
] # noqa: E501
]

ResizeType: TypeAlias = (
Literal[
Expand All @@ -87,7 +88,7 @@ class ValueScalingProcessingExpression(ProcessingExpression):
"wrap-inverse-map",
]
| None
) # noqa: E501
)


class ModelBand(MLMBaseModel):
Expand Down
11 changes: 7 additions & 4 deletions tests/test_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,13 @@ def test_mlm_no_input_allowed_but_explicit_empty_array_required(
([{"type": "z-score", "mean": 1, "stddev": 2, "minimum": 1, "maximum": 2}], True), # extra must be ignored
([{"type": "processing"}], False),
([{"type": "processing", "format": "test", "expression": "test"}], True),
([
{"type": "processing", "format": "test", "expression": "test"},
{"type": "min-max", "minimum": 1, "maximum": 2}
], True),
(
[
{"type": "processing", "format": "test", "expression": "test"},
{"type": "min-max", "minimum": 1, "maximum": 2},
],
True,
),
],
)
def test_mlm_input_scaling_combination(
Expand Down

0 comments on commit eb2e5c6

Please sign in to comment.