Skip to content

Commit

Permalink
Merge pull request #620 from bioimage-io/fix_619
Browse files Browse the repository at this point in the history
reset known files if root changes
  • Loading branch information
FynnBe authored Aug 5, 2024
2 parents a078cd4 + eeeba09 commit daa1794
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ To keep the bioimageio.spec Python package version in sync with the (model) desc

### bioimageio.spec Python package

#### bioimageio.spec 0.5.3.2

* bugfix "reset known files if root changes" (#619)

#### bioimageio.spec 0.5.3.1

note: the versioning scheme was changed as our previous `post` releases include changes beyond what a post release should entail (only changing docstrings, etc).
Expand Down
2 changes: 1 addition & 1 deletion bioimageio/spec/VERSION
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "0.5.3.1"
"version": "0.5.3.2"
}
4 changes: 4 additions & 0 deletions bioimageio/spec/_internal/validation_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ def replace(
perform_io_checks: Optional[bool] = None,
known_files: Optional[Dict[str, Sha256]] = None,
) -> "ValidationContext":
if known_files is None and root is not None and self.root != root:
# reset known files if root changes, but no new known_files are given
known_files = {}

return ValidationContext(
root=self.root if root is None else root,
warning_level=(
Expand Down
2 changes: 1 addition & 1 deletion bioimageio/spec/summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
MappingProxyType({INFO: INFO_NAME, WARNING: WARNING_NAME, ALERT: ALERT_NAME})
)
WARNING_LEVEL_TO_NAME: Mapping[WarningLevel, WarningLevelName] = MappingProxyType(
{**WARNING_SEVERITY_TO_NAME, ERROR: ERROR_NAME}
{INFO: INFO_NAME, WARNING: WARNING_NAME, ALERT: ALERT_NAME, ERROR: ERROR_NAME}
)
WARNING_NAME_TO_LEVEL: Mapping[WarningLevelName, WarningLevel] = MappingProxyType(
{v: k for k, v in WARNING_LEVEL_TO_NAME.items()}
Expand Down

0 comments on commit daa1794

Please sign in to comment.