VForWaTer / metacatalog

Modular metadata management platform for environmental data.
https://vforwater.github.io/metacatalog
GNU General Public License v3.0
4 stars 1 forks source link

Implement ImmutableResultSet.to_dict(orient='uuids') #296

Closed AlexDo1 closed 1 year ago

AlexDo1 commented 1 year ago

Extends the to_dict method of ImmutableResultSets with parameter orient='uuids'.
This returns the dictionary with uuids of all members and the group as keys, this makes it easier to i.e. loop over the uuids / entities of an ImmutableResultSet, which is necessary for WaterML export.

codecov[bot] commented 1 year ago

Codecov Report

Merging #296 (50771ce) into main (f7561b2) will decrease coverage by 0.02%. The diff coverage is 93.33%.

@@            Coverage Diff             @@
##             main     #296      +/-   ##
==========================================
- Coverage   64.52%   64.50%   -0.02%     
==========================================
  Files          75       75              
  Lines        3921     3922       +1     
==========================================
  Hits         2530     2530              
- Misses       1391     1392       +1     
Flag Coverage Δ
e2e 64.50% <93.33%> (-0.02%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
metacatalog/ext/standards_export/extension.py 91.40% <ø> (ø)
metacatalog/util/results.py 74.58% <92.85%> (-0.32%) :arrow_down:
metacatalog/__version__.py 100.00% <100.00%> (ø)
AlexDo1 commented 1 year ago

@mmaelicke I don't want to mess this up again.
I need the code changes from this PR in the waterml branch.
Would I merge the irs_to_dict_orient_uuids branch into the waterml branch or is it better to merge the main branch into the waterml branch?
So how would the PR look like?

Thanks!

mmaelicke commented 1 year ago

main-> waterml is better if irs_to_.. -> main -> waterml is not an option.