BDNYC / sedkit

Spectral energy distribution construction and analysis tools
MIT License
17 stars 13 forks source link

Trying to get tests to run under Python 3.11 #99

Closed kelle closed 1 month ago

kelle commented 1 month ago

Fix the test configuration

kelle commented 1 month ago

WOOHOO - Got tests to look basically the same on CI as locally!!

kelle commented 1 month ago

Tests now failing almost the same locally as in CI. Calling this a win and merging these setup changes. Individual failures can be addressed one at a time or at least in a different PR.

CI:

============================= test session starts ==============================
platform darwin -- Python 3.[11](https://github.com/BDNYC/sedkit/actions/runs/10824327929/job/30031362768?pr=99#step:5:12).9, pytest-8.3.3, pluggy-1.5.0
rootdir: /Users/runner/work/sedkit/sedkit
configfile: pyproject.toml
collected 93 items
sedkit/tests/test_catalog.py .                                           [  1%]
sedkit/tests/test_helpers.py .                                           [  2%]
sedkit/tests/test_isochrone.py ....                                      [  6%]
sedkit/tests/test_modelgrid.py ..F.......                                [ 17%]
sedkit/tests/test_query.py ...                                           [ 20%]
sedkit/tests/test_relations.py FF..F..                                   [ 27%]
sedkit/tests/test_sed.py ..F.F.F.FF......                                [ 45%]
sedkit/tests/test_spectrum.py .....FF....F......                         [ 64%]
sedkit/tests/test_uncertainties.py ...........                           [ 76%]
sedkit/tests/test_utilities.py ......................                    [100%]
=========================== short test summary info ============================
FAILED sedkit/tests/test_modelgrid.py::TestModelGrid::test_photometry - ValueError: cannot set a row with mismatched columns
FAILED sedkit/tests/test_relations.py::TestSpectralTypeRadius::test_get_radius_bounds - TypeError: VizierClass.query_constraints_async() takes 1 positional argument but 2 were given
FAILED sedkit/tests/test_relations.py::TestSpectralTypeRadius::test_radius_generate - TypeError: VizierClass.query_constraints_async() takes 1 positional argument but 2 were given
FAILED sedkit/tests/test_relations.py::TestRelation::test_evaluate - ValueError: Quantity truthiness is ambiguous, especially for logarithmic units and temperatures. Use explicit comparisons.
FAILED sedkit/tests/test_sed.py::TestSED::test_add_spectrum - ValueError: operands could not be broadcast together with shapes (36,) (35,)
FAILED sedkit/tests/test_sed.py::TestSED::test_compare_model - ValueError: f1[8846] and f2[4693]. They must be the same length.
FAILED sedkit/tests/test_sed.py::TestSED::test_find_SDSS_spectra - ValueError: Quantity truthiness is ambiguous, especially for logarithmic units and temperatures. Use explicit comparisons.
FAILED sedkit/tests/test_sed.py::TestSED::test_fit_modelgrid - ValueError: None: Please choose valid relation to infer the radius. Try []
FAILED sedkit/tests/test_sed.py::TestSED::test_fit_spectral_type - ValueError: None: Please choose valid relation to infer the radius. Try []
FAILED sedkit/tests/test_spectrum.py::TestSpectrum::test_interpolate - ValueError: operands could not be broadcast together with shapes (230,) (115,)
FAILED sedkit/tests/test_spectrum.py::TestSpectrum::test_model_fit - ValueError: 5.5 outside of 'logg' parameter space [5.0, 5.0]
FAILED sedkit/tests/test_spectrum.py::TestSpectrum::test_synthetic_mag - RecursionError: maximum recursion depth exceeded while calling a Python object
=========== [12](https://github.com/BDNYC/sedkit/actions/runs/10824327929/job/30031362768?pr=99#step:5:13) failed, 81 passed, 1082 warnings in 138.63s (0:02:18) ===========

Locally:

================================== test session starts ===================================
platform darwin -- Python 3.11.10, pytest-8.3.3, pluggy-1.5.0
rootdir: /Users/kelle/Hunter College Dropbox/Kelle Cruz/Science/Code/Python/sedkit
configfile: pyproject.toml
plugins: anyio-4.4.0
collected 93 items                                                                       

sedkit/tests/test_catalog.py .                                                     [  1%]
sedkit/tests/test_helpers.py F                                                     [  2%]
sedkit/tests/test_isochrone.py ....                                                [  6%]
sedkit/tests/test_modelgrid.py ..F.......                                          [ 17%]
sedkit/tests/test_query.py ...                                                     [ 20%]
sedkit/tests/test_relations.py ....F..                             [ 27%]
sedkit/tests/test_sed.py ..F.F.F.FF......                                                           [ 45%]
sedkit/tests/test_spectrum.py .....FF....F......                                                    [ 64%]
sedkit/tests/test_uncertainties.py ...........                                                      [ 76%]
sedkit/tests/test_utilities.py ......................                                               [100%]

========================================= short test summary info =========================================
FAILED sedkit/tests/test_helpers.py::test_process_dmestar - OSError: File /Users/kelle/Hunter College Dropbox/Kelle Cruz/Science/Code/Python/sedkit/sedkit/data/mo...
FAILED sedkit/tests/test_modelgrid.py::TestModelGrid::test_photometry - ValueError: cannot set a row with mismatched columns
FAILED sedkit/tests/test_relations.py::TestRelation::test_evaluate - ValueError: Quantity truthiness is ambiguous, especially for logarithmic units and temperatures. Use e...
FAILED sedkit/tests/test_sed.py::TestSED::test_add_spectrum - ValueError: operands could not be broadcast together with shapes (36,) (35,)
FAILED sedkit/tests/test_sed.py::TestSED::test_compare_model - ValueError: f1[8846] and f2[4693]. They must be the same length.
FAILED sedkit/tests/test_sed.py::TestSED::test_find_SDSS_spectra - ValueError: Quantity truthiness is ambiguous, especially for logarithmic units and temperatures. Use e...
FAILED sedkit/tests/test_sed.py::TestSED::test_fit_modelgrid - ValueError: None: Please choose valid relation to infer the radius. Try []
FAILED sedkit/tests/test_sed.py::TestSED::test_fit_spectral_type - ValueError: None: Please choose valid relation to infer the radius. Try []
FAILED sedkit/tests/test_spectrum.py::TestSpectrum::test_interpolate - ValueError: operands could not be broadcast together with shapes (230,) (115,)
FAILED sedkit/tests/test_spectrum.py::TestSpectrum::test_model_fit - ValueError: 5.5 outside of 'logg' parameter space [5.0, 5.0]
FAILED sedkit/tests/test_spectrum.py::TestSpectrum::test_synthetic_mag - RecursionError: maximum recursion depth exceeded while calling a Python object
======================== 11 failed, 82 passed, 1074 warnings in 115.74s (0:01:55) =========================