Skip to content

refactor(allocation): remove GHG if/elif chain and simplify E pipeline#290

Draft
briantobin-99 wants to merge 1 commit intomainfrom
btobin__cleanup-ghg-method
Draft

refactor(allocation): remove GHG if/elif chain and simplify E pipeline#290
briantobin-99 wants to merge 1 commit intomainfrom
btobin__cleanup-ghg-method

Conversation

@briantobin-99
Copy link
Contributor

cc:
Closes:

What changed? Why?

Remove the 10-way if/elif GHG method selector in load_E_from_flowsa(), hardcoding GHG_national_Cornerstone_2023 as the only method. Simplify derive_E_usa() to always call load_E_from_flowsa(). Delete dead functions derive_E_usa_by_gas() and derive_E_usa_emissions_sources(). Remove CEDA v7 sector collapse branch in map_to_CEDA(), always using Cornerstone schema. Clean up ~10 unused imports in bedrock/transform/allocation/derived.py.

Stack: 1/5 — this is the base of the config cleanup stack.

Testing

Existing allocation tests pass. Snapshot comparison pending.

Made with Cursor

Remove the 10-way GHG method selector in load_E_from_flowsa(), always
using GHG_national_Cornerstone_2023. Simplify derive_E_usa() to
always call load_E_from_flowsa(). Delete dead functions
derive_E_usa_by_gas() and derive_E_usa_emissions_sources(). Remove
CEDA sector collapse branch, always use Cornerstone schema. Clean up
unused imports.
@briantobin-99
Copy link
Contributor Author

Stack

  1. refactor(allocation): remove GHG if/elif chain and simplify E pipeline #290 — refactor(allocation): remove GHG if/elif chain and simplify E pipeline
  2. refactor(eeio): remove use_cornerstone_2026_model_schema gating #291 — refactor(eeio): remove use_cornerstone_2026_model_schema gating
  3. refactor(eeio): remove waste_disagg and use_E_data_year gating #292 — refactor(eeio): remove waste_disagg and use_E_data_year gating
  4. fix(epa): fix data year validation and remove diagnostics gating #293 — fix(epa): fix data year validation and remove diagnostics gating
  5. refactor(config): remove 14 USAConfig flags and delete obsolete YAMLs #294 — refactor(config): remove 14 USAConfig flags and delete obsolete YAMLs

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