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

Cleanup test decorations #2327

Merged
merged 2 commits into from
Apr 26, 2022
Merged

Conversation

bsipocz
Copy link
Member

@bsipocz bsipocz commented Mar 19, 2022

remove obsolete slow marks and change known failures to xfail

Most of these slow tests were decorated way back, and since then they seemed to be fixed. There are also a handful of tests that got decorated with skip due to a know failure, I've changed those to xfail which better reflects on their status.

So overall the changes are 36 pass 14 skip to 41 pass 4 skip 5 xfail, total runtime from 6 min to 7.25 min

The current durations:

============================================================================ slowest 50 durations ============================================================================
84.72s call     astroquery/alma/tests/test_alma_remote.py::TestAlma::test_download_and_extract
62.84s call     astroquery/alma/tests/test_alma_remote.py::TestAlma::test_stage_data
56.75s call     astroquery/alma/tests/test_alma_remote.py::TestAlma::test_bands
45.53s call     astroquery/alma/tests/test_alma_remote.py::TestAlma::test_data_info
33.90s call     astroquery/alma/tests/test_alma_remote.py::TestAlma::test_download_data
22.22s call     astroquery/alma/tests/test_alma_remote.py::test_download_html_file
14.68s call     astroquery/alma/tests/test_alma_remote.py::TestAlma::test_doc_example
12.94s call     astroquery/alma/tests/test_alma_remote.py::TestAlma::test_stage_data_listall
11.04s call     astroquery/alma/tests/test_alma_remote.py::test_verify_html_file
11.04s call     astroquery/alma/tests/test_alma_utils.py::test_make_finder_chart
10.98s call     astroquery/alma/tests/test_alma_remote.py::test_staging_stacking
8.35s call     astroquery/alma/tests/test_alma_remote.py::TestAlma::test_freq
5.54s call     astroquery/alma/tests/test_alma_remote.py::TestAlma::test_SgrAstar
5.31s call     astroquery/alma/tests/test_alma_remote.py::TestAlma::test_public
4.91s call     astroquery/alma/tests/test_alma_remote.py::TestAlma::test_user
4.64s call     astroquery/alma/tests/test_alma_remote.py::TestAlma::test_keywords
4.02s call     astroquery/alma/tests/test_alma_remote.py::TestAlma::test_query
3.95s call     astroquery/alma/tests/test_alma_remote.py::TestAlma::test_stage_data_json
3.88s call     astroquery/alma/tests/test_alma_remote.py::test_staging_postfeb2020
3.87s call     astroquery/alma/tests/test_alma_remote.py::test_staging_uptofeb2020
3.68s call     astroquery/alma/tests/test_alma_remote.py::TestAlma::test_data_proprietary
3.63s call     astroquery/alma/tests/test_alma_remote.py::TestAlma::test_misc
2.82s call     astroquery/alma/tests/test_alma_remote.py::TestAlma::test_alma_source_name
2.74s call     astroquery/alma/tests/test_alma_remote.py::TestAlma::test_equivalent_columns
2.67s call     astroquery/alma/tests/test_alma_remote.py::TestAlma::test_docs_example
2.33s call     astroquery/alma/tests/test_alma_remote.py::TestAlma::test_ra_dec
2.19s call     astroquery/alma/tests/test_alma_remote.py::TestAlma::test_cycle1
2.09s call     astroquery/alma/tests/test_alma_remote.py::test_project_metadata
0.25s setup    astroquery/alma/tests/test_alma_remote.py::TestAlma::test_SgrAstar
0.09s call     astroquery/alma/tests/test_alma.py::test_gen_pos_sql
0.04s call     astroquery/alma/tests/test_alma_utils.py::test_pyregion_subset
0.03s call     astroquery/alma/tests/test_alma.py::test_query
0.02s call     astroquery/alma/tests/test_alma.py::test_get_data_info
0.01s call     astroquery/alma/tests/test_alma.py::test_galactic_query
0.01s setup    astroquery/alma/tests/test_alma_remote.py::TestAlma::test_equivalent_columns
0.01s call     astroquery/alma/tests/test_alma.py::test_sia
0.01s call     astroquery/alma/tests/test_alma.py::test_tap

