Skip to content

Commit

Permalink
More doc on docs site
Browse files Browse the repository at this point in the history
  • Loading branch information
qartik committed Oct 3, 2023
1 parent 9e52a5e commit c184306
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
python -m pytest
- name: Sphinx documentation build
run: |
sphinx-build -M html docs/source/ docs/build/
make docs
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ __pypackages__/
.DS_Store
.qtmlib/
*.venv/

# autogenerated by sphinx-napoleon
docs/source/modules.rst
docs/source/pytemplate.rst
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ lint:
pre-commit run --all-files

docs:
sphinx-apidoc -f -o docs/source/ pytemplate
sphinx-build -M html docs/source/ docs/build/

clean:
Expand Down
14 changes: 13 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here.
import pathlib
import sys

sys.path.insert(0, pathlib.Path(__file__).parents[2].resolve().as_posix())

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

Expand All @@ -14,7 +21,12 @@
# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = []
extensions = [
"sphinx.ext.doctest",
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.napoleon",
]

exclude_patterns = []

Expand Down
7 changes: 7 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
qtmlib
======

Demo Sphinx site for the `CQCL pytemplate <https://github.com/CQCL/pytemplate>`_ project.

----

.. toctree::
:maxdepth: 2
:caption: Contents:

modules

Installation
------------

Expand Down Expand Up @@ -41,4 +47,5 @@ Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

0 comments on commit c184306

Please sign in to comment.