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: Reorganize reference v2 #7159

Merged
merged 12 commits into from
Sep 27, 2023

Conversation

NickCrews
Copy link
Contributor

@NickCrews NickCrews commented Sep 14, 2023

This is a followup per #7141

  • Move every datatype-specific API out of the top-level section. eg ibis.array() got moved to collections section
  • Now only backend-specific stuff got left in the top-level section. Therefore, I renamed it to "Connections API".

In addition to these high-level changes, also a few tweaks:

  • soft deprecate ibis.where
  • fix ibis.ifelse docstring (plenty other functions like this are still missing docstrings, but at least the existing ones should be correct)
  • import ibis in a doctest to prevent a rendering failure. This was little weird. This wasn't failing before only due to the ordering of this function in the larger API tab. All of the members in a a quartodoc section get squashed into a single .qmd file. Then quarto goes through and evaluates all the docstrings. So if the very first docstring in each API page does import ibis, then we are all good. But due to the reordering I did, this no longer happened here, so I had to add this import. At a higher-level, this isn't great, because it means different docstrings share state, and that depends on their ordering in a page. yuck. But maybe not worth it to fix. Possibly we could del all existing variables with some prelude lines, similar to what is done in docs: add prelude lines to all code samples #7158, but IDK this might all be overkill.

Things that I think should still happen in a followup PR:

  • I want it to be more obvious how top level stuff is accessed from ibis. e.g. looking at now() in the temporal section, I wish the function signature was ibis.now().
  • Make things appear in the correct place where possible, eg ibis.random() instead of ibis.expr.api.random().

@NickCrews
Copy link
Contributor Author

I just fixed those broken links, but this is ready for review! It is a little hefty, so I appreciate the effort!

Copy link
Member

@cpcloud cpcloud left a comment

Choose a reason for hiding this comment

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

If you can remove the changes to the backend layout this LGTM!

docs/_quarto.yml Outdated Show resolved Hide resolved
@NickCrews
Copy link
Contributor Author

NickCrews commented Sep 20, 2023

Now top-level backend API is under Backend tab. Looks like this (I'm currently on the Backend/top level page, showing off how the expressions drop-down doesn't contain backend stuff):

image

@NickCrews
Copy link
Contributor Author

NickCrews commented Sep 20, 2023

I am getting warning: (but still builds)

Warning: The computation used to determine source line information from the engine timed out.
Line number information will be unavailable and/or inaccurate.

is this to be expected or did I break something?

@lostmygithubaccount
Copy link
Member

I am getting

Warning: The computation used to determine source line information from the engine timed out.
Line number information will be unavailable and/or inaccurate.

is this to be expected or did I break something?

I've never seen this before working w/ Quarto

I will give a drive-by comment while I'm here that I don't agree w/ hiding the backend docs within the API docs. I understand that it makes sense, as they are API docs to a large extent, but it's useful for users IMO to easily see the list of available backends at a top-level and we can do more platform-specific content in those pages going forward

@NickCrews
Copy link
Contributor Author

Ah I think my latest screenshot was confusing. The backend stuff is NOT underneath the rest of the API stuff, it's in its own top level tab as it was before.

@cpcloud cpcloud added this to the 7.0 milestone Sep 21, 2023
docs/_quarto.yml Outdated Show resolved Hide resolved
docs/_quarto.yml Outdated Show resolved Hide resolved
docs/_quarto.yml Outdated Show resolved Hide resolved
@cpcloud cpcloud added the docs Documentation related issues or PRs label Sep 21, 2023
Copy link
Member

@cpcloud cpcloud left a comment

Choose a reason for hiding this comment

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

This LGTM!

@lostmygithubaccount Can you give a review?

@lostmygithubaccount
Copy link
Member

lostmygithubaccount commented Sep 21, 2023

where is this coming from? should be "Top-level backend API"

image

I can only see it in the output html file

Copy link
Member

@lostmygithubaccount lostmygithubaccount left a comment

Choose a reason for hiding this comment

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

LGTM -- can ignore that nit but if it's easy to fix that'd be nice for consistency

@NickCrews
Copy link
Contributor Author

I will push those two fixes!

@NickCrews
Copy link
Contributor Author

  • fixed the title (I messed up that screenshot, it was a from a stale build of quartodoc, now it is correct)
  • moved least, greatest, ifelse to ALSO be in generic. I kept them in the old place too for discoverability.

docs/_quarto.yml Outdated
@@ -111,6 +111,7 @@ website:
collapse-level: 2
contents:
- support_matrix.qmd
- reference/connection.qmd
Copy link
Member

Choose a reason for hiding this comment

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

Can you move this to be only in the API docs? I feel like we should keep the backend tab to only contain the support matrix and the backends and nothing else. Otherwise it looks cluttered to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure. Under what section and what should the page be named?

Copy link
Member

Choose a reason for hiding this comment

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

Can you add it this in a follow up PR? In that PR I think you remove this section and let the API docs show up as they usually do under the Reference tab.

@machow
Copy link
Contributor

machow commented Sep 26, 2023

RE

I want it to be more obvious how top level stuff is accessed from ibis. e.g. looking at now() in the temporal section, I wish the function signature was ibis.now().

Just a heads up, in quartodoc you can set signature_name: full to show the full path to an object in its signature (e.g. ibis.now()). The tricky thing is that you probably don't want the long signatures in methods, so you may need to set it just for those top level functions. (It looks like signature_name is undocumented :/ ).

Here are the docs on setting options: https://machow.github.io/quartodoc/get-started/basic-content.html#setting-default-options

docs/_quarto.yml Outdated
- name: random
dynamic: true
- name: range_window
- name: set_backend
Copy link
Member

Choose a reason for hiding this comment

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

Actually can you add these in a follow up PR? It's hard to see the structural changes here without building the docs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not quite sure what you mean by "these"? In my latest push I didn't move anything to underneath the Backends tab. Now just the "top-level" section only contains connection stuff and is renamed "Connection API". Hopefully this is clear enough.

I wish quarto had a preview feature for PRs like this, like readthedocs does... :(

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, do you mean just remove commit b3429e9 from this PR and follow up with that later?

Copy link
Member

Choose a reason for hiding this comment

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

Sorry! By "these" I mean the set_backend/get_backend/connect methods.

Copy link
Contributor Author

@NickCrews NickCrews Sep 27, 2023

Choose a reason for hiding this comment

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

I assumed b3429e9 so, so I removed it from the commit stack.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, now I see your clarification, thanks! I think now your concern is rendered useless, as now these methods aren't getting moved. Everything else is just getting moved out, and this section is getting renamed.

@NickCrews NickCrews force-pushed the docs-reference-move branch 2 times, most recently from b3429e9 to 554c73a Compare September 27, 2023 20:38
@NickCrews
Copy link
Contributor Author

NickCrews commented Sep 27, 2023

OK, I removed b3429e9 from this PR because it is a bit unrelated and clutters up the main structure here.

In a followup PR I want to

I think now every comment has been addressed, but please double check me.

docs/_quarto.yml Outdated Show resolved Hide resolved
@cpcloud
Copy link
Member

cpcloud commented Sep 27, 2023

I think this is good to go in now!

I moved Connections API to its own section, and fixed a few failing references.

@cpcloud cpcloud enabled auto-merge (rebase) September 27, 2023 22:35
@cpcloud cpcloud merged commit 44c5a2b into ibis-project:master Sep 27, 2023
@NickCrews
Copy link
Contributor Author

Money, thank you so much for finishing this up and getting it merged!

NickCrews added a commit to NickCrews/ibis that referenced this pull request Sep 29, 2023
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.
cpcloud pushed a commit to NickCrews/ibis that referenced this pull request Sep 30, 2023
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.
cpcloud pushed a commit that referenced this pull request Oct 1, 2023
Now the signatures appear as
`ibis.random()` instead of just `random()`.
Per
#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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation related issues or PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants