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

Tests fail without scipy #2275

Closed
greglucas opened this issue Oct 15, 2023 · 2 comments · Fixed by #2282
Closed

Tests fail without scipy #2275

greglucas opened this issue Oct 15, 2023 · 2 comments · Fixed by #2282

Comments

@greglucas
Copy link
Contributor

Description

Doing a clean install of Cartopy with pip install .[test] ends up with 5 failures and 3 errors due to missing scipy imports. We could either make these optional tests, or add scipy to the testing optional install. Further, would we want to add the other optional things to the test installation? test = ["cartopy[ows,plotting,speedups]", ... i.e. should the testing option be as complete as possible, or should those truly only be if people want to test those branches?

FAILED lib/cartopy/tests/mpl/test_mpl_integration.py::test_quiver_regrid - ImportError: Regridding vectors requires scipy.
FAILED lib/cartopy/tests/mpl/test_mpl_integration.py::test_quiver_regrid_with_extent - ImportError: Regridding vectors requires scipy.
FAILED lib/cartopy/tests/mpl/test_mpl_integration.py::test_barbs_regrid - ImportError: Regridding vectors requires scipy.
FAILED lib/cartopy/tests/mpl/test_mpl_integration.py::test_barbs_regrid_with_extent - ImportError: Regridding vectors requires scipy.
FAILED lib/cartopy/tests/mpl/test_mpl_integration.py::test_streamplot - ImportError: Regridding vectors requires scipy.
ERROR lib/cartopy/tests/test_img_transform.py
ERROR lib/cartopy/tests/test_vector_transform.py
ERROR lib/cartopy/tests/mpl/test_contour.py
@dopplershift
Copy link
Contributor

dopplershift commented Oct 17, 2023

If the library can work fully without scipy installed, then I'd mark those tests to skip if the library isn't installed. pytest.importorskip is probably helpful here.

@lgolston
Copy link
Contributor

I also think skipping the scipy tests is reasonable in this situation, given that: this is what is already done currently with fiona, and the CI test suite runs with the optional dependencies so those tests aren't neglected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants