Skip to content

Conversation

@keflavich
Copy link
Contributor

@mdboom migrated this from #498 since there's some hope that that PR and other old ones can be merged against astropy with reversion.

This is still a WIP as there are some unclear conflicts remaining.

@keflavich
Copy link
Contributor Author

I see that the automatic generation of .cfg files has been removed here:
http://astropy.readthedocs.org/en/latest/config/config_0_4_transition.html#for-affiliated-package-authors
Is there any way to generate one, though? Or do I have to manually dig through each package to see what configuration options exist?

@jwoillez
Copy link
Member

@keflavich - Maybe what you are looking for is in #442, especially the first few commits?

@keflavich
Copy link
Contributor Author

Thanks @jwoillez that's what I needed. Totally forgot about it.

@keflavich
Copy link
Contributor Author

I get 3 failures:

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <astroquery.skyview.tests.test_skyview.MockResponseSkyviewForm object at 0x10d4aa0d0>, method = 'GET', url = 'http://www.pa.uky.edu/~peter/atomic/'

    def get_content(self, method, url):
        if 'basicform.pl' in url and method=='GET':
            with open(data_path('query_page.html'),'r') as f:
                return f.read()
        elif 'runquery.pl' in url and method =='GET':
            with open(data_path('results.html'), 'r') as f:
                return f.read()
        else:
>           raise ValueError("Invalid method/url passed to "
                             "Mock Skyview request")
E           ValueError: Invalid method/url passed to Mock Skyview request

astroquery/skyview/tests/test_skyview.py:29: ValueError
___________________________________________________________________ test_survey_validation ____________________________________________________________________

patch_get = <_pytest.monkeypatch.monkeypatch instance at 0x10d3ab3f8>

    def test_survey_validation(patch_get):
        with pytest.raises(ValueError) as ex:
            urls = SkyView.get_image_list(position='doesnt matter',
                                          survey=['not_a_valid_survey'])
>       assert str(ex.value) == ("Survey is not among the surveys hosted "
                                 "at skyview.  See list_surveys or "
                                 "survey_dict for valid surveys.")
E       assert 'Invalid meth...yview request' == 'Survey is not...alid surveys.'
E         - Invalid method/url passed to Mock Skyview request
E         + Survey is not among the surveys hosted at skyview.  See list_surveys or survey_dict for valid surveys.

astroquery/skyview/tests/test_skyview.py:55: AssertionError
__________________________________________________________________________ test_url ___________________________________________________________________________

    def test_url():
        assert 'http://' in splatalogue.core.Splatalogue.QUERY_URL
>       assert 'cv.nrao.edu' in splatalogue.core.Splatalogue.QUERY_URL
E       assert 'cv.nrao.edu' in 'http://www.cosmosim.org/uws/query'
E        +  where 'http://www.cosmosim.org/uws/query' = <astroquery.splatalogue.core.SplatalogueClass object at 0x109440e50>.QUERY_URL
E        +    where <astroquery.splatalogue.core.SplatalogueClass object at 0x109440e50> = <module 'astroquery.splatalogue.core' from 'astroquery/splatalogue/core.py'>.Splatalogue
E        +      where <module 'astroquery.splatalogue.core' from 'astroquery/splatalogue/core.py'> = splatalogue.core

astroquery/splatalogue/tests/test_splatalogue.py:55: AssertionError
================================================ 3 failed, 361 passed, 188 skipped, 2 xfailed in 16.90 seconds ================================================

I cannot explain how this url: 'http://www.pa.uky.edu/~peter/atomic/' is getting passed to skyview. It doesn't show up anywhere in the skyview package or configuration; it is part of the atomic package. Similarly, there is no reason a cosmosim URL should get passed to splatalogue. All I know is that this is somehow related to the configuration system, but I don't understand how.

@mdboom
Copy link
Contributor

mdboom commented Mar 26, 2015

Automatic generation of the configuration file is gone, that's true. But you can use the config file from a previous version as a starting point.

@mdboom
Copy link
Contributor

mdboom commented Mar 26, 2015

@keflavich: I'm checking out your branch now and will see if I can fix some of the issues being seen here.

@mdboom
Copy link
Contributor

mdboom commented Mar 26, 2015

Sorry for the confusion yesterday. It looks like you are already on the new API here, and the only fault was the breakage in mdboom/astropy@7186664. I think this PR can probably just be closed.

@mdboom
Copy link
Contributor

mdboom commented Mar 26, 2015

Except having the fixed config file is helpful. Sorry -- still working on it.

@mdboom
Copy link
Contributor

mdboom commented Mar 26, 2015

All of the errors here go away with astropy/astropy#3627. So I'd suggest closing this, and only merging #502, which is just the part to add the config file to the repo.

@keflavich keflavich closed this Mar 26, 2015
@keflavich keflavich deleted the reconfig branch March 26, 2015 15:04
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.

4 participants