Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI,DOC: Build API documentation #471

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ jobs:
shell: bash
run: |
source bin/test_symengine_unix.sh
pip install sphinx m2r2 sphinx-autodoc2 sphinx-book-theme
sphinx-build docs/ genDocs
env:
PYTEST_ADDOPTS: ${{ matrix.PYTEST_ADDOPTS }}
USE_GLIBCXX_DEBUG: ${{ matrix.USE_GLIBCXX_DEBUG }}
Expand Down Expand Up @@ -185,6 +187,12 @@ jobs:
BUILD_SHARED_LIBS: ${{ matrix.BUILD_SHARED_LIBS }}
PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }}

- name: Generate documentation
shell: bash
run: |
pip install sphinx m2r2 sphinx-autodoc2 sphinx-book-theme
sphinx-build docs/ genDocs

- name: Deploy Documentation
if: ${{ (github.ref == 'refs/heads/main' && github.repository == 'Symengine/symengine.py') || (github.ref == 'refs/heads/master' && github.repository == 'Symengine/symengine.py')}}
uses: peaceiris/actions-gh-pages@v3
Expand Down
1 change: 0 additions & 1 deletion bin/test_symengine_unix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@ source bin/install_travis.sh
# Build Python wrappers and test
cd $PYTHON_SOURCE_DIR
bin/test_travis.sh

14 changes: 7 additions & 7 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,14 @@
import os
import sys

sys.path.insert(0, os.path.abspath(".."))

import symengine

# -- Project information -----------------------------------------------------

project = 'symengine'
copyright = '2021, SymEngine development team <symengine@googlegroups.com>'
author = 'SymEngine development team <symengine@googlegroups.com>'

# The full version, including alpha/beta/rc tags
release = symengine.__version__
# release = symengine.__version__


# -- General configuration ---------------------------------------------------
Expand All @@ -46,9 +42,13 @@
"sphinx.ext.duration", # Shows times in the processing pipeline
"sphinx.ext.mathjax", # Need math support
"sphinx.ext.githubpages", # Puts the .nojekyll and CNAME files
"sphinxcontrib.apidoc", # Automatically sets up sphinx-apidoc
# "recommonmark", # Parses markdown
"m2r2", # Parses markdown in rst
"autodoc2",
]

autodoc2_packages = [
"../symengine",
]

# Add any paths that contain templates here, relative to this directory.
Expand Down Expand Up @@ -87,4 +87,4 @@
# 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']
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Symengine Python API Documentation
:maxdepth: 2
:caption: Contents:

source/modules
apidocs/index

.. mdinclude:: ../README.md

Expand Down
Loading