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

CI build failures #19

Closed
andersy005 opened this issue Nov 23, 2021 · 3 comments · Fixed by #21
Closed

CI build failures #19

andersy005 opened this issue Nov 23, 2021 · 3 comments · Fixed by #21
Labels

Comments

@andersy005
Copy link
Member

andersy005 commented Nov 23, 2021

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

@andersy005 andersy005 added the CI label Nov 23, 2021
@andersy005 andersy005 added this to Xdev Nov 24, 2021
@andersy005 andersy005 moved this to 🌳 Todo in Xdev Nov 24, 2021
@lpilz
Copy link
Collaborator

lpilz commented Nov 24, 2021

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
Copy link
Collaborator

lpilz commented Nov 24, 2021

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.

Repository owner moved this from 🌳 Todo to ✅ Done in Xdev Nov 28, 2021
@andersy005
Copy link
Member Author

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...

@kmpaul kmpaul moved this to Done in xWRF Dec 16, 2021
@kmpaul kmpaul added this to xWRF Dec 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants