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 set serialisation & check for lists in attrs #489

Merged
merged 38 commits into from
Oct 23, 2023

Conversation

brynpickering
Copy link
Member

@brynpickering brynpickering commented Oct 23, 2023

Fixes issue(s) #461

Summary of changes in this pull request:

  • Extend the data types that can be included in xarray attributes to include sets, which are serialised as lists.
  • Extend attribute serialisation to those attached to data variables, not just those at the top-level of the xarray dataset.

Reviewer checklist:

  • Test(s) added to cover contribution
  • Documentation updated
  • Changelog updated
  • Coverage maintained or improved

Base automatically changed from feature-public-backend-api to main October 23, 2023 15:02
sjpfenninger
sjpfenninger previously approved these changes Oct 23, 2023
Copy link
Member

@sjpfenninger sjpfenninger left a comment

Choose a reason for hiding this comment

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

Good to go
EDIT: though the tests actually fail, so maybe not

@codecov
Copy link

codecov bot commented Oct 23, 2023

Codecov Report

Merging #489 (dae1bfe) into main (cbed4c8) will decrease coverage by 2.82%.
Report is 2 commits behind head on main.
The diff coverage is 95.87%.

@@            Coverage Diff             @@
##             main     #489      +/-   ##
==========================================
- Coverage   94.98%   92.16%   -2.82%     
==========================================
  Files          31       32       +1     
  Lines        3890     3996     +106     
  Branches        0      955     +955     
==========================================
- Hits         3695     3683      -12     
- Misses        195      196       +1     
- Partials        0      117     +117     
Files Coverage Δ
src/calliope/__init__.py 100.00% <ø> (ø)
src/calliope/_version.py 100.00% <ø> (ø)
src/calliope/backend/helper_functions.py 99.35% <ø> (ø)
src/calliope/backend/where_parser.py 98.43% <ø> (ø)
src/calliope/cli.py 81.67% <100.00%> (ø)
src/calliope/core/__init__.py 100.00% <ø> (ø)
src/calliope/core/attrdict.py 99.50% <ø> (ø)
src/calliope/core/io.py 91.75% <100.00%> (ø)
src/calliope/core/model.py 93.23% <100.00%> (ø)
src/calliope/core/util/generate_runs.py 87.09% <ø> (ø)
... and 22 more

@brynpickering brynpickering merged commit bf87c30 into main Oct 23, 2023
10 of 11 checks passed
@brynpickering brynpickering deleted the fix-netcdf-serialise branch October 23, 2023 15:39
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