(13 durations < 0.005s hidden.  Use -vv to show these durations.)

@bsipocz
Copy link
Member Author

bsipocz commented Mar 19, 2022

Overall it would be great to be able to cut back some on the slowest tests, maybe it's possible by working with smaller datasets? Either way, think this is an improvement. It's not release critical though, so I'll leave a chance for comments before merging.

@bsipocz bsipocz modified the milestones: v0.4.6, v0.4.7 Mar 19, 2022
@codecov
Copy link

codecov bot commented Mar 19, 2022

Codecov Report

Merging #2327 (4fdc765) into main (115b0aa) will not change coverage.
The diff coverage is 56.20%.

@@           Coverage Diff           @@
##             main    #2327   +/-   ##
=======================================
  Coverage   63.17%   63.17%           
=======================================
  Files         132      132           
  Lines       17189    17189           
=======================================
  Hits        10860    10860           
  Misses       6329     6329           
Impacted Files Coverage Δ
astroquery/conftest.py 92.30% <ø> (ø)
astroquery/esa/iso/core.py 64.58% <ø> (ø)
astroquery/exceptions.py 0.00% <0.00%> (ø)
astroquery/gaia/core.py 71.94% <ø> (ø)
astroquery/image_cutouts/first/core.py 92.68% <ø> (ø)
astroquery/magpis/core.py 93.61% <ø> (ø)
astroquery/mast/services.py 79.56% <ø> (ø)
astroquery/atomic/core.py 35.77% <30.76%> (ø)
astroquery/utils/tap/taputils.py 67.85% <48.78%> (ø)
astroquery/alma/core.py 42.80% <55.55%> (ø)
... and 19 more

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@bsipocz
Copy link
Member Author

bsipocz commented Mar 29, 2022

I've changed the default test server to be the ESO one as it cuts back the test runtime from 40mins to 15min, even for based in Seattle. And CI is not located at nrao network either, all those closer to those other sources can use --alma-site to override.

cc @keflavich whether this is OK.

@bsipocz
Copy link
Member Author

bsipocz commented Mar 29, 2022

Updated timings after the rebase, on the same local computer using the eso site (just as it was used for the previous timings above):

================================================================ slowest 50 durations =================================================================
496.14s call     docs/alma/alma.rst::alma.rst
117.80s call     astroquery/alma/tests/test_alma_remote.py::TestAlma::test_bands
43.48s call     astroquery/alma/tests/test_alma_remote.py::TestAlma::test_data_info
35.61s call     astroquery/alma/tests/test_alma_remote.py::TestAlma::test_download_and_extract
35.49s call     astroquery/alma/tests/test_alma_remote.py::TestAlma::test_freq
30.72s call     astroquery/alma/tests/test_alma_remote.py::TestAlma::test_doc_example
29.26s call     astroquery/alma/tests/test_alma_remote.py::test_data_info_stacking
26.66s call     astroquery/alma/tests/test_alma_remote.py::TestAlma::test_download_data
20.61s call     astroquery/alma/tests/test_alma_remote.py::test_download_html_file
13.17s call     astroquery/alma/tests/test_alma_remote.py::TestAlma::test_user
12.93s call     astroquery/alma/tests/test_alma_remote.py::TestAlma::test_keywords
12.44s call     astroquery/alma/tests/test_alma_remote.py::TestAlma::test_SgrAstar
11.48s call     astroquery/alma/tests/test_alma_remote.py::test_verify_html_file
10.83s call     astroquery/alma/tests/test_alma_remote.py::TestAlma::test_data_proprietary
10.61s call     astroquery/alma/tests/test_alma_remote.py::TestAlma::test_misc
9.66s call     astroquery/alma/tests/test_alma_remote.py::TestAlma::test_public
6.10s call     astroquery/alma/tests/test_alma_remote.py::TestAlma::test_equivalent_columns
3.10s call     astroquery/alma/tests/test_alma_remote.py::TestAlma::test_alma_source_name
2.69s call     astroquery/alma/tests/test_alma_remote.py::TestAlma::test_query
2.54s call     astroquery/alma/tests/test_alma_remote.py::TestAlma::test_ra_dec
2.42s call     astroquery/alma/tests/test_alma_remote.py::TestAlma::test_cycle1
2.35s call     astroquery/alma/tests/test_alma_remote.py::test_project_metadata
0.09s call     astroquery/alma/tests/test_alma.py::test_gen_pos_sql
0.03s call     astroquery/alma/tests/test_alma.py::test_query
0.02s call     astroquery/alma/tests/test_alma.py::test_get_data_info
0.01s call     astroquery/alma/tests/test_alma.py::test_galactic_query
0.01s call     astroquery/alma/tests/test_alma.py::test_sia
0.01s call     astroquery/alma/tests/test_alma.py::test_tap

