CI build failures
Closed this issue · 3 comments
andersy005 commented
Currently, the CI fails due to the entry point functionality. I don't know what's going on... It's worth looking into this ASAP...
entrypoints = [EntryPoint(name='wrf', value='xwrf.io_plugin:WRFBackendEntrypoint', group='xarray.backends'), EntryPoint(name='wrf', ...roup='xarray.backends'), EntryPoint(name='xwrf', value='xwrf.io_plugin:WRFBackendEntrypoint', group='xarray.backends')]
def remove_duplicates(entrypoints):
# sort and group entrypoints by name
entrypoints = sorted(entrypoints, key=lambda ep: ep.name)
entrypoints_grouped = itertools.groupby(entrypoints, key=lambda ep: ep.name)
# check if there are multiple entrypoints for the same name
unique_entrypoints = []
for name, matches in entrypoints_grouped:
matches = list(matches)
unique_entrypoints.append(matches[0])
matches_len = len(matches)
if matches_len > 1:
> selected_module_name = matches[0].module_name
E AttributeError: 'EntryPoint' object has no attribute 'module_name'
/usr/share/miniconda3/envs/xwrf-dev/lib/python3.8/site-packages/xarray/backends/plugins.py:29: AttributeError
xref: https://github.com/NCAR/xwrf/runs/4303994962?check_suite_focus=true
lpilz commented
Is the CI using xarray 0.20.0? If not, it would be worth to update to that. For some earlier versions, the backend functionality is quite buggy.
lpilz commented
Some quick googling showed that it is a known issue pydata/xarray#5944. A PR for this is already merged.
A quick fix seems to be using pytest
with --import-mode="append"
outside the package directory.
andersy005 commented
A quick fix seems to be using pytest with --import-mode="append" outside the package directory.
I ended up opting for excluding the buggy versions...