Skip to content

Python(feat): pytest summary output#594

Merged
alexluck-sift merged 4 commits into
al/python/feat/pytest-dev-branchfrom
al/python/feat/pytest-sift-summary
May 28, 2026
Merged

Python(feat): pytest summary output#594
alexluck-sift merged 4 commits into
al/python/feat/pytest-dev-branchfrom
al/python/feat/pytest-sift-summary

Conversation

@alexluck-sift
Copy link
Copy Markdown
Collaborator

@alexluck-sift alexluck-sift commented May 28, 2026

  • New end-of-run Sift report panel: report name in the section title, then Status, Steps, Measurements (color-coded: green pass, red fail/error, yellow skip), Test case, System, Log file, and a clickable Report link (online) or upload command (offline). Suppressed under -q.
  • New session-start header showing the SDK version and active mode (e.g. Sift: sift-stack-py 0.17.0, online mode).
  • New --sift-open-report / sift_open_report flag opens the report in a browser at session end (gated to interactive terminals so it does nothing in CI or captured shells).
  • New --sift-report-url-base / sift_report_url_base / SIFT_APP_URL env var for on-prem and custom deployments. Online auto-derives the web-app URL for known Sift hosts; the override fills the gap for others. SiftClient.app_url exposes the resolved origin so non-plugin consumers can use it too.
  • Richer step.fail_if_measurements_failed() output: lists each out-of-bounds measurement by name, value, and bounds (e.g. [FAILED] b = 99.0 (min 0.0, max 2.0)). Backed by TestMeasurement.__str__, so the same format is available in logs and the REPL.
  • ReportContext now retains created steps and measurements with step_status_counts / measurement_counts properties. Docs and unit/integration tests updated for the new panel, options, and failure output.

Verification

Sift info added to pytest header:
image

fail_if_measurements_failed() output in pytest:
image

Offline summary:
image

Online summary:
image

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 28, 2026

Python docs preview: https://sift-stack.github.io/sift/python/pr-594/

Deployed from e8ff320. The link may take up to a minute to become live as GitHub Pages propagates.

@alexluck-sift alexluck-sift requested a review from ian-sift May 28, 2026 16:44
@alexluck-sift alexluck-sift marked this pull request as ready for review May 28, 2026 16:49
Comment thread python/lib/sift_client/_internal/urls.py Outdated
@alexluck-sift alexluck-sift merged commit d8b61b6 into al/python/feat/pytest-dev-branch May 28, 2026
18 checks passed
@alexluck-sift alexluck-sift deleted the al/python/feat/pytest-sift-summary branch May 28, 2026 21:54
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.

2 participants