Skip to content

Conversation

@davidhassell
Copy link
Contributor

@davidhassell davidhassell commented Apr 4, 2023

As discussed off-line, these changes facilitate CFA in cf-python, implemented in NCAS-CMS/cf-python#630, but do not change the API or functionality of cfdm.

Edit 2023-04-17: Notes on changes:

  • cfdmimplementation.py - minor changes to reflect API changes elsewhere, and some new utility methods.
  • data.py - minor changes/bug fixes
  • arraymixin.py - changes to support new filename/units API
  • filearraymixin.py - new file to contain mixin methods that apply to all arrays stored in files
  • netcdfarray - deprecation of varid in favour of address; updated open method (that allows for multiple files); new "groups" API.
  • subarray.py - bug fix
  • subsampledsubarray.py - bug fix
  • functions.py - improvements to account for file URIs
  • netcdf.py - cosmetic: the underscore class is now imported elsewhere, so can drop the _.
  • netcdfread.py - added logic to detect CFA files, even though CFA can not be read (... until they're part of CF :)); Added _customize_auxiliary_coordinates and _customize_field_ancillaries methods for use by cf-python; Accounted for NetCDFArray API changes.
  • netcdfwrite.py - bit of a mess ... cosmetic changes; new keyward args to _customize_createVariable (needed by cf-python); Generally passing round more info so that cf-python can pick up on it.

davidhassell and others added 13 commits April 17, 2023 18:49
Co-authored-by: Sadie L. Bartholomew <sadie.bartholomew@ncas.ac.uk>
Co-authored-by: Sadie L. Bartholomew <sadie.bartholomew@ncas.ac.uk>
Co-authored-by: Sadie L. Bartholomew <sadie.bartholomew@ncas.ac.uk>
Co-authored-by: Sadie L. Bartholomew <sadie.bartholomew@ncas.ac.uk>
Co-authored-by: Sadie L. Bartholomew <sadie.bartholomew@ncas.ac.uk>
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.

Just some typos from recent commits to blitz.

davidhassell and others added 5 commits April 18, 2023 11:05
Co-authored-by: Sadie L. Bartholomew <sadie.bartholomew@ncas.ac.uk>
Co-authored-by: Sadie L. Bartholomew <sadie.bartholomew@ncas.ac.uk>
Co-authored-by: Sadie L. Bartholomew <sadie.bartholomew@ncas.ac.uk>
Co-authored-by: Sadie L. Bartholomew <sadie.bartholomew@ncas.ac.uk>
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.

A few more from a new commit, before I approve the PR overall!

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.

Thanks for addressing all of my feedback. I've done a quick sanity check that everything still functions as it should after the new commits, with the full cfdm test suite still passing locally. I think black formatting requires one trivial change to be satisfied, namely:

diff --git a/cfdm/read_write/netcdf/netcdfread.py b/cfdm/read_write/netcdf/netcdfread.py
index c1ea1a78f..8817ccbba 100644
--- a/cfdm/read_write/netcdf/netcdfread.py
+++ b/cfdm/read_write/netcdf/netcdfread.py
@@ -5474,7 +5474,6 @@ class NetCDFRead(IORead):
                     "calendar"
                 )
 
-
         # Store the missing value indicators
         missing_values = {}
         for attr in (

and there's my two new typo fixes to include, but once those minor changes are made I am happy, so please make those and then merge!

davidhassell and others added 3 commits April 18, 2023 15:01
Co-authored-by: Sadie L. Bartholomew <sadie.bartholomew@ncas.ac.uk>
Co-authored-by: Sadie L. Bartholomew <sadie.bartholomew@ncas.ac.uk>
@davidhassell
Copy link
Contributor Author

Great, thanks Sadie. Typos merges and blank line removed. Merging ...

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