Skip to content

Commit

Permalink
Merge pull request #25 from philipstarkey/docs-fix
Browse files Browse the repository at this point in the history
WIP: Fix docs build
  • Loading branch information
chrisjbillington authored Dec 17, 2024
2 parents 249fe31 + d8cf6ce commit 9f7e120
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 31 deletions.
15 changes: 10 additions & 5 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,24 @@
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['sphinx.ext.autodoc',
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.mathjax',
'sphinx.ext.napoleon',
'sphinx.ext.viewcode']
'sphinx.ext.viewcode',
'myst_parser',
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'
source_suffix = {
'.rst': 'restructuredtext',
'.md': 'markdown',
}

# The master toctree document.
master_doc = 'index'
Expand Down Expand Up @@ -100,7 +105,7 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'default'
html_theme = 'sphinx_rtd_theme'

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
Expand Down
3 changes: 1 addition & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ Utilities include those providing thread-safe access to Qt objects, simplified Q
QtUtils also includes the Fugue icon set, free to use with attribution to `Yusuke Kamiyamane`_.

.. note::
`qtutils` 3.0 dropped support for Python 2.7, PyQt4 and PySide. If you need to use these platforms, you may use `qtutils` 2.3.2 or earlier.
`qtutils` 2.3.2 provides an abstraction layer for PySide/PyQt4 that matches the PyQt5 API.
`qtutils` 4.0 dropped support for PySide2. If you need to use PySide2, use `qtutils` 3.1.0 or earlier.

.. _`Yusuke Kamiyamane`: http://p.yusukekamiyamane.com/

Expand Down
9 changes: 4 additions & 5 deletions docs/install.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
************
Installation
************
These installation instructions assume you already have Python installed. If you do not already have a copy of Python, we recommend you install `Anaconda Python`_.
These installation instructions assume you already have Python installed.

.. _`Anaconda Python`: https://www.continuum.io/downloads

====
PyPi
Expand All @@ -26,9 +25,9 @@ To upgrade to a specific version of qtutils (or, alternatively, if you wish to d
where :code:`<version>` is replaced by the version you wish (for example :code:`pip install -U qtutils==2.3.2`).

========
Anaconda
========
=====
conda
=====
To install qtutils using `conda` run::

conda install -c labscript-suite qtutils
Expand Down
14 changes: 6 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,12 @@ Tracker = "https://github.com/philipstarkey/qtutils/issues"
pyqt5 = ["PyQt5"]
pyside6 = ["PySide6"]
docs = [
"PyQt5",
"PySide6",
"importlib_metadata",
"setuptools_scm",
"Sphinx==3.0.1",
"sphinx-rtd-theme==0.4.3",
"recommonmark==0.6.0",
"m2r==0.2.1",
"PyQt5",
"PySide6",
"Sphinx>=7.0.0",
"sphinx-rtd-theme>=1.3.0",
"recommonmark>=0.7.1",
"myst-parser",
]


Expand Down
19 changes: 8 additions & 11 deletions readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@
# Required
version: 2

build:
os: ubuntu-22.04
tools:
python: "3.12"
jobs:
post_install:
- pip install -e .[docs]

# Build documentation in the docs/ directory with Sphinx
sphinx:
builder: dirhtml
Expand All @@ -14,14 +22,3 @@ sphinx:
formats:
- pdf
- epub

# Optionally set the version of Python and requirements required to build your docs
python:
version: 3.7
install:
- method: pip
path: .
extra_requirements:
- docs
system_packages: true

0 comments on commit 9f7e120

Please sign in to comment.