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

pyvo.regsearch keywords argument accepts a string but returns too many results #200

Closed
tomdonaldson opened this issue Dec 18, 2019 · 1 comment
Assignees

Comments

@tomdonaldson
Copy link
Contributor

pyvo.regsearch includes a keywords argument is documented to be a list of strings. However, a string is accepted without raising an exception, but doesn't have an intuitive behavior. The string is treated as a sequence of characters which individually are used as keywords, giving many more results than one would expect for a single keyword.

In the case of keywords='allwise', service_type='image', 268 results are returned. With keywords=['allwise'], service_type='image', only one result is returned.

Since this is an easy mistake for a user to make, we should either raise an exception when keywords is a str, or accept the str value and treat it as a single keyword. The latter seems most reasonable to me.

@tomdonaldson tomdonaldson self-assigned this Dec 18, 2019
tomdonaldson added a commit to tomdonaldson/pyvo that referenced this issue Dec 18, 2019
tomdonaldson added a commit to tomdonaldson/pyvo that referenced this issue Dec 18, 2019
tomdonaldson added a commit that referenced this issue Dec 18, 2019
Fix issue #200 - treat keywords str value as single keyword
@cbanek
Copy link
Contributor

cbanek commented Dec 19, 2019

Fixed by #201

@cbanek cbanek closed this as completed Dec 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants