You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One existing Python environment can now serve both passes with no pyro, no
project .venv and no network (#85). With a python_env
(options(quartifyr.python_env) or QUARTIFYR_PYTHON_ENV), render_report() also points reportifyr's pass 2 at it: pyro gets options(venv_dir) for the render, and uv gets UV_PROJECT_ENVIRONMENT and UV_NO_SYNC and UV_PYTHON (its own interpreter: without a pyproject.toml uv is outside a project, and a .python-version file would
otherwise make it run a different interpreter), so it runs reportifyr's module
in that environment and creates no .venv and rewrites no uv.lock, even in
a project that ships both. An environment not named .venv is exposed through
a temporary junction on Windows (no privilege needed) or symlink elsewhere.
New initialize_report_project_offline() creates the
report folders, config.yaml, standard_footnotes.yaml and the .report_init.json marker that reportifyr::initialize_report_project()
makes, without calling pyro or uv (that function installs uv and runs uv lock/uv sync against PyPI); it leaves what exists alone. uv itself
must still be installed, since reportifyr runs it for every call, but it is
never asked to sync, resolve or download. The offline-pipeline CI job now
also sets up and renders a fresh copy of the demo with only python_env,
under unshare --net, and fails if a .venv appears or uv.lock changes.
render_report(soffice_bin = ) / render.R --soffice-bin <path> name the
LibreOffice executable for --recalculate-fields and --resolve-same-page-crossrefs, falling back to QUARTIFYR_SOFFICE_BIN
and then soffice on PATH (the same order as quarto_bin). The styling
CLI's two LibreOffice subcommands and styling_recalculate_fields() / styling_resolve_same_page_crossrefs() take it too. A missing or
non-executable path fails before the render starts, and the result's versions$libreoffice records the resolved path and soffice --version
of the one that ran (#83).
Breaking changes
A configured python_env (options(quartifyr.python_env) or QUARTIFYR_PYTHON_ENV) now also drives reportifyr's pass 2 in render_report() (#85). Before, it applied only to quartifyr's own Python
calls, and pass 2 ran in the project's .venv through pyro. Anyone who set a python_env for the styling steps and relied on a separate .venv for pass 2
now has pass 2 run in the python_env instead, and that environment must have pillow as well as python-docx and pyyaml; render_report() fails before
rendering, naming what is missing, if it doesn't.
The inputs[].role values in the result JSON gained quarto_yml, style, override and extension (#82). The schema stays at version 1 because
consumers are expected to accept roles they don't know, so role is now an
open string in render-result-v1.schema.json (with the known values listed
as examples). A validator built from the 0.3.2 copy of the schema, which kept role closed, rejects 0.3.3 output; update it, or loosen role there.
Bug fixes
Corrections to the above before release:
Offline relabelling no longer fires on ordinary pass-2 errors (#82). The
matcher accepted the bare words "network" and "offline" and reads
reportifyr's log lines, which carry file paths, so a project under .../offline-study/ had every error reported as "cannot ... without
network access". It now matches uv's and the network stack's own phrases.
report/draft/intermediate_files/ (where reportifyr moves -clean, -tabs and -tabsfigs) is moved aside with the other outputs, so a
rejected or killed render no longer leaves the last good run's
near-complete -tabsfigs.docx live (#81).
The interpreter-mismatch warning no longer fires on a correct environment:
uv writes version_info = 3.12 to pyvenv.cfg, which was read as 3.12.0
and so "mismatched" a 3.12.13 pin. Partial versions are compared only on
the components they have, and the check also runs when python_env is the
folder holding .venv (#82).
Extension hashes are computed in C-locale order, so the same extension has
the same SHA-256 under any collation (#82).
render_report() hands the LibreOffice steps the absolute path it checked,
so a relative soffice_bin can't mean something else inside the project
(#83).
Contract gaps in the offline and result work (#82):
In offline mode a pass-2 uv failure is now recognised with the real
reportifyr and pyro, which don't pass uv's message on (pyro says only
"<script> failed."; reportifyr's docx validation discards it). Pass 2's
output is kept and, when it doesn't explain the failure, uv is asked
directly with a no-op uv run -m reportipyr.cli --help. The old test
stubbed an error message real reportifyr never produces.
A relative reference_doc, style or override (and --reference-doc, --style, --override) is resolved against the caller's directory
before the render moves into the project, so the file that is checked,
hashed and used is the same one.
inputs is hashed before the render starts, and now includes _quarto.yml, an explicit style/override YAML and one row per Quarto
extension under _extensions/. The early-error JSON carries versions.
The schema requires artifacts, inputs and versions for a render
that finished (ok or warning), and CI validates the real render.R --json output (a success and a forced failure) against it, in
the full-pipeline and offline jobs (scripts/validate_render_result.py).
Offline, an environment whose interpreter doesn't match the project's pin
(.python-version, else requires-python) is reported as a result
warning instead of uv's silent "Using incompatible environment".
A failed, rejected or interrupted render no longer leaves a
complete-looking docx in report/draft or report/final. A render now
works in report/.staging-<id>/ (Quarto is pointed at it with --output-dir) and is only moved into report/{shell,draft,final} once it
has finished and been accepted, so a strict = TRUE rejection, a pass-2
failure partway through (reportifyr's -clean/-tabs/-draft files) or a
killed R process never reaches the live folders. What a failed or rejected
render produced is kept in report/.failed/ with a FAILED file giving the
reason (the next failure replaces it); a killed render's staging folder is
deleted by the next render. report/.previous/ now only ever receives
delivered outputs, so a failure followed by another render no longer pushes
the last good outputs out of it, and moving the previous outputs there is
all or nothing instead of stopping half way. reportifyr's <final>_docx_metadata.json is repointed from the staging folder to report/final/ (#81).
--recalculate-fields and --resolve-same-page-crossrefs no longer hang
on macOS with LibreOffice 26.2 (every run timed out). A fresh profile
that already holds the seeded macro when LibreOffice first starts never
runs it, so the profile is now initialised first (--terminate_after_init)
and the macro added afterwards; a run then takes about two seconds (100 of
100 sequential and concurrent runs on macOS 26.6 / LibreOffice 26.2.5.2).
The macro also writes a heartbeat file as its first action, and a
LibreOffice that doesn't start it within half the timeout (at least 30
seconds; QUARTIFYR_SOFFICE_START_TIMEOUT overrides) is abandoned and
reported as unavailable instead of waiting out the full timeout. The profile
warm-up is counted against the timeout, not added to it. Not
re-tested on Windows or Linux (#84).
The two headless-LibreOffice steps (--recalculate-fields, --resolve-same-page-crossrefs) now work on Windows and with profile
paths that contain a space. The -env:UserInstallation profile URL was
built as file://<path>, which is malformed on Windows and breaks on a
space; it is now a proper file:/// URI. A timeout now kills the whole
LibreOffice process tree on Windows too (taskkill /T /F plus a sweep for
processes whose command line names the profile's file:/// URL, which is how
LibreOffice shows it, never the plain path; the POSIX-only process-group kill raised there), and a soffice that still holds its temporary profile no longer turns a
timeout into a PermissionError. Both steps share one launcher
(quartifyr_styling/_soffice.py) (#86).