Skip to content

Commit 78d7395

Browse files
committed
CI: Build the documentation
1 parent 60f63c4 commit 78d7395

File tree

4 files changed

+15
-8
lines changed

4 files changed

+15
-8
lines changed

.github/workflows/ci.yml

+8
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@ jobs:
151151
shell: bash
152152
run: |
153153
source bin/test_symengine_unix.sh
154+
pip install sphinx m2r2 sphinx-autodoc2 sphinx-book-theme
155+
sphinx-build docs/ genDocs
154156
env:
155157
PYTEST_ADDOPTS: ${{ matrix.PYTEST_ADDOPTS }}
156158
USE_GLIBCXX_DEBUG: ${{ matrix.USE_GLIBCXX_DEBUG }}
@@ -185,6 +187,12 @@ jobs:
185187
BUILD_SHARED_LIBS: ${{ matrix.BUILD_SHARED_LIBS }}
186188
PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }}
187189

190+
- name: Generate documentation
191+
shell: bash
192+
run: |
193+
pip install sphinx m2r2 sphinx-autodoc2 sphinx-book-theme
194+
sphinx-build docs/ genDocs
195+
188196
- name: Deploy Documentation
189197
if: ${{ (github.ref == 'refs/heads/main' && github.repository == 'Symengine/symengine.py') || (github.ref == 'refs/heads/master' && github.repository == 'Symengine/symengine.py')}}
190198
uses: peaceiris/actions-gh-pages@v3

bin/test_symengine_unix.sh

-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,3 @@ source bin/install_travis.sh
1919
# Build Python wrappers and test
2020
cd $PYTHON_SOURCE_DIR
2121
bin/test_travis.sh
22-

docs/conf.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,14 @@
1717
import os
1818
import sys
1919

20-
sys.path.insert(0, os.path.abspath(".."))
21-
22-
import symengine
23-
2420
# -- Project information -----------------------------------------------------
2521

2622
project = 'symengine'
2723
copyright = '2021, SymEngine development team <[email protected]>'
2824
author = 'SymEngine development team <[email protected]>'
2925

3026
# The full version, including alpha/beta/rc tags
31-
release = symengine.__version__
27+
# release = symengine.__version__
3228

3329

3430
# -- General configuration ---------------------------------------------------
@@ -46,9 +42,13 @@
4642
"sphinx.ext.duration", # Shows times in the processing pipeline
4743
"sphinx.ext.mathjax", # Need math support
4844
"sphinx.ext.githubpages", # Puts the .nojekyll and CNAME files
49-
"sphinxcontrib.apidoc", # Automatically sets up sphinx-apidoc
5045
# "recommonmark", # Parses markdown
5146
"m2r2", # Parses markdown in rst
47+
"autodoc2",
48+
]
49+
50+
autodoc2_packages = [
51+
"../symengine",
5252
]
5353

5454
# Add any paths that contain templates here, relative to this directory.

docs/index.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Symengine Python API Documentation
1010
:maxdepth: 2
1111
:caption: Contents:
1212

13-
source/modules
13+
apidocs/index
1414

1515
.. mdinclude:: ../README.md
1616

0 commit comments

Comments
 (0)