Skip to content

Revise emission scenario names#117

Open
urwahah wants to merge 2 commits into
developmentfrom
emissions-scenario-names
Open

Revise emission scenario names#117
urwahah wants to merge 2 commits into
developmentfrom
emissions-scenario-names

Conversation

@urwahah

@urwahah urwahah commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

changed the name attribute for emission scenarios to be more descriptive instead of A,B,C

@urwahah urwahah changed the title revise emission scenario names Revise emission scenario names Jun 19, 2026
@urwahah urwahah requested a review from t-kramer June 19, 2026 20:59

@t-kramer t-kramer left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@urwahah I added only a few minor comments. Please take a look and we can merge after that.

Comment thread pages/emissions_page.py Outdated
Comment thread pages/emissions_page.py
# scen = {**base_scenario, "em_scen_id": scen_id, "em_scen_name": scen_name}
scen = {**base_scenario, "em_scen_id": scen_id}

if group_id == "year":

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the old code always assigned em_scen_name before the if/elif chain. The new code only assigns it inside each branch, correct? If a new group type is added in the future without updating this block, em_scen_name will be missing from the dict, causing a downstream errors.

@urwahah urwahah Jun 30, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's right. i would expect a name to be defined for each scenario group, similar to the equipment groups.. i know this block is a little confusing, but i saw there's an open issue to create an emissions scenario database (#99) already, so this was just meant as an stopgap before that's resolved (because the A,B,C was hard to follow).

i added a default empty string for now, so if nothing is provided you'd at least notice a blank - is that fine?
alternatively we can just keep the original code that generates a default name from the suffix, which then gets overwritten by the branches

Comment thread pages/emissions_page.py Outdated
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.

2 participants