Skip to content

Use pytest doctest to keep 'Get started' section up to date #438

Open
@FynnBe

Description

@FynnBe

Move 'get started' to bioimageio.core.init.py and maybe execute example commands with subprocess to have them validated with ptyest...

import subprocess
subprocess.run("bioimageio predict impartial-shrimp --example=True".split())

Maybe use https://docs.pytest.org/en/stable/how-to/doctest.html#doctest-namespace-fixture
to provide some run_example command to make it look like more closely to what is run in a terminal.
Maybe hide that line even with <!--- in the final rendered html.

<!---
>>>run_example("bioimageio predict impartial-shrimp --example=True") # --->
$ bioimageio predict impartial-shrimp --example=True

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions