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

Fix handling of duplicate variableids #31

Merged
merged 5 commits into from
Dec 3, 2021
Merged

Conversation

mikapfl
Copy link
Member

@mikapfl mikapfl commented Dec 2, 2021

Closes: #28

Minimal changes to fix the handling of duplicate variable IDs. This entails changes to the public
API! In particular, UNFCCCSingleCategoryApiReader.variables now has a generic index
instead of using the variableId as index. Also, the query function now
correctly restricts queries if category_ids are provided and correctly fills
all categories with data for a multi-category variable.

This should lead to more correct and complete data returned in some situations.

NB: I also checked again if the same data is returned when using different category_ids for the same category, and no. The two "other" categories (with or without lulucf) are very different. I hope it is correct to return both as the same category when querying? I don't know, though.

@codecov
Copy link

codecov bot commented Dec 2, 2021

Codecov Report

Merging #31 (65c87e6) into main (8348b0a) will increase coverage by 0.45%.
The diff coverage is 94.11%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #31      +/-   ##
==========================================
+ Coverage   92.82%   93.27%   +0.45%     
==========================================
  Files           3        3              
  Lines         209      223      +14     
==========================================
+ Hits          194      208      +14     
  Misses         15       15              
Impacted Files Coverage Δ
unfccc_di_api/unfccc_di_api.py 91.80% <93.33%> (+0.47%) ⬆️
unfccc_di_api/tests/test_unfccc_di_api.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8348b0a...65c87e6. Read the comment docs.

@mikapfl mikapfl merged commit e98128f into main Dec 3, 2021
@mikapfl mikapfl deleted the fix-duplicate-variableids branch December 3, 2021 10:22
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.

Properly deal with duplicate variableIds
1 participant