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

Trying to get tests to run under Python 3.11 #99

Merged
merged 25 commits into from
Sep 12, 2024
Merged

Conversation

kelle
Copy link
Member

@kelle kelle commented Sep 11, 2024

Fix the test configuration

@kelle
Copy link
Member Author

kelle commented Sep 12, 2024

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

@kelle kelle mentioned this pull request Sep 12, 2024
@kelle
Copy link
Member Author

kelle commented Sep 12, 2024

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) =========================

@kelle kelle changed the title Trying to get tests to pass under Python 3.11 Trying to get tests to run under Python 3.11 Sep 12, 2024
@kelle kelle merged commit 0115ca7 into BDNYC:main Sep 12, 2024
1 check failed
@kelle kelle deleted the fix-tests branch September 12, 2024 05:01
@kelle kelle mentioned this pull request Sep 13, 2024
@kelle kelle mentioned this pull request Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant