Skip to content

Split up and streamline bokeh.plotting refdocs#11563

Merged
bryevdv merged 8 commits into
branch-2.4from
bryanv/11428_bokeh_plotting_docs
Sep 6, 2021
Merged

Split up and streamline bokeh.plotting refdocs#11563
bryevdv merged 8 commits into
branch-2.4from
bryanv/11428_bokeh_plotting_docs

Conversation

@bryevdv
Copy link
Copy Markdown
Member

@bryevdv bryevdv commented Sep 5, 2021

This PR:

  • removes the duplication of enormous (rendered) docstrings for figure/Figure and gmap/GMap
  • removes the live examples in every glyph method (now static code block)
  • splits chapter into figure, gmap, and helpers sub chapters
  • removes some cruft junk showing up in every model class that does not concern users
  • fixes a mis-render of property links for Instance and Null properties
  • The intentional transitive imports in bokeh.plotting (e.g. show, output_file, etc) aree documented

I'm not sure how much more time I will have to devote to this. Some things that could use a little attention:

  • The top level page for bokeh.plotting and also for all the subpages have no narrative text. A small paragraph would likely improve

This PR does not go as far as splitting up every glyph method. That would be a very large undertaking, really merit some kind of automation, and I am somewhat on the fence about it. I would like to try to find a way to condense enormous duplication in the glyphy method docs without sacrificing the "reference" quality of the reference guide. But there is still lots of room for improvement, even with the changes above the smaller pages are still quite large.

@bryevdv bryevdv added this to the 2.4 milestone Sep 5, 2021
@bryevdv bryevdv requested a review from tcmetzger September 5, 2021 22:33
@bryevdv
Copy link
Copy Markdown
Member Author

bryevdv commented Sep 5, 2021

I also pushed a change to condense default/type info for properties:

before

Screen Shot 2021-09-05 at 16 12 10

after

Screen Shot 2021-09-05 at 16 20 58


Given that there are thousands of properties. this actually saves a non-trivial amount of vertical space and page weight. Also I think it reads easier.

@bryevdv
Copy link
Copy Markdown
Member Author

bryevdv commented Sep 6, 2021

Another change: I made it so that glyph method defaults that were showing up as {'field': 'x'} etc now just show up as "x". Although it is a fib, it is only a slight one since we automatically convert the latter into the former, and the latter is what users will normally experience almost all the time, and it also just makes the docstring far more readable (the interposed dicts were just un-parseable by humans).

before

Screen Shot 2021-09-05 at 19 08 37

after

Screen Shot 2021-09-05 at 19 08 04


Edit: also note that this only affects glyph methods of bokeh.plotting the refdocs for models still report the pristine truth:

Screen Shot 2021-09-05 at 19 18 23

@bryevdv
Copy link
Copy Markdown
Member Author

bryevdv commented Sep 6, 2021

Also note I've submitted a theme issue about the bad rendering of the parameters headings: pydata/pydata-sphinx-theme#464

@bryevdv bryevdv force-pushed the bryanv/11428_bokeh_plotting_docs branch from ae3eae8 to cbc86ad Compare September 6, 2021 04:15
Copy link
Copy Markdown
Member

@tcmetzger tcmetzger left a comment

Choose a reason for hiding this comment

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

This looks great! I built the docs locally and took a look around. I agree that it would be nice to have short intros for the .rst files - especially for plotting.rst which currently renders as a mostly empty page. However, that should not stop us from merging that for 2.4, I think!

@bryevdv bryevdv merged commit 027e061 into branch-2.4 Sep 6, 2021
@bryevdv bryevdv deleted the bryanv/11428_bokeh_plotting_docs branch September 6, 2021 19:20
bryevdv added a commit that referenced this pull request Dec 13, 2021
* split up and streamline bokeh.plotting refdocs

* condense property default and type info

* fix mis-render of Instance property links

* fix broken Null property links

* remove non-functional exclude-members

* clean up field defaults

* document and test transitive imports

* add intros
@github-actions
Copy link
Copy Markdown

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Oct 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reorganize bokeh.plotting in ref guide

2 participants