-
Notifications
You must be signed in to change notification settings - Fork 14
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
Extend the to_excel()
method and add to CLI
#331
Extend the to_excel()
method and add to CLI
#331
Conversation
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 very nice, thanks a lot for this.
A few comments and questions in line.
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.
One small remark, after that good to merge from my side.
tests/test_definition.py
Outdated
dsd = DataStructureDefinition(TEST_DATA_DIR / "general-config" / "definitions") | ||
dsd.to_excel(file) | ||
|
||
obs = pd.ExcelFile(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.
Although not a critical as in the pyam issue IAMconsortium/pyam#817, I'd also use a context manager here to make sure the file is properly closed at the end of the test:
obs = pd.ExcelFile(file) | |
with pd.ExcelFile(file) as obs: |
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.
Implemented, thanks for the suggestion
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.
Good to be merged
This PR adds extends the method
DataStructureDefinition.to_excel()
to include all dimensions and add an overview-sheet with project name, a timestamp and urls/commits/timestamps of external repositories.