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

Reduce execution time of MAST remote test suite #3036

Merged
merged 1 commit into from
Jun 14, 2024

Conversation

snbianco
Copy link
Contributor

Closes #2209

@bsipocz @astrojimig

Although the issue only mentions one particular test, I ended up making a more changes to the entire suite to reduce running time. I got it down to around 6 minutes on my machine. The bottlenecks are still in the tests that download files, but I think this is a large improvement.

I will look for (or make) a separate issue about the documentation tests. How urgent would this be?

@snbianco snbianco changed the title Reduce execution time of remote test suite Reduce execution time of MAST remote test suite Jun 14, 2024
@snbianco snbianco marked this pull request as ready for review June 14, 2024 15:34
@bsipocz bsipocz added this to the v0.4.8 milestone Jun 14, 2024
@bsipocz bsipocz added the mast label Jun 14, 2024
@bsipocz
Copy link
Member

bsipocz commented Jun 14, 2024

I will look for (or make) a separate issue about the documentation tests. How urgent would this be?

There are a couple of old ones, like e.g. #2505, but also please open new ones for specific issues or in any way that you find useful. You can search for the mast label to see them.

Nothing is really urgent, as you see some of the issues are open for year now. I just got super excited to see renewed activity and jumped on a few issues that can make the generic maintainer life easier (e.g. this one).

@bsipocz
Copy link
Member

bsipocz commented Jun 14, 2024

@pllim - please add snbianco to the org so I can add her to the archive maintainer team.

@pllim
Copy link
Member

pllim commented Jun 14, 2024

Added. Hope it works! 🤞

Copy link
Member

@bsipocz bsipocz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much, this is a great improvement.

However, locally I run into timeouts for the last 5 tests. However, I see the same timeouts on the current main, so would go ahead merging this PR as is as leave digging into those timeouts for a follow-up.

=============================================== short test summary info ================================================
FAILED astroquery/mast/tests/test_mast_remote.py::TestMast::test_zcut_get_surveys - requests.exceptions.HTTPError: 504 Server Error: Gateway Time-out for url: https://mast.stsci.edu/zcut/api/v0.1/survey
FAILED astroquery/mast/tests/test_mast_remote.py::TestMast::test_zcut_download_cutouts - requests.exceptions.HTTPError: 504 Server Error: Gateway Time-out for url: https://mast.stsci.edu/zcut/api/v0.1/ast...
FAILED astroquery/mast/tests/test_mast_remote.py::TestMast::test_zcut_get_cutouts - requests.exceptions.HTTPError: 504 Server Error: Gateway Time-out for url: https://mast.stsci.edu/zcut/api/v0.1/ast...
FAILED astroquery/mast/tests/test_mast_remote.py::TestMast::test_hapcut_download_cutouts - requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: https://mast.stsci.edu/hapcut/api/v...
FAILED astroquery/mast/tests/test_mast_remote.py::TestMast::test_hapcut_get_cutouts - requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: https://mast.stsci.edu/hapcut/api/v...
================================ 5 failed, 96 passed, 42 warnings in 1328.38s (0:22:08) ================================

@@ -87,6 +87,7 @@ mast
^^^^

- Fix bug in which the ``local_path`` parameter for the ``mast.observations.download_file`` method does not accept a directory. [#3016]
- Optimize remote test suite to improve performance and reduce execution time. [#3036]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General rule of thumb: we do changelog for user facing changes, so no need for one for 1) doc changes 2) test changes 3) internal refactorings that has no consequence to the user facing api

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll remove this at release time.

@bsipocz bsipocz merged commit 604f284 into astropy:main Jun 14, 2024
9 of 10 checks passed
@snbianco snbianco deleted the limit-products-test branch June 14, 2024 20:29
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.

Fix MAST download products tests to limit test download to a minimum amount
3 participants