Skip to content

Commit 7a42f37

Browse files
committed
new sphinx config
1 parent 06a1e46 commit 7a42f37

File tree

4 files changed

+14
-120
lines changed

4 files changed

+14
-120
lines changed

doc/Makefile

Lines changed: 0 additions & 89 deletions
This file was deleted.

doc/conf.py

Lines changed: 11 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,61 +2,46 @@
22
#
33
# This file only contains a selection of the most common options. For a full
44
# list see the documentation:
5-
# http://www.sphinx-doc.org/en/master/config
5+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
66

77
# -- Path setup --------------------------------------------------------------
88

9+
import pathlib
10+
911
# If extensions (or modules to document with autodoc) are in another directory,
1012
# add these directories to sys.path here. If the directory is relative to the
1113
# documentation root, use os.path.abspath to make it absolute, like shown here.
1214
#
13-
import os
14-
15+
# import os
1516
# import sys
1617
# sys.path.insert(0, os.path.abspath('.'))
17-
18+
from configparser import ConfigParser
1819

1920
# -- Project information -----------------------------------------------------
20-
2121
project = "tikzplotlib"
2222
copyright = "2010-2021, Nico Schlömer"
2323
author = "Nico Schlömer"
2424

25-
# https://packaging.python.org/single_source_version/
26-
this_dir = os.path.abspath(os.path.dirname(__file__))
27-
about = {}
28-
about_file = os.path.join(this_dir, "..", "tikzplotlib", "__about__.py")
29-
with open(about_file) as f:
30-
exec(f.read(), about)
31-
# The full version, including alpha/beta/rc tags.
32-
release = about["__version__"]
33-
34-
# WARNING: conf value "version" should not be empty for EPUB3
35-
version = about["__version__"]
25+
p = ConfigParser()
26+
this_dir = pathlib.Path(__file__).resolve().parent
27+
p.read(this_dir / ".." / "setup.cfg")
28+
release = p["metadata"]["version"]
3629

37-
# for sphinx 1.*
38-
master_doc = "index"
3930

4031
# -- General configuration ---------------------------------------------------
4132

4233
# Add any Sphinx extension module names here, as strings. They can be
4334
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
4435
# ones.
45-
extensions = [
46-
"sphinx.ext.autodoc",
47-
"sphinx.ext.doctest",
48-
"sphinx.ext.todo",
49-
"sphinx.ext.coverage",
50-
"sphinx.ext.imgmath",
51-
]
36+
extensions = ["sphinx.ext.autodoc"]
5237

5338
# Add any paths that contain templates here, relative to this directory.
5439
templates_path = ["_templates"]
5540

5641
# List of patterns, relative to source directory, that match files and
5742
# directories to ignore when looking for source files.
5843
# This pattern also affects html_static_path and html_extra_path.
59-
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
44+
exclude_patterns = []
6045

6146

6247
# -- Options for HTML output -------------------------------------------------

doc/index.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
.. tikzplotlib documentation master file, created by
2-
sphinx-quickstart on Tue Jul 30 11:59:20 2019.
2+
sphinx-quickstart on Thu Feb 4 12:49:27 2021.
33
You can adapt this file completely to your liking, but it should at least
44
contain the root `toctree` directive.
55
66
Welcome to tikzplotlib's documentation!
7-
===========================================
8-
9-
Contents:
7+
=======================================
108

119
.. toctree::
1210
:maxdepth: 2
11+
:caption: Contents:
1312

1413
Methods
1514
=======

doc/requirements.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)