Skip to content

Dependency checking with importlib.metadata #906

@davidhassell

Description

@davidhassell

#902 got rid of dependency version checking in init.py (apart from for cfdm)

However, it could still be done cheaply with the importlib.metadata module (as pointed by @sadielbartholomew: NCAS-CMS/cfdm#362 (comment)):

>>> from importlib import metadata
>>> metadata.version("cftime")
'1.6.4'
>>> metadata.version("netCDF4")
'1.7.2'
>>> metadata.version("dask")
'2025.7.0'

So, do we want to do this?

Related, is making sure that our libraries return nice things in this manner.

This issue should have the same solution as NCAS-CMS/cfdm#364

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions