Skip to content

feat: grid carbon-intensity keys in the site config (hpc-campaign p4) - #209

Merged
Jammy2211 merged 2 commits into
mainfrom
feature/hpc-campaign-p4-carbon-report
Oct 30, 2026
Merged

Jammy2211 merged 2 commits into
mainfrom
feature/hpc-campaign-p4-carbon-report

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

PyAutoNerves half of hpc-campaign phase 4 (#208; PyAutoFit side in the companion PR). Adds grid carbon-intensity values to the site config, so autofit.campaign.carbon reads them from config rather than code.

  • site_config.py: an optional carbon_intensity table keyed by basis (regional, national, desnz). Each basis has a low/central/high SiteValue in gCO2e/kWh that can be marked unverified. Site.ci(basis) reads it, and validate() rejects a site whose ci_basis basis has no value.
  • site/ral.yaml, all values marked unverified and sourced from scoping report §1.4:
    • South England regional: mean 188 g/kWh (p5 81, p95 308);
    • national 2025: mean 129 (p5 51, p95 231);
    • DESNZ 2025: 177;
    • ci_basis: regional.

Heart RED override (development only)

Heart was RED at the start of this task (2026-10-30): release validation FAILED (stage integrate); PyAutoHeart/workflows/Release Integrate failure; PyAutoNerves test_fitsable.py::test__output_to_fits red; unit-test timing 1 regression (>3× baseline), 14 slow; autogalaxy red; release validation NOT release_ready (v2026.10.30.1.dev85101); autolens_profiling red; worktree drift 1 dirty. The human authorized the Human override for Heart RED (development only) live for hpc-campaign phases 3 and 4 ("Override, proceed"). This PR touches no RED item and does not fix Heart. Merging still needs green CI and a separate /prm; it permits no release.

Test plan

  • PyAutoNerves suite: 284 passed, covering the schema, Site.ci, an empty basis being rejected, and defaults when the table is absent.
  • Independent review: FINDINGS, fixed in dba2819 (an empty ci_basis value is now refused).

Refs #208

🤖 Generated with Claude Code

Jammy2211 and others added 2 commits October 30, 2026 14:44
An optional carbon_intensity table (gCO2e/kWh per named basis, value or
low/central/high, unverified allowed) with ci_basis naming the basis used
centrally; Site.carbon_intensity and Site.ci(basis). A site without the
table gives no carbon figure, never a world-average default. site/ral.yaml:
South England regional (central 188, half-hourly p5/p95 81-308), national
2025 (129, 51-231) and DESNZ 2025 (177), all unverified, ci_basis regional
(ruling F6).

Refs #208

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ign p4)

validate() accepted carbon_intensity with an empty entry for the basis named
by ci_basis, which autofit could not use. It is now rejected with a clear
message; other bases may still be empty.

Refs #208

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Jammy2211
Jammy2211 merged commit 68cbac3 into main Oct 30, 2026
3 checks passed
@Jammy2211
Jammy2211 deleted the feature/hpc-campaign-p4-carbon-report branch October 30, 2026 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant