Skip to content

Cut over from in-repo prism_report to pytest-prism v0.1.0 - #741

Open
tfcollins wants to merge 9 commits into
mainfrom
prism-pytest-cutover
Open

Cut over from in-repo prism_report to pytest-prism v0.1.0#741
tfcollins wants to merge 9 commits into
mainfrom
prism-pytest-cutover

Conversation

@tfcollins

Copy link
Copy Markdown
Collaborator

Summary

  • Replaces the vendored test/plugins/prism_report/ plugin with the new external pytest-prism package; the generic plumbing now lives in the prism monorepo and is consumed via setuptools entry points.
  • Adds adi/prism_adapters/: IQRenderer (kind = adi.iq) and ADIDUTHook (session hook for labgrid + dmesg + iio_info), wrapping the existing analyze.py/render.py/capture.py logic. No behavior change in the analyzer or capture paths.
  • Updates pyproject.toml to add pytest-prism>=0.1,<0.2 to the prism_report extra and declare the two entry points (pytest_prism.renderersIQRenderer, pytest_prism.session_hooksADIDUTHook).
  • Migrates the 5 do_html_log blocks in test/dma_tests.py from pytest.data_log = {...} to _prism_attach("adi.iq", {...}) (try/import-shimmed so non-prism users don't break).
  • Drops "test.plugins.prism_report.plugin" from test/conftest.py's pytest_plugins (entry-point discovery handles registration now).
  • Deletes test/plugins/prism_report/ entirely (~26 files, ~2,500 lines removed). Bench-Pluto goldens move to adi/prism_adapters/tests/bench/ with the new per-kind path layout (cases/<id>/adi.iq/spectrum.html).

Net diff: +1,138 / −2,350. The repo gets meaningfully smaller and the IQ/labgrid domain code is no longer entangled with pytest plumbing.

Spec + plan in the workspace-sibling docs/superpowers/{specs,plans}/2026-05-02-prism-pytest-extraction-*.md.

Test plan

  • CI green on make tests and make etests (no regressions; emu-mode tests don't exercise the do_html_log path because loopback tests are gated to real hardware — that's pre-existing).
  • python -m pytest adi/prism_adapters/tests/ passes 26 + 1 skipped (bench-Pluto skipped without hardware).
  • On a bench Pluto, run pytest test/test_pluto_p.py --prism-report --prism-out=./out and verify the output dir contains cases/<safe_id>/adi.iq/{spectrum.html,spectrum.json,iq.npz,metrics.json} and a manifest.json with schema_version: 2.
  • Optionally point at a Prism instance via --prism-url=... --prism-email=... --prism-password=... --prism-project=... and verify the run shows up with inline-rendered spectrum HTML.

Depends on

  • tfcollins/prism in the prism repo: pytest-prism v0.1.0 must be installable. While operator finishes the PyPI upload, install editable from prism/clients/python-pytest/ first.

Operator-pending follow-ups (out of PR scope)

  • After this lands: git tag prism-pytest-cutover && git push origin prism-pytest-cutover.

@github-actions

github-actions Bot commented May 2, 2026

Copy link
Copy Markdown

Test Results

1 821 tests   - 40     529 ✅  - 24   4m 31s ⏱️ -23s
    1 suites ± 0   1 292 💤  - 13 
    1 files   ± 0       0 ❌  -  3 

Results for commit d25947a. ± Comparison against base commit 78bed86.

♻️ This comment has been updated with latest results.

@tfcollins
tfcollins force-pushed the prism-pytest-cutover branch from b975e5a to d25947a Compare May 22, 2026 19:40
@tfcollins
tfcollins changed the base branch from tfcollins/prism to main May 22, 2026 19:40
@github-actions

Copy link
Copy Markdown

Generated documentation for this PR is available at Link

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