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

docs(python/adbc_driver_manager): improve docstrings for set_options #965

Merged
merged 2 commits into from
Aug 14, 2023

Conversation

aiguofer
Copy link
Contributor

@aiguofer aiguofer commented Aug 4, 2023

Add example usage for how to set options from the Python bindings.

@aiguofer aiguofer requested a review from lidavidm as a code owner August 4, 2023 23:08
@github-actions
Copy link

github-actions bot commented Aug 4, 2023

⚠️ Please follow the Conventional Commits format in CONTRIBUTING.md for PR titles.

@lidavidm lidavidm changed the title docs(python/drivermgr) Improve docstrings for set_options docs(python/adbc_driver_manager): improve docstrings for set_options Aug 7, 2023
@lidavidm
Copy link
Member

lidavidm commented Aug 7, 2023

Hmm, I think the actual problem is that Sphinx/autodoc aren't documenting the parameters for any of these methods, when I look: https://arrow.apache.org/adbc/0.5.1/python/api/adbc_driver_manager.html#adbc_driver_manager.AdbcConnection.set_options

@aiguofer
Copy link
Contributor Author

aiguofer commented Aug 7, 2023

That's certainly the biggest issue. The other issue IMO is that generally when I see **kwargs in the parameters I think of something I can call like this: some_function(arg1=value1, arg2=value2, ...), but this is a little different since most options have periods, so you HAVE to call it like some_function(**kwarg_dict). To me that feels a little non-standard in Python.

Copy link
Member

@lidavidm lidavidm left a comment

Choose a reason for hiding this comment

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

LGTM, but maybe let's wrap the code in backticks so it renders properly once Sphinx processes it (so,

Pass options as kwargs: ``set_options(**{"some.option": "value"})``.

@lidavidm lidavidm merged commit 7de9038 into apache:main Aug 14, 2023
65 checks passed
@lidavidm lidavidm added this to the ADBC Libraries 0.6.0 milestone Aug 14, 2023
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

Successfully merging this pull request may close these issues.

2 participants