Skip to content

Commit

Permalink
Merge ffb0916 into fea37c7
Browse files Browse the repository at this point in the history
  • Loading branch information
KybernetikJo committed Jan 18, 2024
2 parents fea37c7 + ffb0916 commit 64c7faa
Show file tree
Hide file tree
Showing 20 changed files with 2,593 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
doc/_build
doc/generated
doc/source/reference/generated/
.DS_Store*
MANIFEST
dist/
Expand All @@ -12,3 +15,4 @@ build.log
*~
setup.cfg
_skbuild

20 changes: 20 additions & 0 deletions doc/Makefile
Original file line number Diff line number Diff line change
@@ -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 = source
BUILDDIR = build

# 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)
35 changes: 35 additions & 0 deletions doc/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build

%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.https://www.sphinx-doc.org/
exit /b 1
)

if "%1" == "" goto help

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
12 changes: 12 additions & 0 deletions doc/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
sphinx>=7.2.6
numpy
scipy
pandas
matplotlib
matplotlib_venn
sphinx_rtd_theme>=2.0.0
numpydoc
ipykernel
nbsphinx
docutils
#docutils==0.16 # pin until sphinx_rtd_theme is compatible with 0.17 or later
50 changes: 50 additions & 0 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
import os
import sys
sys.path.insert(0, os.path.abspath('../slycot'))

master_doc = "index"
from datetime import date
project = 'Slycot'
copyright = f'{date.today().year}, Slycot Developers'
author = 'Slycot Developers'

# Version information - read from the source code
import re

# Get the version number for this commmit (including alpha/beta/rc tags)
release = re.sub('^v', '', os.popen('git describe').read().strip())

# The short X.Y.Z version
version = re.sub(r'(\d+\.\d+\.\d+(.post\d+)?)(.*)', r'\1', release)

print("version %s, release %s" % (version, release))

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = [
'sphinx.ext.autodoc', 'sphinx.ext.todo', 'sphinx.ext.napoleon',
'sphinx.ext.intersphinx', 'sphinx.ext.imgmath',
'sphinx.ext.autosummary', 'nbsphinx', 'numpydoc',
'sphinx.ext.doctest'
]
# scan documents for autosummary directives and generate stub pages for each.
autosummary_generate = True

templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']



# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = 'sphinx_rtd_theme'
html_static_path = ['_static']
30 changes: 30 additions & 0 deletions doc/source/contributing/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
.. this page is referenced from the front page but it's unnecessary as a navigation section for now.
:orphan:

Contributing to Slycot
======================

Development process and tools
-----------------------------

The development process is currently described on the `slycot github repo <https://github.com/python-control/Slycot>`_ and the `slycot github wiki <https://github.com/python-control/Slycot/wiki>`_.
You should be familiar with following topics:

- `git <https://git-scm.com/>`_
- `github <https://skills.github.com/>`_
- `Sphinx <https://www.sphinx-doc.org/en/master/index.html>`_
- `reStructuredText <https://www.sphinx-doc.org/en/master/usage/restructuredtext/index.html>`_
- `numpydoc <https://numpydoc.readthedocs.io/en/latest/>`_
- `f2py <https://numpy.org/devdocs/f2py/index.html>`_

numpydoc
--------

Slycot uses numpydoc for the docstring style in order to provide support the Numpy docstring format in sphinx,
`see numpydoc example <https://numpydoc.readthedocs.io/en/latest/example.html>`_.

F2PY
----

Slycot heavily relias on `F2PY <https://numpy.org/devdocs/f2py/index.html>`_, which is currently a part of `NumPy <http://www.numpy.org>`_.
12 changes: 12 additions & 0 deletions doc/source/explanation/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.. this page is referenced from the front page but it's unnecessary as a navigation section for now.
:orphan:

Inspect
=======

.. toctree::
:maxdepth: 1

inspect_slycot
inspect_slicot_slycot
Loading

0 comments on commit 64c7faa

Please sign in to comment.