Add tests for pyopia.cli generate-config and modify-config#394
Draft
animmosmith wants to merge 1 commit into
Draft
Add tests for pyopia.cli generate-config and modify-config#394animmosmith wants to merge 1 commit into
animmosmith wants to merge 1 commit into
Conversation
First pass at #142. Confirms typer's CliRunner works cleanly under pytest in this environment, and that the TensorFlow/pytest incompatibility noted in the issue (filed 2023) no longer applies with current TF/Keras versions. Scoped to the simple, side-effect-light commands for now (generate-config for each instrument, modify-config). Heavier commands (process, init-project, process-realtime) that exercise full pipeline runs and downloads are left for a follow-up, following the example-data patterns already used in test_pipeline.py.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
First pass at #142. The issue noted TensorFlow had problems running in a pytest environment back in 2023 — that no longer reproduces with current TF/Keras versions (confirmed
pyopia.classifyimports and runs fine under pytest in this environment), andtyper.testing.CliRunnerworks cleanly againstpyopia.cli.app.Scoped to the simple, side-effect-light commands for this first PR:
generate-configfor each instrument (silcam, holo, uvp)modify-configLeft for a follow-up: heavier commands (
process,init-project,process-realtime) that exercise full pipeline runs and downloads — these would follow the same example-data patterns already used intest_pipeline.py. Also skippeddocs(callstyper.launch()to open a browser — not suitable for CI).Test plan
pytest pyopia/tests/test_cli.pypasses (4 passed)flake8 pyopia/tests/test_cli.pyclean