-
Notifications
You must be signed in to change notification settings - Fork 38
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
Support version
field in SearchClient.post_search()
#1079
Conversation
* Added ignore for `SearchQuery` in pyproject.toml filterwarnings for pytest * Updated SphinxDocs for `SearchQueryV1` * Added `SearchQueryV1` to the _generate_init.py script * Added `SearchQueryV1` class for new v1 search request version * Added deprecation warning to the `SearchQuery` class during init * Added unit and functional tests for `SearchQueryV1` Co-authored-by: MaxTueckeGlobus <[email protected]>
39acb8f
to
2c9df56
Compare
changelog.d/20241011_113822_8730430+m1yag1_sc_35200_version_field_post_search.rst
Outdated
Show resolved
Hide resolved
changelog.d/20241011_113822_8730430+m1yag1_sc_35200_version_field_post_search.rst
Outdated
Show resolved
Hide resolved
changelog.d/20241011_113822_8730430+m1yag1_sc_35200_version_field_post_search.rst
Outdated
Show resolved
Hide resolved
…eld_post_search.rst Co-authored-by: Stephen Rosen <[email protected]>
…eld_post_search.rst Co-authored-by: Stephen Rosen <[email protected]>
@sirosen I believe I've taken care of all the comments except the test updates for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor final edits requested, and then we should be good to go!
:param advanced: Whether to enable (``True``) or not to enable (``False``) advanced | ||
parsing of query strings. The default of ``False`` is robust and guarantees that | ||
the query will not error with "bad query string" errors | ||
:param additional_fields: additional data to include in the query document |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a little surprised that pylint is passing, given that we have some undocumented parameters. Maybe I need to look at its settings for __init__
... Regardless, we need param doc for filters
, etc. It should be pretty short and easy to add.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pylint catches that? PyCharm notifies me about parameter mismatches in docstrings but I haven't spotted that in other linters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, it's supposed to, under our config:
[tool.pylint]
load-plugins = ["pylint.extensions.docparams"]
accept-no-param-doc = "false"
[tool.pylint."messages control"]
disable = [ # simplified -- we have other disabled rules
"missing-raises-doc",
]
But I'm guessing that it doesn't understand that the class docstring applies to the init method. Maybe it's configurable and we can fix it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just caught a minor issue doing my final pre-approval pass. Sorry for not noticing it sooner.
Also, sort
needs to be added to the docstring -- I didn't see it there.
@sirosen no worries! I've pushed updates for the last review comment on sort. |
https://app.shortcut.com/globus/story/35200/python-sdk-support-version-field-in-searchclient-post-search
Summary of changes
SearchQuery
in pyproject.toml filterwarnings for pytestSearchQueryV1
SearchQueryV1
to the _generate_init.py scriptSearchQueryV1
class for new v1 search request versionSearchQuery
class during initSearchQueryV1
andSearchQuery
deprecation warnings.📚 Documentation preview 📚: https://globus-sdk-python--1079.org.readthedocs.build/en/1079/