vcti-measure-report
Reports from a vcti-measure artifact through Jinja2 templates — one projection, any output format.
An artifact records one run completely. It is not a report. Turning it into one means resolving axis labels, grouping by item, pairing each reading with the target that applies to it, and accounting for the points that produced nothing — and none of that changes when the output format does.
So this package does that work once, in Python, and leaves templates to do only syntax. It projects an artifact into flat rows carrying everything a report needs, and renders those rows through a template. Which is why one package serves HTML, Markdown and CSV, and why a user can add a format by writing a template rather than by waiting for a package.
Installation
pip install vcti-measure-report
In requirements.txt
vcti-measure-report>=2.0.0,<3
In pyproject.toml dependencies
dependencies = [
"vcti-measure-report>=2.0.0,<3",
]
Quick Start
Read an artifact and render it:
from vcti.measure.report import Report
report = Report.from_text(path.read_text(encoding="utf-8"), title="Week 36")
print(report.render("summary.md"))
print(report.render("long.csv"))
A Report validates the document through vcti-measure once, when it is
built, then renders as many formats as you like from that one pass. It never
writes anything — rendering returns text, so storage policy stays with you.
Add your own format by writing a template:
print(report.render("our-house-style.html", template_dirs=["./templates"]))
Your template is an addition, not a replacement: the bundled names resolve
first, so summary.md and long.csv are reserved. Name yours something
else — including when it started life as a copy of one of ours.
A template receives flat rows — one per observation per metric, with the
axis label, the unit, the target and the status already resolved — so
grouping is Jinja's own groupby and selectattr, not an accumulator:
{% for item, irows in rows | selectattr("role", "equalto", "subject") | groupby("item") %}
### {{ item }}
{% for r in irows %}
| {{ r.coordinate_label }} | {{ r.metric }} | {{ r.value | quantity(r.unit) }} |
{% endfor %}
{% endfor %}
What this package does not do
- Produce artifacts — it reads them. Declaring measurements and running
instruments belong to
vcti-measureand to domain packages above it. - Define validity — a
Reportdoes validate, by callingvcti-measure'svalidate_artifact: it refuses to render what core would refuse to read. The rules themselves live in one place, and it is not here. - Write files — rendering returns text.
- Compare across runs — a row is joinable across artifacts by construction, but accumulating them is somebody else's job.
Each of these is explained in docs/design.md.
Dependencies
vcti-measure for the artifact and its validation, vcti-template for
template loading and strict rendering, vcti-escapers for the per-medium
escapers a template applies, and pydantic for the row model. Charting is
deferred, and no charting dependency is taken.
Documentation
| If you want to… | Read |
|---|---|
| Solve a real reporting problem | docs/patterns.md |
| Understand the architecture and design decisions | docs/design.md |
| Navigate and change the code | docs/source-guide.md |
| Add a format, a filter or a field | docs/extending.md |
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vcti_measure_report-2.0.0.tar.gz.
File metadata
- Download URL: vcti_measure_report-2.0.0.tar.gz
- Upload date:
- Size: 43.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ad08a8f6667cccb41437555f0a55d2a2df0b01b5a2d2c676ec5ff159ec7e769
|
|
| MD5 |
d3d4b30a91668f162a9bfb3e0e8939c9
|
|
| BLAKE2b-256 |
f3aa088f253e1ac716b38055bd09cfc3485e41e378b5e56aaf8111deca8546d7
|
Provenance
The following attestation bundles were made for vcti_measure_report-2.0.0.tar.gz:
Publisher:
release.yml on vcollab/vcti-python-measure-report
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vcti_measure_report-2.0.0.tar.gz -
Subject digest:
5ad08a8f6667cccb41437555f0a55d2a2df0b01b5a2d2c676ec5ff159ec7e769 - Sigstore transparency entry: 2726771945
- Sigstore integration time:
-
Permalink:
vcollab/vcti-python-measure-report@3338851648a6824fffc8e09bdf9c8d2d63947d6e -
Branch / Tag:
refs/tags/v2.0.0 - Owner: https://github.com/vcollab
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3338851648a6824fffc8e09bdf9c8d2d63947d6e -
Trigger Event:
push
-
Statement type:
File details
Details for the file vcti_measure_report-2.0.0-py3-none-any.whl.
File metadata
- Download URL: vcti_measure_report-2.0.0-py3-none-any.whl
- Upload date:
- Size: 23.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d18686679b0d20591506187ab4a3d25886e2c887fd68a8f46e8bc81d176263c9
|
|
| MD5 |
bc3a5f16466f223d6544a0f6e1df5a10
|
|
| BLAKE2b-256 |
6bd8e6b7e673bed713a2684bd7ae3e03283735c67de1e0cd57a0915c93619378
|
Provenance
The following attestation bundles were made for vcti_measure_report-2.0.0-py3-none-any.whl:
Publisher:
release.yml on vcollab/vcti-python-measure-report
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vcti_measure_report-2.0.0-py3-none-any.whl -
Subject digest:
d18686679b0d20591506187ab4a3d25886e2c887fd68a8f46e8bc81d176263c9 - Sigstore transparency entry: 2726772116
- Sigstore integration time:
-
Permalink:
vcollab/vcti-python-measure-report@3338851648a6824fffc8e09bdf9c8d2d63947d6e -
Branch / Tag:
refs/tags/v2.0.0 - Owner: https://github.com/vcollab
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3338851648a6824fffc8e09bdf9c8d2d63947d6e -
Trigger Event:
push
-
Statement type: