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

CDFlib pinned to 0.4.9 #3

Open
sapols opened this issue Mar 11, 2024 · 1 comment
Open

CDFlib pinned to 0.4.9 #3

sapols opened this issue Mar 11, 2024 · 1 comment

Comments

@sapols
Copy link
Contributor

sapols commented Mar 11, 2024

CDFlib made a major release 1.0.0 with breaking changes June 2023. It's now up to 1.2.6 as of this writing.

Some PyHC packages don't yet support the new major release so we've pinned the CDFlib version to 0.4.9.

pySPEDAS is the biggest package requiring <1.0.0.
GeospaceLAB is pinned to 0.6.1 because after that it requires >=1.0.0.

@sapols
Copy link
Contributor Author

sapols commented Apr 4, 2024

Viresclient found a solution to support cdflib before and after the 1.0 release (see this commit):

    @staticmethod
    def _get_attr_or_key(obj, attr):
        # Used to work around cdflib<1 & >=1 support
        # cdflib>=1 introduces dataclasses in place of some dicts
        if isinstance(obj, dict):
            return obj.get(attr, None)
        else:
            return getattr(obj, attr, None)

This is much nicer than how e.g. GeospaceLAB did it, which was to simply switch from the old syntax to the new (hence issue #4). I think PyHC should recommend other packages that use cdflib do the same:

  • pySPEDAS (>=0.3.9,<1.0.0) -> (now >=1.2.0)
  • PyTplot (any)
  • PyTplot-mpl-temp (<1.0.0) -> (now >=1.2.0)
  • aidapy (any)
  • geospaceLAB (>=0.3.20) -> (now >=1.2.3)
  • solo-epd-loader (any)
  • themisasi (>=0.3.13)
  • viresclient (>=0.3.9)

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

No branches or pull requests

1 participant