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

Refactor code for writing netCDF unlimited dimensions #267

Merged
merged 2 commits into from
Aug 30, 2023

Conversation

davidhassell
Copy link
Contributor

@davidhassell davidhassell commented Aug 30, 2023

Refactor code for writing netCDF unlimited dimensions: Create a wrapper method in netcdfwrite.py to call cfdmimplementation.nc_is_unlimited_axis, rather than than the latter being called directly. (The wrapper already existed, but was not called.)

This is so that subclasses can modify the behaviour if needs be. E.g., cf-python needs to never write unlimited dimension to CFA-netCDF files.

@codecov
Copy link

codecov bot commented Aug 30, 2023

Codecov Report

Merging #267 (14f77a9) into main (142accf) will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #267      +/-   ##
==========================================
+ Coverage   87.35%   87.36%   +0.02%     
==========================================
  Files         125      125              
  Lines       12887    12887              
==========================================
+ Hits        11256    11258       +2     
+ Misses       1631     1629       -2     
Flag Coverage Δ
unittests 87.36% <100.00%> (+0.02%) ⬆️

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

Files Changed Coverage Δ
cfdm/read_write/netcdf/netcdfwrite.py 87.06% <100.00%> (+0.07%) ⬆️

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@sadielbartholomew sadielbartholomew left a comment

Choose a reason for hiding this comment

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

Makes the relevant code a bit more readable and tidy. All working, still. Great, please merge.

@davidhassell davidhassell merged commit be9af6b into NCAS-CMS:main Aug 30, 2023
12 of 39 checks passed
@davidhassell davidhassell deleted the netcdf-unlimited-dimension branch August 30, 2023 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants