Skip to content

Commit

Permalink
Merge pull request #668 from bioimage-io/improve_docs
Browse files Browse the repository at this point in the history
Pin pydantic below 2.10 and improve docs
  • Loading branch information
FynnBe authored Nov 28, 2024
2 parents c1a69a5 + aa88c1b commit 34d5545
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
16 changes: 15 additions & 1 deletion bioimageio/spec/_description.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,21 @@ def validate_format(
format_version: Union[Literal["discover", "latest"], str] = DISCOVER,
context: Optional[ValidationContext] = None,
) -> ValidationSummary:
"""validate a bioimageio.yaml file (RDF)"""
"""Validate a dictionary holding a boiimageio description
(see `bioimagieo.spec.load_description_and_validate_format_only`
to validate a file source).
Args:
data: dict holding raw bioimageio.yaml content
format_version: format version to (update to and) use for validation
context: validation context, see `bioimagieo.spec.ValidationContext`
Note: Use `bioimagieo.spec.load_description_and_validate_format_only` to validate a
file source instead of loading the YAML content and createing the appropriate
`ValidationContext`.
Or use `bioimagieo.spec.load_description` and access the `validation_summary`
attribute of the returned object.
"""
with context or validation_context_var.get():
rd = build_description(data, format_version=format_version)

Expand Down
2 changes: 1 addition & 1 deletion bioimageio/spec/summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ def format_loc(loc: Loc):
[
"🐍",
format_loc(d.loc),
"conda compare ({d.name}):<br>"
f"conda compare ({d.name}):<br>"
+ d.conda_compare.replace("\n", "<br>"),
]
)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"packaging>=17.0",
"pooch>=1.5,<2",
"pydantic-settings>=2.5,<3",
"pydantic>=2.7.0,<3",
"pydantic>=2.7.0,<2.10",
"python-dateutil",
"requests",
"rich",
Expand Down

0 comments on commit 34d5545

Please sign in to comment.