-
Notifications
You must be signed in to change notification settings - Fork 18
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
Added save_csv_combined_output option #43
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.
Hi @gabriel-abrahao, that's great to hear you'll be contributing!
Making a PR like this works well for me.
And this looks like a straightforward addition.
The only thing I can see is that we're (for the first time) adding an option to clim_cli()
which is not passed on to climate_assessment().
@phackstock and @znicholls any objections or thoughts from your side?
For in the future, if you're planning any larger modifications, it might be good to have a discussion before starting to discuss the design (either in a call, or on GitHub through an Issue or Discussion).
@@ -245,7 +245,15 @@ | |||
type=bool, | |||
show_default=True, | |||
) | |||
|
|||
save_csv_combined_output_option = click.option( | |||
"--save-csv-combined-output", |
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.
maybe call it save_csv_combined_climate_output_option
to be a bit more descriptive (it does not include emissions data, right?) and align better with save_raw_climate_output_option
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 does include emissions, it's the rawoutput
file. That's why I went for "combined", but suggestions on a more descriptive name are appreciated
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.
Ah yes you're right.
Okay, rather then thinking about it too long, I think what can simply do is add a bit more description in the docs: #44
Can be done after we merge this PR.
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.
All fine for me (will write a longer comment below).
Can you please add at least one test of this.
This is great, but also a bit scary, mainly because I would like to re-write lots of this over the coming months/years so please don't get too attached to the idea that this is a stable interface. We will try and use deprecation warnings etc., but there's lots of things we could have done better/differently which may require us to break the current API.
We don't really have a contributing guide yet so will be good enough for now. If we change that, we'll let you know. As I said above, if you could add a test that would be great.
This is good advice. I'm happy with issues unless it is huge, in which case a call is helpful (but I can't think of any cases where that is needed). |
All good notes and heads up by @znicholls. P.S. to satisfy the linters, see: https://climate-assessment.readthedocs.io/en/latest/dev.html#formatting-code
|
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.
No objections from my side.
c4ccfaf
Thank you all!
Sure, we are aware of that, and we are (maybe a bit too much) used to freezing to a very old versions if it comes to that in the future. I'm also trying to always invoke the
I added a test that checks if both the XLS and the CSV
Thanks, I'll absolutely do that. But I'm not really expecting to need anything much more complex than this. One other thing that could be useful would be exposing some internal functions (both from here and from the other SCM-related packages), but I'll ask as an issue in the relevant packages if it comes to 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.
lgtm, some minor clarifications which I think would help
Co-authored-by: Zeb Nicholls <[email protected]>
Co-authored-by: Zeb Nicholls <[email protected]>
Co-authored-by: Zeb Nicholls <[email protected]>
Co-authored-by: Zeb Nicholls <[email protected]>
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.
lgtm, assuming CI passes let's merge
Hi all,
We at PIK have started integrating
climate-assessment
in some of our workflows, such as in the REMIND model. For that, adding some minor new features to the package would be really helpful, which I aim to implement. I don't know what's your policy for that, but in case PRs are the proper channel, here's one.It simply adds an option in
clim_cli
to also write raw output as CSV besides the XLSX standard. Reading excel can be pretty cumbersome for some of our applications.All tests in
tests/integration
have passed, is this sufficient for a PR?Thank you regardless, and please let me know if I should be using another channel for this,
Gabriel
CHANGELOG.rst
added (single line such as:(`#XX <https://github.com/iiasa/climate-assessment/pull/XX>`_) Added feature which does something
)