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

Split out data documentation section into separate subpages #2761

Open
joelostblom opened this issue Dec 18, 2022 · 3 comments · Fixed by #2781
Open

Split out data documentation section into separate subpages #2761

joelostblom opened this issue Dec 18, 2022 · 3 comments · Fixed by #2781

Comments

@joelostblom
Copy link
Contributor

Follow up on what was done for spatial data here #2750 (comment).

@binste
Copy link
Contributor

binste commented Dec 28, 2022

Started working on this but I'm facing an issue with the sphinx toctree directive. Maybe @joelostblom or @mattijn have some idea how to resolve this?

I tried to replace the still existing data.rst with data/index.rst. To do this, I set data/index.rst as the start page of the user guide in index.rst:

.. toctree::
   :maxdepth: 1
   :hidden:

   Getting Started <getting_started/overview>
   User Guide <user_guide/data/index>
   Examples <gallery/index>
   API Reference <user_guide/API>
   user_guide/ecosystem
   releases/changes

But the issue is now that in data/index.rst I need to include the toctree directives for the User Guide sidebar as well as the toctree for the data subpages.

.. toctree::
   :maxdepth: 1
   :caption: User Guide
   :hidden:

   self
   ../encodings/index
   ../marks/index
   ../transform/index
   ../interactions
   ../compound_charts
   ../scale_resolve
   ../times_and_dates
   ../customization
   ../configuration
   ../saving_charts


.. toctree::
   :maxdepth: 1
   :caption: Advanced Usage
   :hidden:

   ../internals
   ../importing
   ../display_frontends
   ../custom_renderers
   ../data_transformers
   ../large_datasets

.. toctree::
   :maxdepth: 1
   :hidden:
   
   dataframe
   url
   spatial
   generator
   dict

Having all of these toctrees with multiple levels seems confusing to sphinx. It just places dataframe, url, etc. at the end of "Advanced Usage":

image

Found sphinx-doc/sphinx#2103 which seems related but does not provide a solution.

Looking at other packages, I did not yet find an example of a documentation which achieved what we want to do here. For example in the matplotlib documentation, they have a landing page for e.g. Plot types which is not the same as the first sidebar entry "Basics". We could also do that, i.e. a "User Guide" landing page, but I don't find it very useful and would prefer to directly start with the "Data" page as was the case so far.

If you're not familiar with a workaround, I'd suggest that I revert the structure back to having one "Data" page without subpages.

@mattijn
Copy link
Contributor

mattijn commented Dec 28, 2022

I also tried a few options but was unable to find a solution. For now, reverting to a single page seems to be the best option. However, if you have any other ideas that could resolve the issue without resulting in a large, single page, I'm open to those as well.

I noticed that pandas also uses a large, single page for their documentation, so it might not be a big deal. See for example this page https://pandas.pydata.org/docs/user_guide/dsintro.html.

@joelostblom
Copy link
Contributor Author

I don't know of a good solution to this either, so thanks for reverting to a single page again. I think the current page is quite long so my vote would be to still keep this issue open as a low priority item in case there is a solution for splitting it into multiple pages in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants