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

ENH: Add more text to registry.search docstring for the types of constraints that can be used #426

Merged
merged 3 commits into from
Jul 26, 2023
Merged
Changes from 1 commit
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
30 changes: 30 additions & 0 deletions pyvo/registry/regtap.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,36 @@ def search(*constraints: rtcons.Constraint, includeaux: bool = False, maxrec: in
*constraints : `rtcons.Constraint` instances
The constraints (keywords to match, positions to cover, ...)
that the returned records need to satisfy.
The accepted constraints are:

- keywords: one or more freetext words, mached in the title,
Copy link
Member

Choose a reason for hiding this comment

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

Add an indent here and for all the other items in the list to make the rendering nicer.

Suggested change
- keywords: one or more freetext words, mached in the title,
- keywords: one or more freetext words, mached in the title,

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is the updated version better?

Copy link
Member

Choose a reason for hiding this comment

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

yes. The whitepace linting issue is still there, as well as some extra whitespace with the rendering (https://pyvo--426.org.readthedocs.build/en/426/api/pyvo.registry.regtap.search.html#pyvo.registry.regtap.search), I'll just add a commit that fixes all those rather than going back and forth with it.

Copy link
Member

@bsipocz bsipocz Feb 22, 2023

Choose a reason for hiding this comment

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

here it is with the new commit:
https://pyvo--426.org.readthedocs.build/en/426/api/pyvo.registry.regtap.search.html#pyvo.registry.regtap.search

Apparently, the rendering reuses the link and only serves the latest version.

description or subject of the resource.
- servicetype: constrain to one of tap, ssa, sia, conesearch
(or full ivoids for other service types). This is the
constraint you want to use for service discovery.
- ucd: constrain by one or more UCD patterns; resources match
when they serve columns having a matching UCD
(e.g., phot.mag;em.ir.% for "any infrared magnitude").
- waveband: one or more terms from the vocabulary at
http://www.ivoa.net/rdf/messenger giving the rough spectral
location of the resource.
- author: an author ("creator"). This is a single SQL pattern,
and given the sloppy practices in the VO for how to write
author names, you should probably generously use wildcards.
- datamodel: one of obscore, epntap, or regtap: only return TAP
services having tables of this kind.
- ivoid: exactly match a single IVOA identifier (that is,
in effect, the primary key in the VO).
- spatial: match resources covering a certain geometry (point,
circle, polygon, or MOC). RegTAP 1.2 Extension.
- spectral: match resources covering a certain part of the spectrum
(usually, but not limited to, the electromagnetic spectrum).
RegTAP 1.2 Extension
- temporal: match resources covering a some point or interval in
time. RegTAP 1.2 Extension

Multiple constraints are combined conjunctively ("AND").


includeaux : bool
Flag for whether to include auxiliary capabilities in results.
Expand Down