Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/790.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The certification docs describe certifying a US or UK Microcosm build from its own folder with `scripts/bundle.py certify-build`, the compatibility check and the Tuesday and Friday compatibility workflow. The US certification runbook becomes `docs/engineering/runbooks/microcosm-certification.md` for both countries, and tagged addresses and policyengine-uk-data steps remain only as history.
54 changes: 28 additions & 26 deletions docs/bundles.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,36 +192,38 @@ python scripts/bundle.py update-packages \
By default a data certificate follows the core pin (`core_binding:
bundle_pin`), so `--core` can move it; `bundle.py check --include-tros
--strict-tros` then warns when a data release does not claim the new core. A
certificate that binds its core (`certify-data --core-version`,
`core_binding: certified`) instead fails that check until the country is
re-certified for the new core. See "The core" in the data certification
certificate that binds its core (`core_binding: certified`: made with
`--core-version`, or on a compatibility record, as every certification the
scheduled compatibility workflow makes for a newer model is) instead fails
that check until the country is re-certified for the new core. See "The core" in the data certification
skill.

To certify a new data release from a data-producer manifest, run:
To certify a US or UK Microcosm build, name it by build (the release defaults
to the one the bundle pins) together with the local-area build its regions
use:

```bash
python scripts/bundle.py certify-data \
python scripts/bundle.py certify-build \
--country uk \
--data-producer populace \
--manifest-uri hf://dataset/policyengine/populace-uk-private@<release>/releases/<release>/release_manifest.json
--national-build <national build> \
--local-area-build <local-area build> \
--model-version <policyengine-uk-version>
```

For US Microcosm releases, certify the Microcosm release manifest directly:

```bash
python scripts/bundle.py certify-data \
--country us \
--data-producer populace \
--manifest-uri hf://dataset/policyengine/populace-us@<release>/releases/<release>/release_manifest.json \
--regional-manifest-uri hf://dataset/policyengine/populace-us@<local-area-release>/releases/<local-area-release>/release_manifest.json \
--model-version <policyengine-us-version>
```

US state and congressional-district regions scope one certified ACS-local
Microcosm dataset with row filters. Pass its non-default local-area release
manifest through `--regional-manifest-uri`; certification adds the pinned H5
artifact to `data_releases.us.datasets` and writes both regional path templates
under `data_releases.us.region_datasets`. If a legacy release publishes derived
It runs the compatibility check on each build not made with that model
version, then `certify-data` with each
build's own folder, `releases/<release>/<build>/release_manifest.json`, at
the commit that published it; tagged addresses are refused. See the
[Microcosm certification runbook](engineering/runbooks/microcosm-certification.md)
for every option, and the data certification skill for what certification
checks. On Tuesdays and Fridays the `Check model compatibility` workflow does
this for each country's newest model release and opens a draft pull request.

US state and congressional-district regions, and UK constituency and
local-authority regions, scope one certified local-area Microcosm dataset with
row filters. Certification adds its pinned H5 artifact to
`data_releases.<country>.datasets` and writes the regional path templates
under `data_releases.<country>.region_datasets`. If a legacy release publishes derived
`states/*.h5` or `districts/*.h5` slices, certification still omits them.

`policyengine bundle install` continues to materialize only each country's
Expand All @@ -240,6 +242,6 @@ bumps the package and bundle versions together after merge.
CI checks derived bundle metadata, installs the package scaffold from the
bundle manifest, runs `pip check`, and verifies the packaged bundle metadata
with lightweight URI checks. Dataset downloads are handled by
`policyengine bundle install`, so certified UK data can be pinned by manifest
version and downloaded from Hugging Face even when the matching
`policyengine-uk-data` package is not published to PyPI.
`policyengine bundle install`, so certified data is pinned by its build folder
and commit and downloaded from Hugging Face; no data package is installed from
PyPI.
5 changes: 3 additions & 2 deletions docs/engineering/runbooks/acs-local-wic-replacement.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ certified. Do not invent its revision or hash or relax its failing check.

Once the replacement is available:

1. Follow the [US certification runbook](build-m-us-populace-certification.md)
1. Follow the [Microcosm certification runbook](microcosm-certification.md)
with its actual immutable regional manifest. Keep national defaults and
model pins unchanged unless separately approved.
model pins unchanged unless separately approved: pass the bundle's current
model pin as `--model-version`.
2. Verify complete current-name participation on the replacement and record
its revision and hashes.
3. Add the real certification changes to the removal PR and rebase it onto
Expand Down
132 changes: 0 additions & 132 deletions docs/engineering/runbooks/build-m-us-populace-certification.md

This file was deleted.

Loading