Skip to content
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

Add a raw argument to the iamc.tabulate() #38

Merged
merged 5 commits into from
Jan 22, 2024

Conversation

danielhuppmann
Copy link
Member

As discussed today, this PR adds an argument raw to the iamc.tabulate() endpoint - alternative suggestions for the name welcome...

At the end of a series PRs, the iamc endpoints should take (add(), remove()) and return (tabulate()) both the ixmp4-db-internal format (with columns type, step_year, step_datetime, step_category) or the standard IAMC format with columns year, time and/or subannual.

This PR cleans up the datapoints-tets and adds the feature to correctly return the datapoints in standard IAMC format. In the interest of keeping this PR manageable, I did not add more changes.

@danielhuppmann danielhuppmann requested a review from meksor January 9, 2024 15:29
@danielhuppmann danielhuppmann self-assigned this Jan 9, 2024
Copy link
Contributor

@meksor meksor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, not sure about making the default different, my guess is that the dependants will rely on the current format so it is probably better to make raw=True the default or rename the argument to iamc_format and default to false.
Also, there seem to be misordered imports...

@danielhuppmann
Copy link
Member Author

I'm a bit skeptical of having an argument iamc_format within the iamc namespace - seems confusing to me.

Also, I don't think that there are any dependants yet anyway at the facade level, pyam will be the first. And I see a strong case for making the default such that it is like the format that people are used to, both for input to and return from ixmp4.

Copy link
Contributor

@meksor meksor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, right sorry, I was confused and thought this was in the db layer.
LGTM in that case!

@danielhuppmann danielhuppmann marked this pull request as ready for review January 22, 2024 12:26
@danielhuppmann danielhuppmann merged commit 5c8f353 into iiasa:main Jan 22, 2024
4 checks passed
@danielhuppmann danielhuppmann deleted the iamc-raw branch January 22, 2024 12:29
glatterf42 pushed a commit that referenced this pull request Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants