Repository navigation
Closed
Labels
Description
Description
While testing the Astropy Development Version, some tests failed running Pytest.
Expected behavior
All the tests should have passed or otherwise xfailed.
How to Reproduce
-
Setup
Astropy Development Versionas stated here. -
Then run the following command:
pip install -e ".[test]"
-
The test completes with
FAILURES.
======================================================================== short test summary info ========================================================================
FAILED astropy/coordinates/tests/test_representation.py::TestCartesianRepresentation::test_transform_non_contiguous_matrix - assert False
FAILED astropy/visualization/tests/test_units.py::test_units - ValueError: Failed to find font DejaVu Sans:style=normal:variant=normal:weight=normal:stretch=normal:size=10.0, and fallback to the default font was disabled
FAILED astropy/visualization/wcsaxes/tests/test_display_world_coordinates.py::TestDisplayWorldCoordinate::test_cube_coords - ValueError: Failed to find font DejaVu Sans:style=normal:variant=normal:weight=normal:stretch=normal:size=10.0, and fallback to the default font was disabled
FAILED astropy/visualization/wcsaxes/tests/test_display_world_coordinates.py::TestDisplayWorldCoordinate::test_cube_coords_uncorr_slicing - ValueError: Failed to find font DejaVu Sans:style=normal:variant=normal:weight=normal:stretch=normal:size=10.0, and fallback to the default font was disabled
FAILED astropy/visualization/wcsaxes/tests/test_misc.py::test_slicing_warnings - ValueError: Failed to find font DejaVu Sans:style=normal:variant=normal:weight=normal:stretch=normal:size=10.0, and fallback to the default font was disabled
FAILED astropy/visualization/wcsaxes/tests/test_misc.py::test_grid_type_contours_transform - ValueError: Failed to find font DejaVu Sans:style=normal:variant=normal:weight=normal:stretch=normal:size=10.0, and fallback to the default font was disabled
FAILED astropy/visualization/wcsaxes/tests/test_misc.py::test_bbox_size[0.2] - assert False
FAILED astropy/visualization/wcsaxes/tests/test_misc.py::test_bbox_size[1e-08] - assert False
================================================= 8 failed, 28248 passed, 317 skipped, 246 xfailed in 874.83s (0:14:34) =================================================Versions
Windows-10-10.0.22631-SP0
Python 3.11.5 | packaged by Anaconda, Inc. | (main, Sep 11 2023, 13:26:23) [MSC v.1916 64 bit (AMD64)]
astropy 6.1.dev238+gf5909190d5
Numpy 1.24.3
pyerfa 2.0.0
Scipy 1.11.1
Matplotlib 3.8.2
Activity
github-actions commentedon Dec 23, 2023
Welcome to Astropy 👋 and thank you for your first issue!
A project member will respond to you as soon as possible; in the meantime, please double-check the guidelines for submitting issues and make sure you've provided the requested details.
GitHub issues in the Astropy repository are used to track bug reports and feature requests; If your issue poses a question about how to use Astropy, please instead raise your question in the Astropy Discourse user forum and close this issue.
If you feel that this issue has not been responded to in a timely manner, please send a message directly to the development mailing list. If the issue is urgent or sensitive in nature (e.g., a security vulnerability) please send an e-mail directly to the private e-mail [email protected].
MridulS commentedon Dec 23, 2023
Interesting, this is a matplotlib issue.
Can you try running this code in a python console in your dev env:
tanvincible commentedon Dec 24, 2023
@MridulS - I tried accessing the cache directory of
Matplotlib, seems like it doesn't exist in my system.I checked the
Matplotlibdirectory and found only one filefontlist-v330.json.MridulS commentedon Dec 25, 2023
Hmm, could you just try doing the installation again? (start from scratch and remove the environment). This is probably a matplotlib installation issue on windows, not an astropy one.
eerovaher commentedon Dec 25, 2023
The one test that fails in
coordinatesis a regression test for a bug inpyerfathat was fixed inpyerfa2.0.1.1 (see #15511). Our CI tests use the latest version ofpyerfa, so the test succeeds, butastropyalso supports older versions without the bugfix:astropy/pyproject.toml
Line 43 in b50e9cf
astropydevelopment version is properly installed. There are two simple possible solutions to this: 1) skip the test if the installed version ofpyerfadoesn't have the bugfix, or 2) update the minimum requiredpyerfaversion. Both would be simple to implement, but I'm not sure which of the two would be preferable.The test is not failing in our
oldestdepsCI job because that job also usespyerfa2.0.1.1 despite that being the latest version:astropy/tox.ini
Line 72 in b50e9cf
To me it looks like the
oldestdepsjob isn't properly configured, buttoxconfiguration is not really my area of responsibility, so I'm not sure if any changes should be made there.eerovaher commentedon Jan 10, 2024
I don't know about the failures regarding
matplotlib, but the problem incoordinatesis real.mhvk commentedon Jan 11, 2024
@eerovaher - nice sleuthing! I think we should go for your second suggestion, of updating our minimum requirement.
pyerfais a bit special compared tonumpy, etc., in that we are in control of it (used to be developed inside astropy), and I think the particular bug could bite people in ways that are very opague.mhvk commentedon Jan 11, 2024
See #15865 for discussion about how we should set
olddestdeps(and version limits more generally).eerovaher commentedon Mar 8, 2024
The problem in
coordinateshas been fixed and it looks like the problems invisualizationwere not caused by us.