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

MAINT: adding linkcheck to CI and minor fixes #377

Merged
merged 3 commits into from
Oct 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/cibuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ jobs:
- name: py310 with online tests, Linux
python-version: '3.10'
tox_env: py310-test-alldeps-online
- name: linkcheck
python-version: '3.10'
tox_env: linkcheck

steps:
- name: Checkout code
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ PyVO
===================================

.. image:: http://img.shields.io/badge/powered%20by-AstroPy-orange.svg?style=flat
:target: http://www.astropy.org
:target: https://www.astropy.org
:alt: Powered by Astropy Badge

.. image:: https://github.com/astropy/pyvo/workflows/CI/badge.svg?branch=main
Expand Down
4 changes: 2 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Introduction
------------

This is the documentation for PyVO, an affiliated package for the
`astropy <http://www.astropy.org>`__ package.
`astropy <https://www.astropy.org>`__ package.

PyVO lets you find and retrieve astronomical data available from archives that
support standard `IVOA <http://www.ivoa.net/>`__ virtual observatory service
Expand All @@ -25,7 +25,7 @@ protocols.
.. note::
If you need to access data which is not available via the Virtual Observatory
standards, try the astropy affiliated package
`astroquery <http://astroquery.readthedocs.io/en/latest/>`__ (and, of
`astroquery <https://astroquery.readthedocs.io/en/latest/>`__ (and, of
course, ask the data providers to do the right thing and use the proper
standards for their publication).

Expand Down
4 changes: 3 additions & 1 deletion docs/registry/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ There are two fundamental modes of searching in the VO:
Both modes are supported by this module.


.. _registry-basic-interface:

Basic interface
===============

Expand All @@ -51,7 +53,7 @@ keyword arguments. The following constraints are available:
patterns; resources match when they serve columns having a matching
UCD (e.g., ``phot.mag;em.ir.%`` for “any infrared magnitude”).
* :py:class:`pyvo.registry.Waveband` (``waveband``): one or more terms
from the vocabulary at http://www.ivoa.net/messenger giving the rough
from the vocabulary at http://www.ivoa.net/rdf/messenger giving the rough
spectral location of the resource.
* :py:class:`pyvo.registry.Author` (``author``): an author (“creator”).
This is a single SQL pattern, and given the sloppy practices in the
Expand Down
2 changes: 1 addition & 1 deletion pyvo/dal/tests/data/query/basic.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Produced with astropy.io.votable version 5.0.1
http://www.astropy.org/ -->
https://www.astropy.org/ -->
<VOTABLE version="1.4" xmlns="http://www.ivoa.net/xml/VOTable/v1.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.ivoa.net/xml/VOTable/v1.3 http://www.ivoa.net/xml/VOTable/VOTable-1.4.xsd">
<RESOURCE type="results">
<INFO ID="QUERY_STATUS" name="QUERY_STATUS" value="OK">OK</INFO>
Expand Down
2 changes: 1 addition & 1 deletion pyvo/dal/tests/data/query/dataset.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Produced with astropy.io.votable version 5.0.1
http://www.astropy.org/ -->
https://www.astropy.org/ -->
<VOTABLE version="1.4" xmlns="http://www.ivoa.net/xml/VOTable/v1.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.ivoa.net/xml/VOTable/v1.3 http://www.ivoa.net/xml/VOTable/VOTable-1.4.xsd">
<RESOURCE type="results">
<INFO ID="QUERY_STATUS" name="QUERY_STATUS" value="OK">OK</INFO>
Expand Down
2 changes: 1 addition & 1 deletion pyvo/dal/tests/data/query/errorstatus.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Produced with astropy.io.votable version 5.0.1
http://www.astropy.org/ -->
https://www.astropy.org/ -->
<VOTABLE version="1.4" xmlns="http://www.ivoa.net/xml/VOTable/v1.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.ivoa.net/xml/VOTable/v1.3 http://www.ivoa.net/xml/VOTable/VOTable-1.4.xsd">
<RESOURCE type="results">
<INFO ID="QUERY_STATUS" name="QUERY_STATUS" value="ERROR">ERROR</INFO>
Expand Down
2 changes: 1 addition & 1 deletion pyvo/dal/tests/data/query/firstresource.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Produced with astropy.io.votable version 5.0.1
http://www.astropy.org/ -->
https://www.astropy.org/ -->
<VOTABLE version="1.4" xmlns="http://www.ivoa.net/xml/VOTable/v1.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.ivoa.net/xml/VOTable/v1.3 http://www.ivoa.net/xml/VOTable/VOTable-1.4.xsd">
<RESOURCE type="results">
<INFO ID="QUERY_STATUS" name="QUERY_STATUS" value="OK">OK</INFO>
Expand Down
2 changes: 1 addition & 1 deletion pyvo/dal/tests/data/query/missingcolumns.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Produced with astropy.io.votable version 5.0.1
http://www.astropy.org/ -->
https://www.astropy.org/ -->
<VOTABLE version="1.4" xmlns="http://www.ivoa.net/xml/VOTable/v1.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.ivoa.net/xml/VOTable/v1.3 http://www.ivoa.net/xml/VOTable/VOTable-1.4.xsd">
<RESOURCE type="results">
<INFO ID="QUERY_STATUS" name="QUERY_STATUS" value="OK">OK</INFO>
Expand Down
2 changes: 1 addition & 1 deletion pyvo/dal/tests/data/query/missingresource.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Produced with astropy.io.votable version 5.0.1
http://www.astropy.org/ -->
https://www.astropy.org/ -->
<VOTABLE version="1.4" xmlns="http://www.ivoa.net/xml/VOTable/v1.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.ivoa.net/xml/VOTable/v1.3 http://www.ivoa.net/xml/VOTable/VOTable-1.4.xsd"/>
2 changes: 1 addition & 1 deletion pyvo/dal/tests/data/query/missingtable.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Produced with astropy.io.votable version 5.0.1
http://www.astropy.org/ -->
https://www.astropy.org/ -->
<VOTABLE version="1.4" xmlns="http://www.ivoa.net/xml/VOTable/v1.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.ivoa.net/xml/VOTable/v1.3 http://www.ivoa.net/xml/VOTable/VOTable-1.4.xsd">
<RESOURCE type="results">
<INFO ID="QUERY_STATUS" name="QUERY_STATUS" value="OK">OK</INFO>
Expand Down
2 changes: 1 addition & 1 deletion pyvo/dal/tests/data/query/overflowstatus.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Produced with astropy.io.votable version 5.0.1
http://www.astropy.org/ -->
https://www.astropy.org/ -->
<VOTABLE version="1.4" xmlns="http://www.ivoa.net/xml/VOTable/v1.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.ivoa.net/xml/VOTable/v1.3 http://www.ivoa.net/xml/VOTable/VOTable-1.4.xsd">
<RESOURCE type="results">
<INFO ID="QUERY_STATUS" name="QUERY_STATUS" value="OK"/>
Expand Down
2 changes: 1 addition & 1 deletion pyvo/dal/tests/data/query/rootinfo.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Produced with astropy.io.votable version 5.0.1
http://www.astropy.org/ -->
https://www.astropy.org/ -->
<VOTABLE version="1.4" xmlns="http://www.ivoa.net/xml/VOTable/v1.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.ivoa.net/xml/VOTable/v1.3 http://www.ivoa.net/xml/VOTable/VOTable-1.4.xsd">
<INFO ID="QUERY_STATUS" name="QUERY_STATUS" value="OK">OK</INFO>
<RESOURCE type="results">
Expand Down
2 changes: 1 addition & 1 deletion pyvo/dal/tests/data/query/tableinfo.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Produced with astropy.io.votable version 5.0.1
http://www.astropy.org/ -->
https://www.astropy.org/ -->
<VOTABLE version="1.4" xmlns="http://www.ivoa.net/xml/VOTable/v1.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.ivoa.net/xml/VOTable/v1.3 http://www.ivoa.net/xml/VOTable/VOTable-1.4.xsd">
<RESOURCE type="results">
<TABLE>
Expand Down
2 changes: 1 addition & 1 deletion pyvo/dal/tests/data/sia/dataset.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Produced with astropy.io.votable version 3.1.dev21501
http://www.astropy.org/ -->
https://www.astropy.org/ -->
<VOTABLE version="1.3" xmlns="http://www.ivoa.net/xml/VOTable/v1.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.ivoa.net/xml/VOTable/v1.3">
<RESOURCE type="results">
<INFO ID="QUERY_STATUS" name="QUERY_STATUS" value="OK">OK</INFO>
Expand Down
4 changes: 1 addition & 3 deletions pyvo/registry/regtap.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,8 @@ def search(*constraints:rtcons.Constraint,

The function accepts query constraints either as Constraint objects
passed in as positional arguments or as their associated keywords.
For what constraints are available, see
`Basic Interface`_.
For what constraints are available, see ref:`registry_basic_interface`.

.. _Basic Interface: ../registry/index.html#basic-interface

The values of keyword arguments may be tuples or lists when the associated
Constraint objects take multiple arguments.
Expand Down
4 changes: 2 additions & 2 deletions pyvo/registry/rtcons.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ class Waveband(Constraint):

This builds a constraint against rr.resource.waveband, i.e.,
a verbal indication of the messenger particle, coming
from the IVOA vocabulary http://www.ivoa.net/messenger.
from the IVOA vocabulary http://www.ivoa.net/rdf/messenger.

The :py:class:`pyvo.registry.Spectral` constraint enables selections by particle energy,
but few resources actually give the necessary metadata (in 2021).
Expand All @@ -342,7 +342,7 @@ def __init__(self, *bands):
Parameters
----------
*bands: tuple of strings
One or more of the terms given in http://www.ivoa.net/messenger.
One or more of the terms given in http://www.ivoa.net/rdf/messenger.
The constraint matches when a resource declares at least
one of the messengers listed.
"""
Expand Down
12 changes: 2 additions & 10 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -45,28 +45,20 @@ commands =
cov: pytest --pyargs --cov pyvo --cov-config={toxinidir}/setup.cfg {env:PYTEST_ARGS}
cov: coverage xml -o {toxinidir}/coverage.xml

[testenv:docs]
description = builds the docs
extras = docs
commands =
pip freeze
sphinx-build -W -b html . _build/html


[testenv:linkcheck]
changedir = docs
deps =
sphinx_astropy
description = check the links in the HTML docs
extras = docs
commands =
pip freeze
sphinx-build -W -b linkcheck . _build/html

[testenv:build_docs]
changedir = docs
description = invoke sphinx-build to build the HTML docs
extras = docs
commands =
pip freeze
sphinx-build -W -b html . _build/html

[testenv:codestyle]
Expand Down