Skip to content

Template new entrant property merges#128

Open
EllieKallmier wants to merge 3 commits into
mainfrom
template-new-entrant-property-merges
Open

Template new entrant property merges#128
EllieKallmier wants to merge 3 commits into
mainfrom
template-new-entrant-property-merges

Conversation

@EllieKallmier

Copy link
Copy Markdown
Member

This PR adds merging in of 'property' values for new entrant storage and generation tables. These are the numeric values that map to 'technology' (see the *_PROPERTY_MAP dicts in mappings for full coverage of what's getting merged in here). Still not outputting the *_new_entrant tables from templater so not 100% wired in yet - coming in next PR(s) :)

Storage gets split up into pumped hydro and battery chunks to merge in properties whose values are in different tables, then recombines to return a unified 'storage' table still. There's a bit of special handling around BOTN - Cethana, which is the only 'named' new entrant unit and has some bespoke mappings (using 'name' rather than 'technology' to key). Happy to take suggestions on this handling and have opened up #127 issue to explore this in a bit more depth.

Where things live

src/ispypsa/templater/
├── new_entrants.py ← the two orchestrators + the merge machinery + BOTN handling
├── mappings.py ← the property maps (common, battery, PHES)
├── create_template.py ← storage templater now takes the full iasr_tables dict
└── helpers.py ← incidental: _fuzzy_map_to_canonical renamed (see below)
src/ispypsa/iasr_table_caching/local_cache.py ← register battery_properties + pumped_hydro
tests/test_workbook_table_cache/7.5/*.csv ← frozen cache gains the property tables

There's also an incidental rename of _fuzzy_map_to_canonical -> _fuzzy_map_to_allowed_values because it became more useful to kind of flexibly specify which set of strings to use as the 'choices' than explicitly say one is canon.

LCF values to be merged in next :)

@EllieKallmier EllieKallmier added type: feature New feature or request module: templater Covers contents of `templater` module labels Jun 25, 2026
@codecov

codecov Bot commented Jun 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/ispypsa/iasr_table_caching/local_cache.py 74.28% <ø> (ø)
...rc/ispypsa/templater/connection_and_build_costs.py 100.00% <100.00%> (ø)
src/ispypsa/templater/create_template.py 93.02% <100.00%> (ø)
src/ispypsa/templater/helpers.py 100.00% <100.00%> (ø)
src/ispypsa/templater/mappings.py 100.00% <100.00%> (ø)
src/ispypsa/templater/new_entrants.py 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module: templater Covers contents of `templater` module type: feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant