Skip to content

Commit

Permalink
Add configuration for sphinx rendering of the changelog
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
Cadair authored and saimn committed Apr 2, 2021
1 parent 91ace14 commit 7536262
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
4 changes: 3 additions & 1 deletion docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@
Full Changelog
**************

.. include:: ../CHANGES.rst
.. changelog::
:towncrier: ../
:changelog_file: ../CHANGES.rst
8 changes: 0 additions & 8 deletions docs/changes/template.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
{% if versiondata.name %}
{{ versiondata.name }} {{ versiondata.version }} ({{ versiondata.date }})
{{ top_underline * ((versiondata.name + versiondata.version + versiondata.date)|length + 4)}}
{% else %}
{{ versiondata.version }} ({{ versiondata.date }})
{{ top_underline * ((versiondata.version + versiondata.date)|length + 3)}}
{% endif %}

{% for category, val in definitions.items() %}
{% set underline = underlines[0] %}
{{ definitions[category]['name'] }}
Expand Down
4 changes: 4 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns.append('_templates') # noqa: F405
exclude_patterns.append('changes') # noqa: F405
exclude_patterns.append('_pkgtemplate.rst') # noqa: F405
exclude_patterns.append('**/*.inc.rst') # .inc.rst mean *include* files, don't have sphinx process them # noqa: F405, E501

Expand All @@ -86,6 +87,9 @@
templates_path = []
templates_path.append('_templates')


extensions += ["sphinx_changelog"] # noqa: F405

# Grab minversion from setup.cfg
setup_cfg = configparser.ConfigParser()
setup_cfg.read(os.path.join(os.path.pardir, 'setup.cfg'))
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ docs =
PyYAML>=3.13
scipy>=1.1
matplotlib>=3.1,!=3.4.0
sphinx-changelog

[options.package_data]
* = data/*, data/*/*, data/*/*/*, data/*/*/*/*, data/*/*/*/*/*, data/*/*/*/*/*/*
Expand Down

0 comments on commit 7536262

Please sign in to comment.