-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gb/rrp shapes #93
Gb/rrp shapes #93
Conversation
Added negative tests for these cases.
Cool! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you still planning on making a basic plant aggregator or do you want me to do that as a parent class for PlexosPlants? I feel like it would be useful, but its still unclear how applicable it is for this workflow.
reVX/plexos/rev_reeds_plexos.py
Outdated
from warnings import warn | ||
|
||
from rex.rechunk_h5 import to_records_array | ||
from rex.utilities.execution import SpawnProcessPool | ||
from rex.utilities.utilities import parse_table | ||
|
||
from reVX.utilities.region import RegionClassifier |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Silly i know but I think we should rename the module region_classifier
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
like the file? yes, agreed!
force_full_build : bool | ||
Flag to ensure the full requested buildout is built at each SC | ||
point. If True, the remainder of the requested build will always | ||
be built at the last resource gid in the sc point. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have a check for the 1e6 hack? I.e. what if the requested build is > the capacity of the last resource gid? Do we just multiply the cf of the last resource gid by the requested capacity?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah this flag turns on the 1e6 hack and i added a negative test with the flag=false to ensure that it will fail if the requested build > available capacity within one watt. If this flag is true, the last GID in the supply curve point is given a 1e6MW capacity ("the remainder of the requested build will always be built at the last resource gid in the sc point")
plexos_nodes = parse_table(plexos_nodes) | ||
plexos_nodes = DataCleaner.pre_filter_plexos_meta(plexos_nodes) | ||
|
||
if (isinstance(plexos_nodes, str) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not add a sub if/else under isisnstance(plexos_nodes, str)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same effect isnt it? And adds "complexity" in the form of more levels. Bad incentives by pylint!!
and plexos_nodes.endswith(('.csv', '.json'))): | ||
plexos_nodes = parse_table(plexos_nodes) | ||
elif isinstance(plexos_nodes, str) and plexos_nodes.endswith('.shp'): | ||
rc = RegionClassifier(self.sc_build, plexos_nodes, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we want to un-hide RegionsClassifier._regions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah i'll add a property
reVX/plexos/rev_reeds_plexos.py
Outdated
plexos_nodes['plexos_id'] = np.arange(len(plexos_nodes)) | ||
|
||
elif not isinstance(plexos_nodes, pd.DataFrame): | ||
msg = ('Did not recognize plexos_nodes input: {}' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should make the error message more specific, i.e. expecting x, y, or z, but got:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep can do!
Codecov Report
@@ Coverage Diff @@
## master #93 +/- ##
==========================================
+ Coverage 78.85% 78.97% +0.12%
==========================================
Files 68 67 -1
Lines 7253 7368 +115
==========================================
+ Hits 5719 5819 +100
- Misses 1534 1549 +15
Flags with carried forward coverage won't be shown. Click here to find out more.
|
No description provided.