Skip to contents

Firewalled analysis environments, common in regulated (GxP) settings, can’t download anything while a report is being set up or built. quartifyr works there as long as what it would have downloaded is already on the machine. This page lists what needs the network, how to provide each piece locally, and what quartifyr cannot fix because it happens in a dependency.

What needs the network

Setup does. Rendering a report makes no network calls of its own, and when offline mode is on (below) it also can’t reach an index through uv.

Step Why it reaches the network Offline replacement
Python packages for render_report()’s styling steps pyro runs uv lock and uv sync UV_OFFLINE=1 with a pre-populated cache or wheel directory, or python_env
Installing uv pyro downloads and installs it into ~/.local/bin when it is missing install uv yourself
The quarto-plus Quarto extension quarto add fetches from GitHub install_quarto_extensions(), which has a copy bundled
Templates with from_repo git clone clone elsewhere, use from_dir

Offline mode

Set options(quartifyr.offline = TRUE) (or uv’s own UV_OFFLINE=1, which quartifyr also honours) and initialize_quartifyr_project() changes how it behaves:

  • pyro’s provisioning runs with UV_OFFLINE=1, so uv resolves from its cache or from UV_FIND_LINKS wheels instead of PyPI;
  • if uv isn’t installed it stops with a message saying so. Without this, pyro’s setup script would download uv from GitHub and install it into ~/.local/bin;
  • the installed uv’s own version is passed to pyro, so a version mismatch can’t be treated as a reason to download a different one;
  • from_repo is refused, with a pointer to from_dir.

Whenever a step that needs the network fails, the error says which step, which resource it was after and how to provide it locally. The error class is quartifyr_offline_failure, and it includes uv’s own stderr (pyro otherwise hides it).

Rendering offline

With offline mode on (options(quartifyr.offline = TRUE), UV_OFFLINE=1, or offline = TRUE / --offline on the call), render_report() and inst/scripts/render.R set these for the whole render, so quartifyr’s own uv run and every uv run reportifyr makes in pass 2 inherit them:

Variable Effect
UV_OFFLINE=1 uv resolves from its cache only
UV_NO_INDEX=1 uv never consults a package index
UV_PYTHON_DOWNLOADS=never uv never downloads a Python interpreter
UV_NO_SYNC=1 uv run uses the project’s environment as it is

The last one matters most. Without it, each uv run re-syncs the project’s environment, and a re-sync can remove and recreate .venv (reportifyr calls uv many times per render), which needs the wheels again. A render in offline mode never syncs, recreates or downloads anything, and works with a cold uv cache. If you call reportifyr yourself outside render_report(), set the same variables.

A render makes no network calls under exactly these conditions:

If a step still needs uv to reach the network, the error has class quartifyr_offline_failure and names the step (the styling step, or reportifyr’s pass 2) rather than the generic “quartifyr-styling failed”. An error that doesn’t look like uv or the network (a bad figure, a missing sidecar) keeps its own message.

Pass 2 needs some help to be recognised, because reportifyr and pyro don’t pass uv’s message on: pyro reports only “