From 10cb80a2ae89c6d092150b1b1529225b15c236b7 Mon Sep 17 00:00:00 2001 From: Kenneth Lyons Date: Mon, 11 May 2020 20:23:10 -0700 Subject: [PATCH 1/7] Add dependencies for docs build --- doc/requirements.txt | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 doc/requirements.txt diff --git a/doc/requirements.txt b/doc/requirements.txt new file mode 100644 index 00000000..d9335fc8 --- /dev/null +++ b/doc/requirements.txt @@ -0,0 +1,6 @@ +pyside2 +numpy +scipy +h5py +sphinx +sphinx_rtd_theme From f2e91d1b9a2390b8001e19ce84a0aa5cc4937eab Mon Sep 17 00:00:00 2001 From: Kenneth Lyons Date: Mon, 11 May 2020 20:45:25 -0700 Subject: [PATCH 2/7] Add matplotlib and pyopengl to docs dependencies --- doc/requirements.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/requirements.txt b/doc/requirements.txt index d9335fc8..a98d86f2 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -2,5 +2,7 @@ pyside2 numpy scipy h5py +matplotlib +pyopengl sphinx sphinx_rtd_theme From 5353acdb1c988d7a67baad46ae2fa16a276e0ee0 Mon Sep 17 00:00:00 2001 From: Kenneth Lyons Date: Mon, 11 May 2020 21:17:57 -0700 Subject: [PATCH 3/7] Static paths not used for docs. Fix malformed table in docstring --- doc/source/conf.py | 2 +- pyqtgraph/graphicsItems/PlotItem/PlotItem.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index dd5e0718..e59e5efd 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -122,7 +122,7 @@ html_theme = 'sphinx_rtd_theme' # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] +#html_static_path = ['_static'] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. diff --git a/pyqtgraph/graphicsItems/PlotItem/PlotItem.py b/pyqtgraph/graphicsItems/PlotItem/PlotItem.py index dd864c49..73aa29cb 100644 --- a/pyqtgraph/graphicsItems/PlotItem/PlotItem.py +++ b/pyqtgraph/graphicsItems/PlotItem/PlotItem.py @@ -290,7 +290,7 @@ class PlotItem(GraphicsWidget): Place axis items as given by `axisItems`. Initializes non-existing axis items. ============== ========================================================================================== - **Arguments:**< + **Arguments:** *axisItems* Optional dictionary instructing the PlotItem to use pre-constructed items for its axes. The dict keys must be axis names ('left', 'bottom', 'right', 'top') and the values must be instances of AxisItem (or at least compatible with AxisItem). From ae8fc195da919adcc7466746d8daf1040deee849 Mon Sep 17 00:00:00 2001 From: Kenneth Lyons Date: Sat, 16 May 2020 10:14:52 -0700 Subject: [PATCH 4/7] Disable inherited docstrings --- doc/source/conf.py | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/source/conf.py b/doc/source/conf.py index e59e5efd..a979488a 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -88,6 +88,7 @@ pygments_style = 'sphinx' # A list of ignored prefixes for module index sorting. #modindex_common_prefix = [] +autodoc_inherit_docstrings = False # -- Options for HTML output --------------------------------------------------- From 54ade7dfb8a341b40c9f2d099216321145e12159 Mon Sep 17 00:00:00 2001 From: Kenneth Lyons Date: Sun, 17 May 2020 16:06:00 -0700 Subject: [PATCH 5/7] Add readthedocs config file as recommended --- .readthedocs.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .readthedocs.yml diff --git a/.readthedocs.yml b/.readthedocs.yml new file mode 100644 index 00000000..795d359a --- /dev/null +++ b/.readthedocs.yml @@ -0,0 +1,12 @@ +# Read the Docs configuration file +# https://docs.readthedocs.io/en/stable/config-file/v2.html + +version: 2 + +python: + version: 3 + install: + - requirements: doc/requirements.txt + +sphinx: + fail_on_warning: true From 9d844f3a423d8846fa9742eb837d41848030ec09 Mon Sep 17 00:00:00 2001 From: Kenneth Lyons Date: Sun, 17 May 2020 20:10:47 -0700 Subject: [PATCH 6/7] Mock dependencies that aren't strictly needed for docs build --- doc/requirements.txt | 3 --- doc/source/conf.py | 5 +++++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/requirements.txt b/doc/requirements.txt index a98d86f2..60d1d1e7 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -1,8 +1,5 @@ pyside2 numpy -scipy -h5py -matplotlib pyopengl sphinx sphinx_rtd_theme diff --git a/doc/source/conf.py b/doc/source/conf.py index a979488a..3da573eb 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -89,6 +89,11 @@ pygments_style = 'sphinx' #modindex_common_prefix = [] autodoc_inherit_docstrings = False +autodoc_mock_imports = [ + "scipy", + "h5py", + "matplotlib", +] # -- Options for HTML output --------------------------------------------------- From 8b66d0e20f58655c1350f327effe6f6ac6ccca85 Mon Sep 17 00:00:00 2001 From: Kenneth Lyons Date: Mon, 18 May 2020 14:53:41 -0700 Subject: [PATCH 7/7] Updated README with readthedocs link and badge --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b461f4f6..d082d7ee 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ [![Build Status](https://pyqtgraph.visualstudio.com/pyqtgraph/_apis/build/status/pyqtgraph.pyqtgraph?branchName=develop)](https://pyqtgraph.visualstudio.com/pyqtgraph/_build/latest?definitionId=17&branchName=develop) +[![Documentation Status](https://readthedocs.org/projects/pyqtgraph/badge/?version=latest)](https://pyqtgraph.readthedocs.io/en/latest/?badge=latest) PyQtGraph ========= @@ -72,4 +73,4 @@ Documentation The easiest way to learn pyqtgraph is to browse through the examples; run `python -m pyqtgraph.examples` for a menu. -The official documentation lives at http://pyqtgraph.org/documentation +The official documentation lives at https://pyqtgraph.readthedocs.io