Skip to content

Commit

Permalink
Fix testing to account for the change in Identity
Browse files Browse the repository at this point in the history
  • Loading branch information
louisPoulain committed Sep 13, 2024
1 parent 54c3aac commit f99c00e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mlpp_lib/normalizers.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def f(ds: xr.Dataset) -> xr.Dataset:
ds = ds.fillna(self.fillvalue)
else:
if ds.isnull().any():
raise ValueError("Missing values found in the data. Please proivde a fill value.")
raise ValueError("Missing values found in the data. Please provide a fill value.")
return ds.astype("float32")

return tuple(f(ds) for ds in datasets)
Expand Down
3 changes: 2 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def datatransformations() -> list:
import mlpp_lib.normalizers as no

datatransformations = [
no.create_transformation_from_str(n.name, {"fillvalue": -5})
no.create_transformation_from_str(n.name, inputs={"fillvalue": -5} if n.name == "Identity" else {}) # temporary fix, do we want to let the user define different fillvalue for each transformation ?
for n in no.DataTransformation.__subclasses__()
]

Expand All @@ -96,6 +96,7 @@ def data_transformer() -> xr.Dataset:
for i, transformation in enumerate(transformations_list)
}
data_transformer = no.DataTransformer(method_var_dict)
data_transformer.transformers['Identity'][0].fillvalue = -5 # temporary fix, do we want to let the user define different fillvalue for each transformation ?

return data_transformer

Expand Down

0 comments on commit f99c00e

Please sign in to comment.