Skip to content

Add a datasets-only mode to policyengine bundle install (inverse of --no-datasets) #452

Description

@anth-volk

Motivation

policyengine bundle install currently couples two responsibilities: installing the bundle's package scaffold and downloading certified datasets (+ writing the bundle receipt). The CLI offers --no-datasets (packages only) but no inverse — there is no way to obtain just the certified datasets and receipt for a bundle without also having the bundle installer manage packages.

In PolicyEngine/policyengine-api-v2 we are moving the simulation service's Modal images to canonical uv-lockfile installs (PolicyEngine/policyengine-sim-api#609): uv sync --frozen against a committed uv.lock should own all Python packages in the image, so that image environments are byte-identical to the CI-tested environment and can only change through a relock. The bundle's model-package pins are already mirrored into that project's pyproject.toml/uv.lock by automation, so uv can install them — but the bundle install step must still run for the datasets and receipt, and today that drags its package installer along with it. As a bridge we currently run bundle install --venv /.uv/.venv so both installers at least share one environment.

Request

A datasets-only mode, e.g.:

policyengine bundle install <version> --no-packages --data-dir /opt/policyengine/data --yes
# or a dedicated subcommand:
policyengine bundle fetch-data <version> --data-dir /opt/policyengine/data --yes

Behavior: download/verify the bundle's certified datasets for the selected countries into --data-dir and write the bundle receipt, without installing or modifying any Python packages. Symmetric with the existing --no-datasets.

With that available, consumers who manage packages via uv (or any other resolver) can keep the bundle as the source of truth for certified data while their lockfile is the sole source of truth for packages.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions