Astroquery: Replace rospublic in astroquery/heasarc/tests/test_heasarc_remote.py

Created on 10 Oct 2020  路  6Comments  路  Source: astropy/astroquery

astroquery/heasarc/tests/test_heasarc_remote.py has multiple references to rospublic. This is no longer a valid HEASARC table after having been deprecated 16 years ago, so all these tests will fail. Replace with rosmaster or some other table. The number of rows in the results may need to updated to reflect the query results of the new test table.

heasarc package-novice testing

Most helpful comment

Hello, as my first contribution, I would like to work on this issue of no one else is working on it.

All 6 comments

Thanks @esabol. A PR to fix this would be welcome. I've labeled this issue as good for a package novice, too.

Hello, as my first contribution, I would like to work on this issue of no one else is working on it.

Since CI doesn't run the remote tests, you can double check whether things are working in your PR locally with:

python setup.py test -P heasarc -R

Which will run all tests, including remotes for the heasarc module

Hi @bsipocz , I tried the above command without my change and I get this

 python setup.py test -P hearsarc -R
/Users/daisycodes/astroquery/astropy_helpers/astropy_helpers/setup_helpers.py:161: AstropyDeprecationWarning: The package argument to generate_version_py has been deprecated and will be removed in future. Specify the package name in setup.cfg instead
  warnings.warn('The package argument to generate_version_py has '
/Users/daisycodes/astroquery/astropy_helpers/astropy_helpers/setup_helpers.py:166: AstropyDeprecationWarning: The version argument to generate_version_py has been deprecated and will be removed in future. Specify the version number in setup.cfg instead
  warnings.warn('The version argument to generate_version_py has '
/Users/daisycodes/astroquery/astropy_helpers/astropy_helpers/setup_helpers.py:171: AstropyDeprecationWarning: The release argument to generate_version_py has been deprecated and will be removed in future. We now use the presence of the "dev" string in the version to determine whether this is a release
  warnings.warn('The release argument to generate_version_py has '
/Users/daisycodes/astroquery/astropy_helpers/astropy_helpers/setup_helpers.py:186: AstropyDeprecationWarning: Specifying the package name using the "package_name" option in setup.cfg is deprecated - use the "name" option instead.
  warnings.warn('Specifying the package name using the "package_name" '
/Users/daisycodes/astroquery/astropy_helpers/astropy_helpers/version_helpers.py:239: AstropyDeprecationWarning: The packagename argument to generate_version_py has been deprecated and will be removed in future. Specify the package name in setup.cfg instead
  warnings.warn('The packagename argument to generate_version_py has '
/Users/daisycodes/astroquery/astropy_helpers/astropy_helpers/version_helpers.py:244: AstropyDeprecationWarning: The version argument to generate_version_py has been deprecated and will be removed in future. Specify the version number in setup.cfg instead
  warnings.warn('The version argument to generate_version_py has '
/Users/daisycodes/astroquery/astropy_helpers/astropy_helpers/version_helpers.py:249: AstropyDeprecationWarning: The release argument to generate_version_py has been deprecated and will be removed in future. We now use the presence of the "dev" string in the version to determine whether this is a release
  warnings.warn('The release argument to generate_version_py has '
/Users/daisycodes/astroquery/astropy_helpers/astropy_helpers/version_helpers.py:264: AstropyDeprecationWarning: Specifying the package name using the "package_name" option in setup.cfg is deprecated - use the "name" option instead.
  warnings.warn('Specifying the package name using the "package_name" '
running test
installing to temporary directory: /private/var/folders/pb/6yv8xxks74d8svzsrxjvzfx00000gn/T/astroquery-test-as6b8lg4
no previously-included directories found matching 'build'
no previously-included directories found matching 'docs/_build'
no previously-included directories found matching 'docs/api'
no previously-included directories found matching 'astropy_helpers/build'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.o' found anywhere in distribution
Searching for pytest-astropy
Best match: pytest-astropy 0.8.0
Processing pytest_astropy-0.8.0-py3.8.egg

Using /Users/daisycodes/astroquery/.eggs/pytest_astropy-0.8.0-py3.8.egg
Searching for pytest>=4.6
Best match: pytest 6.1.1
Processing pytest-6.1.1-py3.8.egg

Using /Users/daisycodes/astroquery/.eggs/pytest-6.1.1-py3.8.egg
Searching for pytest-remotedata>=0.3.1
Best match: pytest-remotedata 0.3.2
Processing pytest_remotedata-0.3.2-py3.8.egg

Using /Users/daisycodes/astroquery/.eggs/pytest_remotedata-0.3.2-py3.8.egg
Searching for pytest-openfiles>=0.3.1
Best match: pytest-openfiles 0.5.0
Processing pytest_openfiles-0.5.0-py3.8.egg

Using /Users/daisycodes/astroquery/.eggs/pytest_openfiles-0.5.0-py3.8.egg
Searching for pytest-filter-subpackage>=0.1
Best match: pytest-filter-subpackage 0.1.1
Processing pytest_filter_subpackage-0.1.1-py3.8.egg

Using /Users/daisycodes/astroquery/.eggs/pytest_filter_subpackage-0.1.1-py3.8.egg
Searching for pytest-doctestplus>=0.2.0
Best match: pytest-doctestplus 0.8.0
Processing pytest_doctestplus-0.8.0-py3.8.egg

Using /Users/daisycodes/astroquery/.eggs/pytest_doctestplus-0.8.0-py3.8.egg
Searching for pytest-cov>=2.0
Best match: pytest-cov 2.10.1
Processing pytest_cov-2.10.1-py3.8.egg

Using /Users/daisycodes/astroquery/.eggs/pytest_cov-2.10.1-py3.8.egg
Searching for pytest-astropy-header>=0.1.2
Best match: pytest-astropy-header 0.1.2
Processing pytest_astropy_header-0.1.2-py3.8.egg

Using /Users/daisycodes/astroquery/.eggs/pytest_astropy_header-0.1.2-py3.8.egg
Searching for pytest-arraydiff>=0.1
Best match: pytest-arraydiff 0.3
Processing pytest_arraydiff-0.3-py3.8.egg

Using /Users/daisycodes/astroquery/.eggs/pytest_arraydiff-0.3-py3.8.egg
Searching for hypothesis>=5.1
Best match: hypothesis 5.37.1
Processing hypothesis-5.37.1-py3.8.egg

Using /Users/daisycodes/astroquery/.eggs/hypothesis-5.37.1-py3.8.egg
Searching for toml
Best match: toml 0.10.1
Processing toml-0.10.1-py3.8.egg

Using /Users/daisycodes/astroquery/.eggs/toml-0.10.1-py3.8.egg
Searching for py>=1.8.2
Best match: py 1.9.0
Processing py-1.9.0-py3.8.egg

Using /Users/daisycodes/astroquery/.eggs/py-1.9.0-py3.8.egg
Searching for pluggy<1.0,>=0.12
Best match: pluggy 0.13.1
Processing pluggy-0.13.1-py3.8.egg

Using /Users/daisycodes/astroquery/.eggs/pluggy-0.13.1-py3.8.egg
Searching for packaging
Best match: packaging 20.4
Processing packaging-20.4-py3.8.egg

Using /Users/daisycodes/astroquery/.eggs/packaging-20.4-py3.8.egg
Searching for iniconfig
Best match: iniconfig 1.0.1
Processing iniconfig-1.0.1-py3.8.egg

Using /Users/daisycodes/astroquery/.eggs/iniconfig-1.0.1-py3.8.egg
Searching for attrs>=17.4.0
Best match: attrs 20.2.0
Processing attrs-20.2.0-py3.8.egg

Using /Users/daisycodes/astroquery/.eggs/attrs-20.2.0-py3.8.egg
Searching for psutil
Best match: psutil 5.7.2
Processing psutil-5.7.2-py3.8-macosx-10.14-x86_64.egg

Using /Users/daisycodes/astroquery/.eggs/psutil-5.7.2-py3.8-macosx-10.14-x86_64.egg
Searching for coverage>=4.4
Best match: coverage 5.3
Processing coverage-5.3-py3.8-macosx-10.14-x86_64.egg

Using /Users/daisycodes/astroquery/.eggs/coverage-5.3-py3.8-macosx-10.14-x86_64.egg
Searching for sortedcontainers<3.0.0,>=2.1.0
Best match: sortedcontainers 2.2.2
Processing sortedcontainers-2.2.2-py3.8.egg

Using /Users/daisycodes/astroquery/.eggs/sortedcontainers-2.2.2-py3.8.egg
Searching for pyparsing>=2.0.2
Best match: pyparsing 3.0.0a2
Processing pyparsing-3.0.0a2-py3.8.egg

Using /Users/daisycodes/astroquery/.eggs/pyparsing-3.0.0a2-py3.8.egg
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/daisycodes/astroquery/venv/lib/python3.8/site-packages/astropy-4.1rc2-py3.8-macosx-10.14-x86_64.egg/astropy/tests/runner.py", line 266, in test
    return runner.run_tests(**kwargs)
  File "/Users/daisycodes/astroquery/venv/lib/python3.8/site-packages/astropy-4.1rc2-py3.8-macosx-10.14-x86_64.egg/astropy/tests/runner.py", line 611, in run_tests
    return super().run_tests(**kwargs)
  File "/Users/daisycodes/astroquery/venv/lib/python3.8/site-packages/astropy-4.1rc2-py3.8-macosx-10.14-x86_64.egg/astropy/tests/runner.py", line 223, in run_tests
    args = self._generate_args(**kwargs)
  File "/Users/daisycodes/astroquery/venv/lib/python3.8/site-packages/astropy-4.1rc2-py3.8-macosx-10.14-x86_64.egg/astropy/tests/runner.py", line 146, in _generate_args
    result = func(keywords[keyword], keywords)
  File "/Users/daisycodes/astroquery/venv/lib/python3.8/site-packages/astropy-4.1rc2-py3.8-macosx-10.14-x86_64.egg/astropy/tests/runner.py", line 42, in keyword
    return f(*args, **kwargs)
  File "/Users/daisycodes/astroquery/venv/lib/python3.8/site-packages/astropy-4.1rc2-py3.8-macosx-10.14-x86_64.egg/astropy/tests/runner.py", line 358, in package
    self.package_path = self.packages_path(package, self.base_path,
  File "/Users/daisycodes/astroquery/venv/lib/python3.8/site-packages/astropy-4.1rc2-py3.8-macosx-10.14-x86_64.egg/astropy/tests/runner.py", line 323, in packages_path
    raise ValueError(error.format(**info))
ValueError: package to test is not found: hearsarc (at path /private/var/folders/pb/6yv8xxks74d8svzsrxjvzfx00000gn/T/astroquery-test-as6b8lg4/lib/python3.8/site-packages/astroquery/hearsarc).

There is a typo in the name of the module, it should spell heasarc (it stands for High Energy Astrophysics Science Archive Research Center)

Was this page helpful?
0 / 5 - 0 ratings