Skip to content

Commit cf37a5b

Browse files
authored
Update LCFS, WAS, and ETB prerequisites (#413)
* Update private UK survey prerequisites * Use current UKDS tab zip layouts * Handle refreshed LCFS and ETB aggregate shifts * Use locked uv environment in data CI
1 parent e89f34c commit cf37a5b

17 files changed

Lines changed: 689 additions & 180 deletions

.github/workflows/pull_request.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,14 @@ jobs:
6464
uses: actions/setup-python@v6
6565
with:
6666
python-version: 3.13
67-
- name: Install package
68-
run: uv pip install -e ".[dev]" --system
67+
- name: Sync locked environment
68+
run: uv sync --frozen --all-extras
6969
- name: Download data inputs
70-
run: make download
70+
run: uv run --frozen make download
7171
env:
7272
HUGGING_FACE_TOKEN: ${{ secrets.HUGGING_FACE_TOKEN }}
7373
- name: Build datasets
74-
run: make data
74+
run: uv run --frozen make data
7575
env:
7676
TESTING: "1"
7777
- name: Save calibration log (constituencies)
@@ -87,4 +87,4 @@ jobs:
8787
path: la_calibration_log.csv
8888

8989
- name: Run tests
90-
run: make test
90+
run: uv run --frozen make test

.github/workflows/push.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,14 @@ jobs:
5252
with:
5353
workload_identity_provider: "projects/322898545428/locations/global/workloadIdentityPools/policyengine-research-id-pool/providers/prod-github-provider"
5454
service_account: "policyengine-research@policyengine-research.iam.gserviceaccount.com"
55-
- name: Install package
56-
run: uv pip install -e ".[dev]" --system
55+
- name: Sync locked environment
56+
run: uv sync --frozen --all-extras
5757
- name: Download data inputs
58-
run: make download
58+
run: uv run --frozen make download
5959
env:
6060
HUGGING_FACE_TOKEN: ${{ secrets.HUGGING_FACE_TOKEN }}
6161
- name: Build datasets
62-
run: make data
62+
run: uv run --frozen make data
6363
- name: Save calibration log (constituencies)
6464
uses: actions/upload-artifact@v7
6565
with:
@@ -72,9 +72,9 @@ jobs:
7272
name: la_calibration_log.csv
7373
path: la_calibration_log.csv
7474
- name: Run tests
75-
run: make test
75+
run: uv run --frozen make test
7676
- name: Upload data
77-
run: make upload
77+
run: uv run --frozen make upload
7878
env:
7979
HUGGING_FACE_TOKEN: ${{ secrets.HUGGING_FACE_TOKEN }}
8080
- name: Publish a git tag

policyengine_uk_data/datasets/create_datasets.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ def main():
103103
"Clone and assign OA geography",
104104
"Calibrate constituency weights",
105105
"Calibrate local authority weights",
106+
"Calibrate public service aggregates",
106107
"Calibrate fuel litres",
107108
"Save final dataset",
108109
"Create tiny datasets",
@@ -288,6 +289,17 @@ def main():
288289
)
289290
update_dataset(materialize_step, "completed")
290291

292+
update_dataset("Calibrate public service aggregates", "processing")
293+
from policyengine_uk_data.datasets.imputations.services.services import (
294+
calibrate_rail_subsidy_spending,
295+
)
296+
297+
calibrate_rail_subsidy_spending(
298+
frs_calibrated,
299+
frs_release.calibration_year,
300+
)
301+
update_dataset("Calibrate public service aggregates", "completed")
302+
291303
update_dataset("Calibrate fuel litres", "processing")
292304
from policyengine_uk_data.datasets.imputations.consumption import (
293305
calibrate_dataset_fuel_litre_proxies_to_road_fuel,

0 commit comments

Comments
 (0)