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

Remove "edition" from GLOBAL_ATTRIBUTES_KEYS #234

Closed
wants to merge 2 commits into from
Closed

Remove "edition" from GLOBAL_ATTRIBUTES_KEYS #234

wants to merge 2 commits into from

Conversation

StephanSiemen
Copy link
Contributor

As identified in issue #232, the GRIB edition should not be an global attribute key.

This is a duplicate of #233, because more changes are necessary to not have tests fail.

@codecov-commenter
Copy link

Codecov Report

Merging #234 (aa4a7bf) into master (843bf91) will decrease coverage by 37.64%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master     #234       +/-   ##
===========================================
- Coverage   92.24%   54.59%   -37.65%     
===========================================
  Files          25       25               
  Lines        1754     1740       -14     
  Branches      206      206               
===========================================
- Hits         1618      950      -668     
- Misses        112      774      +662     
+ Partials       24       16        -8     
Impacted Files Coverage Δ
tests/test_20_messages.py 99.25% <ø> (-0.02%) ⬇️
tests/test_30_dataset.py 100.00% <ø> (ø)
tests/test_40_xarray_store.py 4.91% <ø> (-95.09%) ⬇️
cfgrib/dataset.py 90.81% <100.00%> (-8.13%) ⬇️
cf2cdm/cfunits.py 0.00% <0.00%> (-100.00%) ⬇️
cf2cdm/__init__.py 0.00% <0.00%> (-100.00%) ⬇️
cf2cdm/cfcoords.py 0.00% <0.00%> (-100.00%) ⬇️
cf2cdm/datamodels.py 0.00% <0.00%> (-100.00%) ⬇️
tests/test_20_cfcoords.py 5.95% <0.00%> (-94.05%) ⬇️
tests/test_50_xarray_getitem.py 7.31% <0.00%> (-92.69%) ⬇️
... and 12 more

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 843bf91...aa4a7bf. Read the comment docs.

@iainrussell
Copy link
Member

@StephanSiemen , do you get any test failures when you run pytest? I get the same errors as are shown un the Ubuntu py3.8 tests on github.

@FussyDuck
Copy link

FussyDuck commented May 25, 2021

CLA assistant check
All committers have signed the CLA.

@iainrussell
Copy link
Member

I don't really like just removing tests, and some of those were testing something that was not being tested elsewhere, so I put some substitute tests in place. These are not related to the failing tests, they are only in test_40_xarray_store.py

@iainrussell
Copy link
Member

My fear is that cfgrib is storing and using the edition so that it can be used when writing an xarray to GRIB. And it could be important.... that said, the functionality to write GRIB is broken anyway with modern xarray/pandas versions.

@iainrussell
Copy link
Member

@alexamici , what do you think about this PR, and is the GRIB edition important for writing xarrays back as GRIB (it seems to be)?

@alexamici
Copy link
Contributor

@iainrussell if you want to save the same GRIB file as the input it is needed to keep the GRIB_edition attribute. Otherwise it may be added back inside to_grib I think.

It is not strictly needed by xarray, but cfgrib probably assumes that it is present at save time.

@StephanSiemen StephanSiemen closed this by deleting the head repository Jul 19, 2023
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.

5 participants