Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds documentation and helper scripts to explain and demonstrate the unified Python API/backends approach, including a machine-specific native stress benchmark demo rendered into the docs.
Changes:
- Added a new docs page describing backend unification and current dispatch status, including an include of generated benchmark results.
- Added scripts to (a) run/parse the native stress benchmark into JSON/log and (b) render that JSON into a Markdown include used by the docs.
- Updated docs index, root Makefile docs build, contributor workflow notes, and gitignore to support the new docs assets.
Reviewed changes
Copilot reviewed 7 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/render_native_stress_demo_include.py | Renders a Markdown include from the committed benchmark JSON. |
| docs/generate_native_stress_demo.py | Runs pytest stress benchmark and emits machine-specific JSON/log artifacts. |
| docs/native_backend_unification.md | New explainer page describing unified backend dispatch + embeds generated demo include. |
| docs/index.md | Adds the new explainer page to the docs index. |
| docs/_static/native-stress-demo.json | Adds an example benchmark output JSON for the docs demo. |
| README.md | Updates contributor workflow guidance (uv-first + conda alternative). |
| Makefile | Adds uv env update targets; updates docs-build to generate the md include. |
| .gitignore | Ignores docs/_generated/ outputs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+130
to
+132
| ```{include} _generated/native-stress-demo.mdinc | ||
| ``` | ||
|
|
Comment on lines
+2
to
+11
| "generated_at": "2026-03-15T12:45:22.894671+00:00", | ||
| "python": "/home/user/Documents/GitHub/openptv-python/.venv/bin/python", | ||
| "command": [ | ||
| "/home/user/Documents/GitHub/openptv-python/.venv/bin/python", | ||
| "-m", | ||
| "pytest", | ||
| "-q", | ||
| "-s", | ||
| "tests/test_native_stress_performance.py" | ||
| ], |
Comment on lines
+1
to
+6
| """Regenerate the native stress benchmark data assets for the docs. | ||
|
|
||
| This script reruns tests/test_native_stress_performance.py, parses the timing | ||
| summary lines printed by the test module, and writes machine-specific demo | ||
| artifacts under docs/_static/. | ||
| """ |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
uv run pyptv works
…python into integrate_pyptv
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.
This pull request introduces new documentation and supporting assets to explain and demonstrate the unified Python API approach in
openptv-python, emphasizing how the library transparently routes operations to pure Python, Numba, or nativeoptvbackends. It adds a detailed explainer page, a script to generate machine-specific benchmark artifacts, and example benchmark results to the documentation.The most important changes are:
Documentation Enhancements:
native_backend_unification.md) describing the unified backend model, current dispatch status, and rationale for a single public Python API that transparently selects the best available backend. This page includes pipeline diagrams, a summary table of benchmark results, and guidance for users and contributors.index.mdto include the new backend unification page.Benchmark Demo and Artifacts:
generate_native_stress_demo.py) that runs the native stress benchmark suite, parses the output, and generates machine-specific artifacts: a JSON summary, an SVG chart, and a raw log. This script automates the process of updating benchmark results in the documentation.native-stress-demo.json) to the documentation's static assets, showing detailed timings and speedups for each workload stage.