diff --git a/docs/Makefile b/docs/Makefile index c414af1..d0c3cbf 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -1,12 +1,12 @@ -# # 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 = . -BUILDDIR = _build +SOURCEDIR = source +BUILDDIR = build # Put it first so that "make" without argument is like "make help". help: diff --git a/docs/make.bat b/docs/make.bat index 32bb245..747ffb7 100644 --- a/docs/make.bat +++ b/docs/make.bat @@ -7,8 +7,8 @@ REM Command file for Sphinx documentation if "%SPHINXBUILD%" == "" ( set SPHINXBUILD=sphinx-build ) -set SOURCEDIR=. -set BUILDDIR=_build +set SOURCEDIR=source +set BUILDDIR=build %SPHINXBUILD% >NUL 2>NUL if errorlevel 9009 ( diff --git a/docs/slope.rst b/docs/slope.rst deleted file mode 100644 index 8495cef..0000000 --- a/docs/slope.rst +++ /dev/null @@ -1,6 +0,0 @@ -########### - My Module -########### - -.. automodule:: slope - :members: diff --git a/docs/source/api.rst b/docs/source/api.rst new file mode 100644 index 0000000..28deeef --- /dev/null +++ b/docs/source/api.rst @@ -0,0 +1,10 @@ +################ + Main Functions +################ + +.. currentmodule:: sortedl1 + +.. autosummary:: + :toctree: generated/ + + slope diff --git a/docs/conf.py b/docs/source/conf.py similarity index 92% rename from docs/conf.py rename to docs/source/conf.py index adad8b0..93e4d6f 100644 --- a/docs/conf.py +++ b/docs/source/conf.py @@ -1,7 +1,7 @@ import os import sys -sys.path.insert(0, os.path.abspath("..")) +sys.path.insert(0, os.path.abspath("../..")) # -- Project information ----------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information @@ -9,12 +9,15 @@ project = "sortedl1" copyright = "2023, Johan Larsson" author = "Johan Larsson" +release = "0.1.0" # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration extensions = [ "sphinx.ext.autodoc", + "sphinx.ext.autosummary", + "sphinx.ext.doctest", "sphinx.ext.napoleon", ] templates_path = ["_templates"] @@ -24,7 +27,6 @@ ".DS_Store", ] - # -- Options for HTML output ------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output diff --git a/docs/source/generated/sortedl1.slope.rst b/docs/source/generated/sortedl1.slope.rst new file mode 100644 index 0000000..37c3fbc --- /dev/null +++ b/docs/source/generated/sortedl1.slope.rst @@ -0,0 +1,6 @@ +sortedl1.slope +============== + +.. currentmodule:: sortedl1 + +.. autofunction:: slope \ No newline at end of file diff --git a/docs/index.rst b/docs/source/index.rst similarity index 88% rename from docs/index.rst rename to docs/source/index.rst index b28846e..284d3e2 100644 --- a/docs/index.rst +++ b/docs/source/index.rst @@ -1,6 +1,6 @@ .. sortedl1 documentation master file, created by - sphinx-quickstart on Tue Nov 28 15:58:40 2023. + sphinx-quickstart on Tue Nov 28 20:48:55 2023. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. @@ -12,6 +12,8 @@ :maxdepth: 2 :caption: Contents: + api + #################### Indices and tables #################### diff --git a/docs/modules.rst b/docs/source/modules.rst similarity index 100% rename from docs/modules.rst rename to docs/source/modules.rst diff --git a/docs/sortedl1.rst b/docs/source/sortedl1.rst similarity index 74% rename from docs/sortedl1.rst rename to docs/source/sortedl1.rst index c1ddf12..2fdc7b2 100644 --- a/docs/sortedl1.rst +++ b/docs/source/sortedl1.rst @@ -4,10 +4,10 @@ sortedl1 package Submodules ---------- -sortedl1.slope module ---------------------- +sortedl1.models module +---------------------- -.. automodule:: sortedl1.slope +.. automodule:: sortedl1.models :members: :undoc-members: :show-inheritance: