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

Adapt to ESMF Python interface module name change #633

Closed
sadielbartholomew opened this issue Apr 13, 2023 · 6 comments · Fixed by #639
Closed

Adapt to ESMF Python interface module name change #633

sadielbartholomew opened this issue Apr 13, 2023 · 6 comments · Fixed by #639
Assignees

Comments

@sadielbartholomew
Copy link
Member

At ESMF release 8.4.0 the Python module changed canonical name, as covered in the relevant Changelog entry:

The Python module name for ESMPy was changed in this release from “ESMF” to “esmpy” for better alignment with Python Enhancement Proposal (PEP) guidelines. This change will require user code changes! ESMPy users will have to do a global search and replace on their scripts to adjust to the module name change. Also notice that the internal ESMF source tree directory structure has changed, moving ./src/addon/ESMPy to ./src/addon/esmpy. This might affect anybody keeping an ESMF repository clone, and maintaining scripts that depend on the internal directory naming.

We therefore need to update all references to the module accordingly. Addressing that should fix the sub-issue of #629.

Currently, the ESMF Python interface is not being picked up within cf, for the above reason, e.g. when conda list confirms I have esmf installed (version 8.4.1 in this case) I see:

>>> import cf
>>> cf.environment()
Platform: Linux-4.15.0-54-generic-x86_64-with-glibc2.10 
HDF5 library: 1.14.0 
netcdf library: 4.9.2 
udunits2 library: /home/sadie/anaconda3/envs/cf-env/lib/libudunits2.so.0 
ESMF: not available
...

Thanks to @ajheaps for the heads up about this!

@sadielbartholomew sadielbartholomew changed the title Adapt to ESMPy module name change Adapt to ESMF Python interface module name change Apr 13, 2023
@davidhassell
Copy link
Collaborator

Thanks for putting this up, Sadie.

Do we want/need to support versions before and after the change?

@sadielbartholomew
Copy link
Member Author

sadielbartholomew commented Apr 13, 2023

Do we want/need to support versions before and after the change?

Ooh, good question! I'd say we probably should support both for a little while, perhaps until our cf version 4.0.0? But from a git grep "ESMF" | wc -l in the <cf repo>/cf/ directory there are presently ~190 references (obviously some being comments and documentation but not all) so it might be a bit ugly to handle. (I don't personally mind the trouble though, as the previous module name did annoy me with it being so unstandardised in its capitalisation 😄 .)

What is your opinion?

@davidhassell
Copy link
Collaborator

Agreed. Do you want to do PR for this, @sadielbartholomew?

@davidhassell
Copy link
Collaborator

It'd be good to get this in for 3.15.0

@sadielbartholomew
Copy link
Member Author

Hi David, I can do, assuming I can start it tomorrow rather than today? I want to sort out the archived docs movement in my half day today...

@davidhassell
Copy link
Collaborator

Of course - no problem.

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 a pull request may close this issue.

2 participants