From 9d40fd9de3dd77f8f62582156acc9aba8ad70844 Mon Sep 17 00:00:00 2001 From: annemarie tannengrund Date: Fri, 13 May 2022 02:16:35 +0200 Subject: [PATCH] added improvements that i needed to take to make sphinx and a src dir working --- MANIFEST.in | 3 +++ README.rst | 13 +++++++++++++ docs/conf.py | 2 +- docs/index.rst | 1 + 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/MANIFEST.in b/MANIFEST.in index 1aba38f..11fdbf5 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1 +1,4 @@ include LICENSE +# include following to manage src files more directly +# adapt tests/context loader if you intend usage by adding 'src' to the path +# recursive-include src/ *.py diff --git a/README.rst b/README.rst index 30f0e7f..cac7ca1 100644 --- a/README.rst +++ b/README.rst @@ -8,3 +8,16 @@ This simple project is an example repo for Python projects. --------------- If you want to learn more about ``setup.py`` files, check out `this repository `_. + +--------------- + + +if you want to create py-modindex shpinx needs to create some files matching your code.:: + + + sphinx-apidoc -o ./docs sample + or + sphinx-apidoc -o ./docs src/* + + + diff --git a/docs/conf.py b/docs/conf.py index ac03bd0..6ee875a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -25,7 +25,7 @@ # 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.autodoc', 'sphinx.ext.todo', 'sphinx.ext.viewcode'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] diff --git a/docs/index.rst b/docs/index.rst index 46f3fe8..d7e58a4 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -11,6 +11,7 @@ Contents: .. toctree:: :maxdepth: 2 + modules Indices and tables