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

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

Open
FynnBe opened this issue Nov 19, 2024 · 0 comments
Open

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

FynnBe opened this issue Nov 19, 2024 · 0 comments
Assignees

Comments

@FynnBe
Copy link
Member

FynnBe commented Nov 19, 2024

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
@FynnBe FynnBe self-assigned this Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant