Skip to content

Enable nit-picky mode in documentation and fix associated warnings#1753

Merged
j9ac9k merged 9 commits intopyqtgraph:masterfrom
j9ac9k:expand-docs
Sep 14, 2022
Merged

Enable nit-picky mode in documentation and fix associated warnings#1753
j9ac9k merged 9 commits intopyqtgraph:masterfrom
j9ac9k:expand-docs

Conversation

@j9ac9k
Copy link
Copy Markdown
Member

@j9ac9k j9ac9k commented May 1, 2021

This PR is just a start, and I would welcome any input; other maintainers are encouraged to push changes to this branch should they feel a change is worthwhile.

This PR starts with

  • updating the script for doc/listmissing.py, which attempts to identify portions of pyqtgraph that are undocumented.
  • update .gitignore to ignore the build directory.
  • Fix ColorMapWidget documentation links
  • Using the pydata-sphinx-theme ( https://github.com/pydata/pydata-sphinx-theme )

After that, this PR attempts to restructure existing documentation into 4 distinct sections.

  • Getting Started
  • User Guide
  • API Reference
  • Contributing

The main index.html page is now using panels (heavily borrowed the idea from pandas: https://pandas.pydata.org/docs/ ). The rest of the changes in this diff has to do with shifting around the relevant

@j9ac9k
Copy link
Copy Markdown
Member Author

j9ac9k commented May 1, 2021

As of right now, these are the only warnings I'm getting

checking consistency... /Users/ogi/Developer/pyqtgraph/doc/source/api_reference/index.rst: WARNING: document isn't included in any toctree
/Users/ogi/Developer/pyqtgraph/doc/source/development/index.rst: WARNING: document isn't included in any toctree
/Users/ogi/Developer/pyqtgraph/doc/source/getting_started/index.rst: WARNING: document isn't included in any toctree
/Users/ogi/Developer/pyqtgraph/doc/source/user_guide/index.rst: WARNING: document isn't included in any toctree
done

Copy link
Copy Markdown
Member

@ixjlyons ixjlyons left a comment

Choose a reason for hiding this comment

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

Definitely a fan of the restructuring. This has been on my mind for a while I just never got around to doing it. Looks good overall.

exporting
prototyping

The following is a user guide for using portions of the library
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This should go at the top?

.gitignore Outdated

# Sphinx documentation
docs/_build/
doc/source/_build
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think this is covered by the build/ entry up above. The docs get built in doc/build per the Makefile/make.bat. There's even another entry to ignore the docs build on line 24.


Contents:

.. toctree::
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Here is where I'd put a hidden toctree referring to the top-level sections. This is the cause of the warnings about those pages not being included in a toctree. Since we already have the new panels, we don't really need to show the actual toctree, so this should do it (also makes the top nav bar work):

.. toctree::
   :hidden:

   getting_started/index
   user_guide/index
   debug
   development/index
   api_reference/index

Not sure what the best ordering is.

@j9ac9k
Copy link
Copy Markdown
Member Author

j9ac9k commented Sep 9, 2022

This PR enabled nit-picky mode, and I'm working on addressing the warnings that stem from that... there are still 93 warnings, so far from complete.

@j9ac9k
Copy link
Copy Markdown
Member Author

j9ac9k commented Sep 9, 2022

If anyone else is feeling bored and wants to bring the nit-picky warning/error count down, feel free to push changes to this branch :D

@j9ac9k j9ac9k changed the title First Attempt at Restructuring Documentation Enable nit-picky mode in documentation and fix associated warnings Sep 14, 2022
@j9ac9k j9ac9k marked this pull request as ready for review September 14, 2022 03:16
@j9ac9k
Copy link
Copy Markdown
Member Author

j9ac9k commented Sep 14, 2022

RTD passed CI 🎊

@j9ac9k
Copy link
Copy Markdown
Member Author

j9ac9k commented Sep 14, 2022

Cancelled CI run, one job was hanging a bit, going to merge as is. Thanks @ixjlyons for your help!

@j9ac9k j9ac9k merged commit 4ab6687 into pyqtgraph:master Sep 14, 2022
@j9ac9k j9ac9k deleted the expand-docs branch September 14, 2022 03:42
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