-
Notifications
You must be signed in to change notification settings - Fork 69
code: Retrieve .csv from_url for branches in development/master #251
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
base: master
Are you sure you want to change the base?
Conversation
|
No, |
I'll let @lkstrp decide, but it seems like changed line noise to me. |
Ah maybe should have read here, before merging #252 As discussed, I am a bit against adding |
""" | ||
from . import latest_release | ||
from . import __version__ |
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 don't like non absolute imports and not adding version.py
as discussed is on purpose?
|
||
url: str = "" | ||
if any(substr in __version__ for substr in ["dev", "post"]): | ||
# Detect running from a development installation - retrieve data from the HEAD of the |
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.
With version.py
all the git stuff below would also not be needed, is it? Why would you want to retrieve powerplants.csv
from an dev branch? Not sure if we wanna have an extra dependency for that
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.
if the version.py
fixes things, then I would be fine to remove.
I was thinking about the case where someone is installing from master
and suddenly receiving the wrong powerplants.csv
(because it is taken from the tag version).
I guess packaging and shipping the powerplants.csv
would be an alternative as well, instead of retrieving it from a semi-hardcoded URL.
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.
But powerplants.csv
is only automatically update per release, so even when installing from master, you would retrieve the same file
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.
hm, I didn't consider this
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.
If we don't want to change this, then I guess we can close here
When working on a development branch or with the
master
branch installed in editable modeuv pip install -e .
, the current logic retrievespowerplants.csv
from the past minor release (not past patch).This PR changes the behavior, such that in case of a development branch or the
master
branch, the data is always retrieved from the currentHEAD
of the branch that is on GitHub.Will fail if the branch is not in the
PyPSA/powerplantmatching
repo in GitHub.Changes proposed in this Pull Request
Checklist
doc
.doc/release_notes.rst
of the upcoming release is included.