Skip to content

Remote test for Ogle#1987

Merged
bsipocz merged 2 commits into
astropy:mainfrom
tinuademargaret:test-ogle
Feb 24, 2022
Merged

Remote test for Ogle#1987
bsipocz merged 2 commits into
astropy:mainfrom
tinuademargaret:test-ogle

Conversation

@tinuademargaret

Copy link
Copy Markdown
Contributor

No description provided.

@bsipocz bsipocz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I see some relevant test failures:

================================================= test session starts ==================================================
platform darwin -- Python 3.9.1, pytest-6.2.2, py-1.10.0, pluggy-0.13.1
Downloading https://hpiers.obspm.fr/iers/bul/bulc/Leap_Second.dat
|==================================================================================| 1.3k/1.3k (100.00%)         0s

Running tests with astroquery version 0.4.2.dev6675_testrun.
Running tests in astroquery/ogle docs/ogle.

Date: 2021-04-19T18:06:58

Platform: macOS-10.13.6-x86_64-i386-64bit

Executable: /Users/bsipocz/.pyenv/versions/3.9.1/bin/python

Full Python Version: 
3.9.1 (default, Jan 11 2021, 15:50:22) 
[Clang 10.0.0 (clang-1000.11.45.5)]

encodings: sys: utf-8, locale: UTF-8, filesystem: utf-8
byteorder: little
float info: dig: 15, mant_dig: 15

Package versions: 
Numpy: 1.19.5
Matplotlib: 3.3.3
Astropy: 4.2
APLpy: not available
pyregion: not available
pyVO: 1.1
astropy-helpers: 4.0.1

Using Astropy options: remote_data: any.

rootdir: /private/var/folders/dc/hsm7tqpx2d57n7vb3k1l81xw0000gq/T/astroquery-test-r772eiee/lib/python3.9/site-packages, configfile: setup.cfg
plugins: arraydiff-0.3, doctestplus-0.8.0, remotedata-0.3.2, cov-2.11.1, hypothesis-6.3.1, filter-subpackage-0.1.1, openfiles-0.5.0, astropy-header-0.1.2
collected 7 items                                                                                                      

astroquery/ogle/tests/test_ogle.py ...                                                                           [ 42%]
astroquery/ogle/tests/test_ogle_remote.py .FF                                                                    [ 85%]
docs/ogle/ogle.rst s                                                                                             [100%]

======================================================= FAILURES =======================================================
____________________________________________________ test_ogle_list ____________________________________________________

    @pytest.mark.remote_data
    def test_ogle_list():
        co = SkyCoord(0, 3, unit=(u.degree, u.degree), frame='galactic')
        co_list = [co, co, co]
        response = Ogle.query_region(coord=co_list)
        assert len(response) == 3
>       assert response['RA/Lon'][0] == response['RA/Lon'][1] == response['RA/Lon'][2]

astroquery/ogle/tests/test_ogle_remote.py:22: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/Users/bsipocz/.pyenv/versions/3.9.1/lib/python3.9/site-packages/astropy/table/table.py:1640: in __getitem__
    return self.columns[item]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <TableColumns names=('RA[hr]','Dec[deg]','A_I','E(V-I)','S_E(V-I)','R_JKVI','mu','S_mu','QF','alg','dist_NG')>
item = 'RA/Lon'

    def __getitem__(self, item):
        """Get items from a TableColumns object.
        ::
    
          tc = TableColumns(cols=[Column(name='a'), Column(name='b'), Column(name='c')])
          tc['a']  # Column('a')
          tc[1] # Column('b')
          tc['a', 'b'] # <TableColumns names=('a', 'b')>
          tc[1:3] # <TableColumns names=('b', 'c')>
        """
        if isinstance(item, str):
>           return OrderedDict.__getitem__(self, item)
E           KeyError: 'RA/Lon'

/Users/bsipocz/.pyenv/versions/3.9.1/lib/python3.9/site-packages/astropy/table/table.py:239: KeyError
________________________________________________ test_ogle_list_values _________________________________________________

    @pytest.mark.remote_data
    def test_ogle_list_values():
        co_list = [[0, 0, 0], [3, 3, 3]]
        response = Ogle.query_region(coord=co_list)
        assert len(response) == 3
>       assert response['RA/Lon'][0] == response['RA/Lon'][1] == response['RA/Lon'][2]

astroquery/ogle/tests/test_ogle_remote.py:30: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/Users/bsipocz/.pyenv/versions/3.9.1/lib/python3.9/site-packages/astropy/table/table.py:1640: in __getitem__
    return self.columns[item]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <TableColumns names=('RA[hr]','Dec[deg]','A_I','E(V-I)','S_E(V-I)','R_JKVI','mu','S_mu','QF','alg','dist_NG')>
item = 'RA/Lon'

    def __getitem__(self, item):
        """Get items from a TableColumns object.
        ::
    
          tc = TableColumns(cols=[Column(name='a'), Column(name='b'), Column(name='c')])
          tc['a']  # Column('a')
          tc[1] # Column('b')
          tc['a', 'b'] # <TableColumns names=('a', 'b')>
          tc[1:3] # <TableColumns names=('b', 'c')>
        """
        if isinstance(item, str):
>           return OrderedDict.__getitem__(self, item)
E           KeyError: 'RA/Lon'

/Users/bsipocz/.pyenv/versions/3.9.1/lib/python3.9/site-packages/astropy/table/table.py:239: KeyError
=============================================== short test summary info ================================================
FAILED astroquery/ogle/tests/test_ogle_remote.py::test_ogle_list - KeyError: 'RA/Lon'
FAILED astroquery/ogle/tests/test_ogle_remote.py::test_ogle_list_values - KeyError: 'RA/Lon'

Also, please squash the commits to remove the irrelevant ones.

@bsipocz bsipocz modified the milestones: v0.4.2, v0.4.3 Apr 20, 2021
@tinuademargaret

Copy link
Copy Markdown
Contributor Author

I see some relevant test failures:

================================================= test session starts ==================================================
platform darwin -- Python 3.9.1, pytest-6.2.2, py-1.10.0, pluggy-0.13.1
Downloading https://hpiers.obspm.fr/iers/bul/bulc/Leap_Second.dat
|==================================================================================| 1.3k/1.3k (100.00%)         0s

Running tests with astroquery version 0.4.2.dev6675_testrun.
Running tests in astroquery/ogle docs/ogle.

Date: 2021-04-19T18:06:58

Platform: macOS-10.13.6-x86_64-i386-64bit

Executable: /Users/bsipocz/.pyenv/versions/3.9.1/bin/python

Full Python Version: 
3.9.1 (default, Jan 11 2021, 15:50:22) 
[Clang 10.0.0 (clang-1000.11.45.5)]

encodings: sys: utf-8, locale: UTF-8, filesystem: utf-8
byteorder: little
float info: dig: 15, mant_dig: 15

Package versions: 
Numpy: 1.19.5
Matplotlib: 3.3.3
Astropy: 4.2
APLpy: not available
pyregion: not available
pyVO: 1.1
astropy-helpers: 4.0.1

Using Astropy options: remote_data: any.

rootdir: /private/var/folders/dc/hsm7tqpx2d57n7vb3k1l81xw0000gq/T/astroquery-test-r772eiee/lib/python3.9/site-packages, configfile: setup.cfg
plugins: arraydiff-0.3, doctestplus-0.8.0, remotedata-0.3.2, cov-2.11.1, hypothesis-6.3.1, filter-subpackage-0.1.1, openfiles-0.5.0, astropy-header-0.1.2
collected 7 items                                                                                                      

astroquery/ogle/tests/test_ogle.py ...                                                                           [ 42%]
astroquery/ogle/tests/test_ogle_remote.py .FF                                                                    [ 85%]
docs/ogle/ogle.rst s                                                                                             [100%]

======================================================= FAILURES =======================================================
____________________________________________________ test_ogle_list ____________________________________________________

    @pytest.mark.remote_data
    def test_ogle_list():
        co = SkyCoord(0, 3, unit=(u.degree, u.degree), frame='galactic')
        co_list = [co, co, co]
        response = Ogle.query_region(coord=co_list)
        assert len(response) == 3
>       assert response['RA/Lon'][0] == response['RA/Lon'][1] == response['RA/Lon'][2]

astroquery/ogle/tests/test_ogle_remote.py:22: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/Users/bsipocz/.pyenv/versions/3.9.1/lib/python3.9/site-packages/astropy/table/table.py:1640: in __getitem__
    return self.columns[item]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <TableColumns names=('RA[hr]','Dec[deg]','A_I','E(V-I)','S_E(V-I)','R_JKVI','mu','S_mu','QF','alg','dist_NG')>
item = 'RA/Lon'

    def __getitem__(self, item):
        """Get items from a TableColumns object.
        ::
    
          tc = TableColumns(cols=[Column(name='a'), Column(name='b'), Column(name='c')])
          tc['a']  # Column('a')
          tc[1] # Column('b')
          tc['a', 'b'] # <TableColumns names=('a', 'b')>
          tc[1:3] # <TableColumns names=('b', 'c')>
        """
        if isinstance(item, str):
>           return OrderedDict.__getitem__(self, item)
E           KeyError: 'RA/Lon'

/Users/bsipocz/.pyenv/versions/3.9.1/lib/python3.9/site-packages/astropy/table/table.py:239: KeyError
________________________________________________ test_ogle_list_values _________________________________________________

    @pytest.mark.remote_data
    def test_ogle_list_values():
        co_list = [[0, 0, 0], [3, 3, 3]]
        response = Ogle.query_region(coord=co_list)
        assert len(response) == 3
>       assert response['RA/Lon'][0] == response['RA/Lon'][1] == response['RA/Lon'][2]

astroquery/ogle/tests/test_ogle_remote.py:30: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/Users/bsipocz/.pyenv/versions/3.9.1/lib/python3.9/site-packages/astropy/table/table.py:1640: in __getitem__
    return self.columns[item]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <TableColumns names=('RA[hr]','Dec[deg]','A_I','E(V-I)','S_E(V-I)','R_JKVI','mu','S_mu','QF','alg','dist_NG')>
item = 'RA/Lon'

    def __getitem__(self, item):
        """Get items from a TableColumns object.
        ::
    
          tc = TableColumns(cols=[Column(name='a'), Column(name='b'), Column(name='c')])
          tc['a']  # Column('a')
          tc[1] # Column('b')
          tc['a', 'b'] # <TableColumns names=('a', 'b')>
          tc[1:3] # <TableColumns names=('b', 'c')>
        """
        if isinstance(item, str):
>           return OrderedDict.__getitem__(self, item)
E           KeyError: 'RA/Lon'

/Users/bsipocz/.pyenv/versions/3.9.1/lib/python3.9/site-packages/astropy/table/table.py:239: KeyError
=============================================== short test summary info ================================================
FAILED astroquery/ogle/tests/test_ogle_remote.py::test_ogle_list - KeyError: 'RA/Lon'
FAILED astroquery/ogle/tests/test_ogle_remote.py::test_ogle_list_values - KeyError: 'RA/Lon'

Also, please squash the commits to remove the irrelevant ones.

I can't seem to recreate this error on my end even after rebasing

@bsipocz bsipocz modified the milestones: v0.4.3, v0.4.4 Jul 7, 2021
@bsipocz bsipocz removed this from the v0.4.4 milestone Nov 13, 2021
@bsipocz bsipocz added this to the v0.4.6 milestone Feb 24, 2022

@bsipocz bsipocz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Rebased and fixed the failing remote tests. I think we better get this in, and further tests can be added separately.

@codecov

codecov Bot commented Feb 24, 2022

Copy link
Copy Markdown

Codecov Report

Merging #1987 (744d4a3) into main (f99e1ba) will increase coverage by 0.08%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1987      +/-   ##
==========================================
+ Coverage   62.84%   62.93%   +0.08%     
==========================================
  Files         130      131       +1     
  Lines       16841    16917      +76     
==========================================
+ Hits        10584    10646      +62     
- Misses       6257     6271      +14     
Impacted Files Coverage Δ
astroquery/mast/missions.py 79.45% <0.00%> (ø)
astroquery/mast/services.py 79.56% <0.00%> (+1.20%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f99e1ba...744d4a3. Read the comment docs.

@bsipocz bsipocz merged commit be40aca into astropy:main Feb 24, 2022
@bsipocz

bsipocz commented Feb 24, 2022

Copy link
Copy Markdown
Member

CI failure is a red herring as none of the new tests should be picked up by CI.

@bsipocz

bsipocz commented Feb 24, 2022

Copy link
Copy Markdown
Member

Thank you @tinumide!

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.

2 participants