Skip to content

Conversation

lauramasselos
Copy link

Dear Astroquery team,

I'm lauramasselos and I am working alongside jespinosaar and @esdc-esac-esa-int in developing Astroquery functionality for the ESA hubble module. In this pull request I have improved the get_datalabs_path method so the files can be retrieved from more than one default folders and it should provide an alternative if the file is not in Datalabs yet.

I look forward to working alongside your team!

Best,
Laura

Copy link

codecov bot commented Oct 6, 2025

Codecov Report

❌ Patch coverage is 88.88889% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 70.54%. Comparing base (aaa6e53) to head (bb242ef).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
astroquery/esa/hubble/core.py 88.88% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3437      +/-   ##
==========================================
- Coverage   70.54%   70.54%   -0.01%     
==========================================
  Files         232      232              
  Lines       20022    20023       +1     
==========================================
  Hits        14125    14125              
- Misses       5897     5898       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lauramasselos lauramasselos force-pushed the ESA_ehst-improvements-datalabs branch from 0ce0c2a to bb242ef Compare October 6, 2025 07:34
@jespinosaar
Copy link
Contributor

Thanks @lauramasselos for your first PR! And congratulations for passing all the tests! let's wait for the feedback from Astroquery team.

@bsipocz bsipocz added this to the 0.4.12 milestone Oct 6, 2025
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.

Welcome @lauramasselos!

There are 2 relevant test failures with the remote tests related to changed data paths, once those are fixed this is looked to be good to go in.

======================================================= FAILURES =======================================================
_________________________________ TestEsaHubbleRemoteData.test_get_datalabs_path_image _________________________________

self = <astroquery.esa.hubble.tests.test_esa_hubble_remote.TestEsaHubbleRemoteData object at 0x12e12a600>
recwarn = WarningsRecorder(record=True)

    def test_get_datalabs_path_image(self, recwarn):
        result = esa_hubble.get_datalabs_path(filename='ib4x04ivq_flt.jpg', default_volume=None)
        assert len(recwarn) == 1
        assert "ib4x04ivq_flt.jpg" in str(recwarn[0].message)
>       assert result == '/data/user/hub_hstdata_i/i/b4x/04/ib4x04ivq_flt.jpg'
E       AssertionError: assert '/data/hub_hs...04ivq_flt.jpg' == '/data/user/h...04ivq_flt.jpg'
E         
E         - /data/user/hub_hstdata_i/i/b4x/04/ib4x04ivq_flt.jpg
E         ?      -----
E         + /data/hub_hstdata_i/i/b4x/04/ib4x04ivq_flt.jpg

../../.tox/test-online/lib/python3.12/site-packages/astroquery/esa/hubble/tests/test_esa_hubble_remote.py:139: AssertionError
_________________________________ TestEsaHubbleRemoteData.test_get_datalabs_path_fits __________________________________

self = <astroquery.esa.hubble.tests.test_esa_hubble_remote.TestEsaHubbleRemoteData object at 0x12e12a7e0>
recwarn = WarningsRecorder(record=True)

    def test_get_datalabs_path_fits(self, recwarn):
        result = esa_hubble.get_datalabs_path(filename='ib4x04ivq_flt.fits', default_volume=None)
        assert len(recwarn) == 1
        assert "ib4x04ivq_flt.fits" in str(recwarn[0].message)
>       assert result == '/data/user/hub_hstdata_i/i/b4x/04/ib4x04ivq_flt.fits.gz'
E       AssertionError: assert '/data/hub_hs...q_flt.fits.gz' == '/data/user/h...q_flt.fits.gz'
E         
E         - /data/user/hub_hstdata_i/i/b4x/04/ib4x04ivq_flt.fits.gz
E         ?      -----
E         + /data/hub_hstdata_i/i/b4x/04/ib4x04ivq_flt.fits.gz

../../.tox/test-online/lib/python3.12/site-packages/astroquery/esa/hubble/tests/test_esa_hubble_remote.py:145: AssertionError

You can run these tests locally with pytest esa/hubble -R (they are not being picked up at the moment in PRs)

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.

3 participants