Skip to content

Commit e72fcea

Browse files
committed
docs: Build scripts
1 parent a68f7fc commit e72fcea

File tree

4 files changed

+121
-0
lines changed

4 files changed

+121
-0
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,8 @@ symengine.egg-info/
3535
# Temp files
3636
*~
3737
.eggs/
38+
39+
# Docs
40+
genDocs/
41+
docs/_build/
42+
docs/source/

bin/install_travis.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ if [[ "${WITH_SCIPY}" == "yes" ]]; then
1616
export conda_pkgs="${conda_pkgs} scipy";
1717
fi
1818

19+
if [[ "${WITH_DOCS}" == "yes" ]]; then
20+
export conda_pkgs="${conda_pkgs} sphinx recommonmark";
21+
fi
22+
1923
if [[ "${WITH_SAGE}" == "yes" ]]; then
2024
# This is split to avoid the 10 minute limit
2125
conda install -q sagelib=8.1

docs/conf.py

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# Configuration file for the Sphinx documentation builder.
2+
#
3+
# This file only contains a selection of the most common options. For a full
4+
# list see the documentation:
5+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
6+
7+
# -- Path setup --------------------------------------------------------------
8+
9+
# If extensions (or modules to document with autodoc) are in another directory,
10+
# add these directories to sys.path here. If the directory is relative to the
11+
# documentation root, use os.path.abspath to make it absolute, like shown here.
12+
#
13+
# import os
14+
# import sys
15+
# sys.path.insert(0, os.path.abspath('.'))
16+
17+
import os
18+
import sys
19+
20+
sys.path.insert(0, os.path.abspath(".."))
21+
22+
import symengine
23+
24+
# -- Project information -----------------------------------------------------
25+
26+
project = 'symengine'
27+
copyright = '2021, SymEngine development team <[email protected]>'
28+
author = 'SymEngine development team <[email protected]>'
29+
30+
# The full version, including alpha/beta/rc tags
31+
release = '0.6.1'
32+
33+
34+
# -- General configuration ---------------------------------------------------
35+
36+
# Add any Sphinx extension module names here, as strings. They can be
37+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
38+
# ones.
39+
extensions = [
40+
"sphinx.ext.autodoc", # Consumes docstrings
41+
"sphinx.ext.napoleon", # Allows for Google Style Docs
42+
"sphinx.ext.viewcode", # Links to source code
43+
"sphinx.ext.intersphinx", # Connects to other documentation
44+
"sphinx.ext.todo", # Show TODO details
45+
"sphinx.ext.imgconverter", # Handle svg images
46+
"sphinx.ext.duration", # Shows times in the processing pipeline
47+
"sphinx.ext.mathjax", # Need math support
48+
"sphinx.ext.githubpages", # Puts the .nojekyll and CNAME files
49+
"sphinxcontrib.apidoc", # Automatically sets up sphinx-apidoc
50+
# "recommonmark", # Parses markdown
51+
"m2r2", # Parses markdown in rst
52+
]
53+
54+
# Add any paths that contain templates here, relative to this directory.
55+
templates_path = ['_templates']
56+
57+
# List of patterns, relative to source directory, that match files and
58+
# directories to ignore when looking for source files.
59+
# This pattern also affects html_static_path and html_extra_path.
60+
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
61+
62+
# API Doc settings
63+
apidoc_module_dir = "../"
64+
apidoc_output_dir = "source"
65+
apidoc_excluded_paths = ["tests"]
66+
apidoc_separate_modules = True
67+
68+
# -- Options for HTML output -------------------------------------------------
69+
70+
# The theme to use for HTML and HTML Help pages. See the documentation for
71+
# a list of builtin themes.
72+
#
73+
html_theme = "sphinx_book_theme"
74+
html_title = "Symengine Python Bindings"
75+
# html_logo = "path/to/logo.png"
76+
# html_favicon = "path/to/favicon.ico"
77+
html_theme_options = {
78+
"repository_url": "https://github.com/symengine/symengine.py",
79+
"use_repository_button": True,
80+
"use_issues_button": True,
81+
"use_edit_page_button": True,
82+
"path_to_docs": "docs",
83+
"use_download_button": True,
84+
"home_page_in_toc": True
85+
}
86+
87+
# Add any paths that contain custom static files (such as style sheets) here,
88+
# relative to this directory. They are copied after the builtin static files,
89+
# so a file named "default.css" will overwrite the builtin "default.css".
90+
html_static_path = ['_static']

docs/index.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
.. symengine documentation master file, created by
2+
sphinx-quickstart on Tue Jan 26 09:42:30 2021.
3+
You can adapt this file completely to your liking, but it should at least
4+
contain the root `toctree` directive.
5+
6+
Symengine Python API Documentation
7+
===================================
8+
9+
.. toctree::
10+
:maxdepth: 2
11+
:caption: Contents:
12+
13+
source/modules
14+
15+
.. mdinclude:: ../README.md
16+
17+
Indices and tables
18+
==================
19+
20+
* :ref:`genindex`
21+
* :ref:`modindex`
22+
* :ref:`search`

0 commit comments

Comments
 (0)