-
Notifications
You must be signed in to change notification settings - Fork 59
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
Alternative to udunitspy #62
Comments
FWIW this exists http://coastwatch.pfeg.noaa.gov/erddap/convert/units.html |
Webservice? Awesome! |
@daf I went ahead and made a "iris_units" module from the iris package as discussed in #81. It is light weight and depends only on udunits2 and netcdf4-python, no swig! The installation is easy and works on windows, see our conda package. However, I do not recommend using this yet. There will be some changes to avoid fork-fragmentation. Meanwhile, here is an example comparing http://nbviewer.ipython.org/gist/ocefpaf/60ecac928612f5ae8fed All that is required for compliance-checker is covered there. |
@ocefpaf please add the best repo for the units module you're working on to this issue thread so that the team can look into integrating it. Is it SciTools/cf_units or ocefpaf/cf_units ? |
https://github.com/ocefpaf/cf_units is my working fork of the official https://github.com/SciTools/cf_units. The transition should be smooth (brave last words). I think I got almost of all of |
My only issues with this approach are:
I'm working on a lighter pure python implementation for udunits, but I don't have any idea when it will be done; but it will work on Windows and requires no compiled libraries (including XML). |
Yes, but I disagree that this is a bad thing. Having a well established and widely used library (that is maintained by UNIDATA!) as a dependencies is a 👍 and not a 👎 . Also, by depending on udunits you remove the burden of maintaining/copying the xml definitions to a new library.
Can't comment on that, never had that issue using ctypes. All I can say is that The swig wrapper around udunitspy does not work on Windows at the moment. I believe that All that said:
Hey, I am all for it! 👍 |
And here is the advantage of joining forces with other groups supporting open source libraries: |
The udunitspy library is a swig wrapper (hard to install) around udunits, and udunits does not work/install on Windows properly.
@dpsnowden suggests perhaps making a pure python port (one may already exist) - I briefly looked and it seemed reasonable.
@abirger suggests perhaps a udunits webservice that can be optionally hit from the compliance-checker. We could make udunitspy an optional dependency and react to import failure in code properly.
The text was updated successfully, but these errors were encountered: