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

Documentation of Freetext constraint #577

Merged
merged 2 commits into from
Jul 12, 2024
Merged
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
17 changes: 12 additions & 5 deletions pyvo/registry/rtcons.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def get_search_condition(self, service):

class Freetext(Constraint):
"""
A contraint using plain text to match against title, description,
A constraint using plain text to match against title, description,
subjects, and person names.
"""
_keyword = "keywords"
Expand All @@ -251,11 +251,17 @@ def __init__(self, *words: str):

Parameters
----------
*words : tuple of str
*words : str
One or more string arguments.
It is recommended to pass multiple words in multiple strings
arguments. You can pass in phrases (i.e., multiple words
separated by space), but behaviour might then vary quite
significantly between different registries.

Examples
--------
>>> from pyvo import registry
>>> registry.Freetext("Gamma", "Ray", "Burst") # doctest: +IGNORE_OUTPUT
"""
self.words = words

Expand Down Expand Up @@ -387,7 +393,7 @@ def __init__(self, *stds):

Parameters
----------
*stds : tuple of str
*stds : str
one or more standards identifiers. The constraint will
match records that have any of them.
"""
Expand Down Expand Up @@ -462,7 +468,7 @@ def __init__(self, *bands):

Parameters
----------
*bands : tuple of strings
*bands : strings
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 Expand Up @@ -559,6 +565,7 @@ def __init__(self, ivoid, *more_ivoids):
----------

ivoid : string
One or more string arguments.
The IVOA identifier of the resource to match. As RegTAP
requires lowercasing ivoids on ingestion, the constraint
lowercases the ivoid passed in, too.
Expand Down Expand Up @@ -588,7 +595,7 @@ def __init__(self, *patterns):
Parameters
----------

patterns : tuple of strings
patterns : strings
SQL patterns (i.e., ``%`` is 0 or more characters) for
UCDs. The constraint will match when a resource has
at least one column matching one of the patterns.
Expand Down
Loading