Skip to content

Commit

Permalink
Merge pull request astropy#577 from astropy/docs-edit-freetext-constr…
Browse files Browse the repository at this point in the history
…aint

Documentation of Freetext constraint
  • Loading branch information
msdemlei authored Jul 12, 2024
2 parents 78dff31 + 1c85510 commit c868716
Showing 1 changed file with 12 additions and 5 deletions.
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

0 comments on commit c868716

Please sign in to comment.