-
Notifications
You must be signed in to change notification settings - Fork 609
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(reference): improve signatures #7262
Conversation
Not really a huge fan of showing the full module path for methods: For top-level functions I think we should show the |
I'm looking into ways to render the longer name selectively |
This has no public-facing changes. It just simplifies how we set the package for each item in reference. Now everything has the default of being underneath the top-level "ibis" unless overridden within a page, section, or member.
When looking at the reference, some methods are listed by where they are implemented, not where they are exposed publicly. eg `ibis.connect()` signature is listed as `backends.base.connect(resource, **kwargs)` currently. This commit changes that to simple `connect(resource, **kwargs)` where possible. For some reason I couldn't do this for `ibis.NA`, not sure why...
GroupedTable is actually defined in the `ibis.expr.types.groupby` module, not the `ibis.expr.types.relations` module. Before, quartodoc was noticably slower to build this page of documentation than the other pages, because it looked in the wrong place and then had to do another import to actually get to the right place. Before it took ~10s to build this page, now it is instantaneous. Not a big deal, but is nice to iterate faster when working on the reference docs.
Now the signatures appear as `ibis.random()` instead of just `random()`. Per ibis-project#7159 (comment) Before, quartodoc wasn't even respecting this option, because it was incorrectly definied at the wrong nesting level. I had to move the option out of the "member_options" section for any change to occur.
4a6e345
to
e994026
Compare
Alright, I was able to specify Unfortunately I can't specify |
This is better, thank you! |
Sorry, just getting to this. If I'm understanding the original docs did this:
I wonder if this strategy would work?
So something like... #
quartodoc:
package: ibis
sections:
...
- name: read_delta
dynamic: true becomes quartodoc:
package: null
sections:
...
- name: ibis.read_delta
dynamic: true It seems like getting the config right here is tricky, because one set of things (e.g. GroupedTable) are displayed in a way that is less centered on how you might import them (i.e. if you see a GroupedTable, here are the methods you might be able to use), while the others need to make clear where they can be imported from (e.g. you can't |
Followup to #7159
Make the signatures appear show the full path,
eg
random()
is nowibis.random()
.Also fix some of the paths where possible,
eg now it is
ibis.connect()
instead ofbackends.base.connect()
@machow, note how quartodoc was silently ignoring the previously-incorrectly-configured
signature_name
option. It would have been nice if the build had failed here, instead of us thinking that wehad configured something.
See the difference in
ibis.connect()
:and note how in the sidebar you just see "random", not "ibis.random"