(22 durations < 0.005s hidden.  Use -vv to show these durations.)
=============================================================== short test summary info ===============================================================

@keflavich
Copy link
Contributor

👍 to switching to ESO. I don't know what's up with the NRAO servers, but they have repeatedly and consistently been slow for me this year.

@bsipocz
Copy link
Member Author

bsipocz commented Apr 26, 2022

I'm going ahead and merge this now. One test that was skipped before is failing now, but that should be fixed separately as it seems to be a legit issue (and it shows that it's in fact valuable to not skip the tests :) )

Current timings, the docs could certainly use some fine tunings, as it even timed out around line 370 (maybe switching off from the nrao mirror hidden away in a testsetup would be enough?):

1264.00s call     docs/alma/alma.rst::alma.rst
149.85s call     astroquery/alma/tests/test_alma_remote.py::TestAlma::test_bands
66.80s call     astroquery/alma/tests/test_alma_remote.py::TestAlma::test_freq
64.12s call     astroquery/alma/tests/test_alma_remote.py::TestAlma::test_data_info
43.08s call     astroquery/alma/tests/test_alma_remote.py::TestAlma::test_download_data
42.12s call     astroquery/alma/tests/test_alma_remote.py::TestAlma::test_download_and_extract
41.10s call     astroquery/alma/tests/test_alma_remote.py::TestAlma::test_doc_example
36.23s call     astroquery/alma/tests/test_alma_remote.py::test_data_info_stacking
24.33s call     astroquery/alma/tests/test_alma_remote.py::test_download_html_file
21.90s call     astroquery/alma/tests/test_alma_remote.py::TestAlma::test_keywords
20.83s call     astroquery/alma/tests/test_alma_remote.py::TestAlma::test_user
18.62s call     astroquery/alma/tests/test_alma_remote.py::TestAlma::test_SgrAstar
14.03s call     astroquery/alma/tests/test_alma_remote.py::TestAlma::test_misc
11.92s call     astroquery/alma/tests/test_alma_remote.py::TestAlma::test_public
10.86s call     astroquery/alma/tests/test_alma_remote.py::TestAlma::test_data_proprietary
10.57s call     astroquery/alma/tests/test_alma_remote.py::test_verify_html_file
6.09s call     astroquery/alma/tests/test_alma_remote.py::TestAlma::test_equivalent_columns
2.60s call     astroquery/alma/tests/test_alma_remote.py::TestAlma::test_query
2.56s call     astroquery/alma/tests/test_alma_remote.py::TestAlma::test_ra_dec
2.47s call     astroquery/alma/tests/test_alma_remote.py::TestAlma::test_cycle1
2.44s call     astroquery/alma/tests/test_alma_remote.py::TestAlma::test_alma_source_name
2.41s call     astroquery/alma/tests/test_alma_remote.py::test_project_metadata
0.05s call     astroquery/alma/tests/test_alma.py::test_gen_pos_sql
0.03s call     astroquery/alma/tests/test_alma.py::test_query
0.01s call     astroquery/alma/tests/test_alma.py::test_get_data_info
0.01s setup    astroquery/alma/tests/test_alma_remote.py::TestAlma::test_data_info
0.01s call     astroquery/alma/tests/test_alma.py::test_galactic_query

@bsipocz bsipocz merged commit d53047b into astropy:main Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants