Skip to content

Commit

Permalink
Merge pull request #626 from bioimage-io/FynnBe-patch-1
Browse files Browse the repository at this point in the history
switch back to rdf.yaml
  • Loading branch information
FynnBe authored Oct 10, 2024
2 parents 5a06d44 + cf550bc commit f9ac2b4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ To keep the bioimageio.spec Python package version in sync with the (model) desc

#### bioimageio.spec 0.5.3.3 (not yet released)

* prefer `rdf.yaml` over `bioimageio.yaml` (name `bioimageio.yaml` file `rdf.yaml` file when packaging, look for `rdf.yaml` first, etc.)
* enforce: (generic 0.3/model 0.5 spec) documentation source file encoding has to be UTF-8.
* bugfix: allow optional pre- and postprocessing to be missing in an RDF (before it required an empty dict).

Expand Down
4 changes: 2 additions & 2 deletions bioimageio/spec/_internal/io_basics.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
AbsoluteDirectory = Annotated[DirectoryPath, Predicate(Path.is_absolute)]
AbsoluteFilePath = Annotated[FilePath, Predicate(Path.is_absolute)]

BIOIMAGEIO_YAML = "bioimageio.yaml"
ALTERNATIVE_BIOIMAGEIO_YAML_NAMES = ("rdf.yaml", "model.yaml")
BIOIMAGEIO_YAML = "rdf.yaml"
ALTERNATIVE_BIOIMAGEIO_YAML_NAMES = ("bioimageio.yaml", "model.yaml")
ALL_BIOIMAGEIO_YAML_NAMES = (BIOIMAGEIO_YAML,) + ALTERNATIVE_BIOIMAGEIO_YAML_NAMES


Expand Down
4 changes: 2 additions & 2 deletions tests/test_internal/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def test_known_files(tmp_path: Path):
_ = src.write_text("lala")
sha = get_sha256(src)

with ValidationContext(root=tmp_path):
with ValidationContext(root=tmp_path, perform_io_checks=True):
# set sha on loading
file_descr = FileDescr(source=file_name) # pyright: ignore[reportArgumentType]
assert file_descr.sha256 == sha
Expand All @@ -92,7 +92,7 @@ def test_known_files(tmp_path: Path):
assert file_descr.sha256 == sha

# give known files to bypass file io
with ValidationContext(known_files={file_name: sha}):
with ValidationContext(known_files={file_name: sha}, perform_io_checks=True):
# set sha on loading
file_descr = FileDescr(source=file_name) # pyright: ignore[reportArgumentType]
assert file_descr.sha256 == sha
Expand Down

0 comments on commit f9ac2b4

Please sign in to comment.