Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pin pydantic below 2.10 and improve docs #668

Merged
merged 3 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading