Skip to content

Commit

Permalink
docs: update rst.linker and sphinx-related configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
davvid committed Nov 15, 2023
1 parent 1a81615 commit efdbb29
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 48 deletions.
62 changes: 16 additions & 46 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,64 +1,22 @@
# -- General configuration -----------------------------------------------------
import os
import sys

# Use the source tree.
sys.path.insert(1, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))

# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
'sphinx.ext.todo',
'sphinx.ext.coverage',
'jaraco.packaging.sphinx',
'rst.linker',
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# The suffix of source filenames.
source_suffix = '.rst'

# The master toctree document.
master_doc = 'index'
html_theme = 'furo'

# General information about the project.
copyright = u'2008-2011, John Paulett; 2009-2020, David Aguilar'

# List of directories, relative to source directory, that shouldn't be searched
# for source files.
exclude_trees = []

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'

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

# The theme to use for HTML and HTML Help pages. Major themes that come with
# Sphinx are currently 'default' and 'sphinxdoc'.
html_theme = 'default'

# Output file base name for HTML help builder.
htmlhelp_basename = 'jsonpickledoc'


# -- Options for LaTeX output --------------------------------------------------

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('index', 'jsonpickle.tex', 'jsonpickle Documentation', 'David Aguilar', 'manual'),
]


# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'https://docs.python.org/3': None}


# Link dates and other references in the changelog
extensions += ['rst.linker']
link_files = {
'../CHANGES.rst': dict(
using=dict(GH='https://github.com'),
Expand All @@ -72,7 +30,7 @@
url='{package_url}/pull/{pull}',
),
dict(
pattern=r'^(?m)((?P<scm_version>v?\d+(\.\d+){1,2}))\n[-=]+\n',
pattern=r'(?m:^((?P<scm_version>v?\d+(\.\d+){1,2}))\n[-=]+\n)',
with_scm='{text}\n{rev[timestamp]:%d %b %Y}\n',
),
dict(
Expand All @@ -82,3 +40,15 @@
],
)
}

# Be strict about any broken references
nitpicky = True

extensions += ['sphinx.ext.intersphinx']
intersphinx_mapping = {
'python': ('https://docs.python.org/3', None),
'sphinx': ('https://www.sphinx-doc.org/en/stable/', None),
}

# Preserve authored syntax for defaults
autodoc_preserve_defaults = True
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools>=42", "setuptools_scm[toml]>=3.4.1"]
requires = ["setuptools>=56", "setuptools_scm[toml]>=3.4.1"]
build-backend = "setuptools.build_meta"

[tool.black]
Expand Down
3 changes: 2 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,9 @@ testing.libs =
docs =
# upstream
sphinx
jaraco.packaging >= 3.2
jaraco.packaging >= 9.3
rst.linker >= 1.9
furo

# local

Expand Down

0 comments on commit efdbb29

Please sign in to comment.