Accept a caller-supplied spec and data in .bare.create_res - #559
Draft
Wegatriespython wants to merge 1 commit into
Draft
Wegatriespython wants to merge 1 commit into
Wegatriespython wants to merge 1 commit into
Conversation
Wegatriespython
marked this pull request as draft
September 4, 2026 11:53
Wegatriespython
force-pushed
the
single-region-res
branch
from
September 4, 2026 12:21
74db3de to
a2554bb
Compare
Let create_res() build a reference energy system from any Spec and any parameter-data callback, so the same function serves a global model and a single-region model built from its own inputs. Add one-region node code lists for the four OSCE regional groupings, each resolving its region as a single node whose members are the countries of the grouping; get_parent_region() to find the region of a larger code list that contains a country; and subset and as_str options for HasCoords, the first rejecting labels outside a declared set, the second comparing labels as strings.
Wegatriespython
force-pushed
the
single-region-res
branch
from
September 4, 2026 12:52
a2554bb to
7bfe460
Compare
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In the spirit of #551, this PR lets create_res() build a reference energy system from any Spec and any parameter-data callback, so the same function serves a global model and a single-region model built from its own inputs.
Additionally this PR adds one-region node code lists for the four CAEECRES(OSCE) regional groupings, each resolving its region as a single node whose members are the countries of the grouping;
How to review
Drafting so this is part of the OSCE PR stack.
PR checklist