PyAnsys Sphinx Theme Documentation 0.2.3¶
PyAnsys Sphinx Theme¶
Introduction and Purpose¶
The PyAnsys Sphinx theme is an extension of the popular PyData Sphinx Theme used by numpy, pandas, PyVista and a variety other packages. This theme was packaged so that all PyAnsys packages would look and behave consistently.
Documentation¶
Full documentation can found at PyAnsys Sphinx Theme Documentation. The webpage was
also built using the pyansys-sphinx-theme
, so visit the site for a
preview of the theme.
Other PyAnsys packages using the PyAnsys theme include:
Getting Started¶
Install this theme with:
pip install pyansys-sphinx-theme
Next, modify your sphinx conf.py
to use html_theme =
'pyansys_sphinx_theme'
. If you are new to using
Sphinx, see Sphinx Getting Started
documentation.
For usage information, seee Using this Theme
Development and Contributing¶
Feel free to add features or post issues. To develop this theme:
git clone https://github.com/pyansys/pyansys-sphinx-theme.git
pip install -r requirements_docs.txt
make -C doc html
Or for Windows:
cd doc
./make.bat
We use pre-commit to simplfy style checks. You can optionally use this by following the installation and usage guides.
License¶
This theme is licened under the MIT License.
Code Examples¶
Here’s a quick preview for how Python code looks using the
pyansys-sphinx-theme
. For more examples, click the links at the
top of the page to see function, method, and class documentation.
Rendered Python Code¶
>>> num = 10
>>> if num > 0:
... print("Positive number")
... elif num == 0:
... print("Zero")
... else:
... print("Negative number")
Positive number