-
Notifications
You must be signed in to change notification settings - Fork 28
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
Formatting and refactoring #110
Conversation
@@ -1,7 +1,7 @@ | |||
import os | |||
|
|||
import pandas as pd | |||
from powersimdata.network.usa_tamu.constants.zones import id2state | |||
from powersimdata.network.usa_tamu.constants.zones import id2abv |
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.
you can use from powersimdata.network.usa_tamu.constants.zones import abv
@@ -47,7 +46,7 @@ def get_pv_tracking_ratio_state(pv_info, state): | |||
raise TypeError("state must be a list") | |||
|
|||
for s in state: | |||
if s not in set(id2state.values()): | |||
if s not in set(id2abv.values()): |
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.
Then if s not in abv
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 seem to be switching from state to state abbreviation, is that ok?
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.
It was always abbreviation. The variable name was poorly chosen
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.
Looks great. I also reformatted the docstring in demanddata
Purpose
Did some preliminary cleanup that can be reviewed separately from library changes. Fix docstring indentation, powersimdata imports, and refactor how we create the NREL url for downloading data.
What it does
Mostly described above, plus changing to https since I was getting errors when running the notebook. Also updated the setup.py, which adds the solar data file since I needed it for the notebook.
Time to review
5 min - I tested the url refactoring manually, and was using it in my other branch where it works successfully