Skip to content

Add tests for pyopia.cli generate-config and modify-config#394

Draft
animmosmith wants to merge 1 commit into
mainfrom
142-cli-tests
Draft

Add tests for pyopia.cli generate-config and modify-config#394
animmosmith wants to merge 1 commit into
mainfrom
142-cli-tests

Conversation

@animmosmith

Copy link
Copy Markdown
Collaborator

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.classify imports and runs fine under pytest in this environment), and typer.testing.CliRunner works cleanly against pyopia.cli.app.

Scoped to the simple, side-effect-light commands for this first PR:

  • generate-config for each instrument (silcam, holo, uvp)
  • modify-config

Left 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 in test_pipeline.py. Also skipped docs (calls typer.launch() to open a browser — not suitable for CI).

Test plan

  • pytest pyopia/tests/test_cli.py passes (4 passed)
  • flake8 pyopia/tests/test_cli.py clean

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.
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

Successfully merging this pull request may close these issues.

1 participant