diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 0000000..04bfe70 --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = src +BUILDDIR = doc + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..c3671e6 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,8 @@ +## Documentation + +The [API Documentation](https://equib.github.io/pyEQUIB/doc/) is available on [equib.github.io/pyEQUIB](https://equib.github.io/pyEQUIB/). The documentation for AtomNeb is produced by [Sphinx](https://www.sphinx-doc.org) Python Documentation Generator using the [Sphinx RTD theme](https://pypi.org/project/sphinx-rtd-theme/). + + + + + diff --git a/docs/doc.pdf b/docs/doc.pdf new file mode 100644 index 0000000..177d787 Binary files /dev/null and b/docs/doc.pdf differ diff --git a/docs/make.bat b/docs/make.bat new file mode 100644 index 0000000..92e0f06 --- /dev/null +++ b/docs/make.bat @@ -0,0 +1,35 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=src +set BUILDDIR=doc + +if "%1" == "" goto help + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.http://sphinx-doc.org/ + exit /b 1 +) + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd diff --git a/docs/src/conf.py b/docs/src/conf.py new file mode 100644 index 0000000..e744c6d --- /dev/null +++ b/docs/src/conf.py @@ -0,0 +1,81 @@ +# Configuration file for the Sphinx documentation builder. +# +# This file only contains a selection of the most common options. For a full +# list see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +# -- Path setup -------------------------------------------------------------- + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# +import os +import sys +#sys.path.insert(0, os.path.abspath('.')) +sys.path.insert(0, os.path.abspath('../../pyequib')) +sys.setrecursionlimit(1500) + + +# -- Project information ----------------------------------------------------- + +project = 'pyEQUIB' +copyright = '2020, Ashkbiz Danehkar' +author = 'Ashkbiz Danehkar' + +# The full version, including alpha/beta/rc tags +release = '0.2.0' + + +# -- General configuration --------------------------------------------------- + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +#extensions = [] +#extensions = ['sphinx.ext.todo', 'sphinx.ext.viewcode', 'sphinx.ext.autodoc'] +extensions = ['sphinx.ext.autodoc'] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This pattern also affects html_static_path and html_extra_path. +exclude_patterns = [] + + +# -- Options for HTML output ------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# + +on_rtd = os.environ.get('READTHEDOCS', None) == 'True' +if not on_rtd: # only import and set the theme if we're building docs locally + import sphinx_rtd_theme + html_theme = 'sphinx_rtd_theme' + html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] + html_theme_options = { + 'canonical_url': '', + #'analytics_id': 'UA-XXXXXXX-1', # Provided by Google in your dashboard + #'logo_only': False, + 'display_version': True, + 'prev_next_buttons_location': 'bottom', + 'style_external_links': False, + #'vcs_pageview_mode': '', + #'style_nav_header_background': 'white', + # Toc options + 'collapse_navigation': True, + 'sticky_navigation': True, + 'navigation_depth': 4, + 'includehidden': True, + 'titles_only': False + } +else: + html_theme = 'alabaster' + +# 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'] diff --git a/docs/src/index.rst b/docs/src/index.rst new file mode 100644 index 0000000..6a990dc --- /dev/null +++ b/docs/src/index.rst @@ -0,0 +1,19 @@ +.. pyEQUIB documentation master file, created by + sphinx-quickstart on Tue Oct 13 18:56:35 2020. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to pyEQUIB's documentation! +=================================== + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + :name: mastertoc + +pyEQUIB API functions +===================== +.. automodule:: pyequib + :members: + +