noaa-ocs-modeling / CoupledModelDriver

coupled model configuration generation
https://CoupledModelDriver.readthedocs.io
Creative Commons Zero v1.0 Universal
4 stars 3 forks source link

Removing python 3.7 support due to xarray #144

Closed SorooshMani-NOAA closed 1 year ago

SorooshMani-NOAA commented 1 year ago

Since the release of importlib-metadata version 5.0 the older (e.g. 0.20.2) versions of xarray that supported Python 3.7 cannot be used. Since those versions are pre-release, it's unlikely that they get fixed. An example of the issue caused by older xarray is:

ensembleperturbation/parsing/adcirc.py:704: in combine_outputs
    directory=runs_directory, file_outputs=file_data_variables, parallel=parallel,
ensembleperturbation/parsing/adcirc.py:6[47](https://github.com/noaa-ocs-modeling/EnsemblePerturbation/actions/runs/3575121349/jobs/6011281573#step:6:48): in parse_adcirc_outputs
    directory, variables=output_class.variables, parallel=parallel,
ensembleperturbation/parsing/adcirc.py:92: in read_directory
    filenames[0], drop_variables=drop_variables
/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/xarray/backends/api.py:479: in open_dataset
    engine = plugins.guess_engine(filename_or_obj)
/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/xarray/backends/plugins.py:110: in guess_engine
    engines = list_engines()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    @functools.lru_cache(maxsize=1)
    def list_engines():
>       entrypoints = entry_points().get("xarray.backends", ())
E       AttributeError: 'EntryPoints' object has no attribute 'get'
codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 64.82%. Comparing base (b052d3f) to head (7358613). Report is 82 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #144 +/- ## ======================================= Coverage 64.82% 64.82% ======================================= Files 35 35 Lines 3863 3863 ======================================= Hits 2504 2504 Misses 1359 1359 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.