Skip to content

Commit

Permalink
Merge pull request #18 from adamboche/towncrier
Browse files Browse the repository at this point in the history
Towncrier
  • Loading branch information
adamboche committed Jun 8, 2019
2 parents 2f09a00 + 6428396 commit 7672418
Show file tree
Hide file tree
Showing 8 changed files with 95 additions and 7 deletions.
15 changes: 14 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@

Changelog
=========

0.1.10 (2019-06-08)
-------------------


Changes
^^^^^^^

- Use Towncrier for changelog.
`#18 <https://github.com/adamboche/python-marshmallow-union/issues/18>`_


----


0.1.0 (2019-06-07)
------------------

Expand Down
37 changes: 37 additions & 0 deletions changelog.d/towncrier_template.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@

{% for section, _ in sections.items() %}
{% set underline = underlines[0] %}{% if section %}{{section}}
{{ underline * section|length }}{% set underline = underlines[1] %}

{% endif %}

{% if sections[section] %}
{% for category, val in definitions.items() if category in sections[section]%}
{{ definitions[category]['name'] }}
{{ underline * definitions[category]['name']|length }}

{% if definitions[category]['showcontent'] %}
{% for text, values in sections[section][category].items() %}
- {{ text }}
{{ values|join(',\n ') }}
{% endfor %}

{% else %}
- {{ sections[section][category]['']|join(', ') }}

{% endif %}
{% if sections[section][category]|length == 0 %}
No significant changes.

{% else %}
{% endif %}

{% endfor %}
{% else %}
No significant changes.


{% endif %}
{% endfor %}
----

1 change: 1 addition & 0 deletions dev-requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ pygments
isort
mypy
pytest-sphinx
towncrier
9 changes: 6 additions & 3 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,17 @@ black==19.3b0
bleach==3.1.0 # via readme-renderer
bump2version==0.5.10
check-manifest==0.39
click==7.0 # via black, cuvner
click==7.0 # via black, cuvner, towncrier
coverage==4.5.3
cuvner==18.0.1
docutils==0.14
filelock==3.0.12 # via tox
importlib-metadata==0.17 # via pluggy, pytest
incremental==17.5.0 # via cuvner
incremental==17.5.0 # via cuvner, towncrier
isort==4.3.20
jinja2==2.10.1 # via towncrier
lazy-object-proxy==1.4.1 # via astroid
markupsafe==1.1.1 # via jinja2
mccabe==0.6.1 # via pylint
more-itertools==7.0.0 # via pytest
mypy-extensions==0.4.1 # via mypy
Expand All @@ -40,7 +42,8 @@ pytest==4.6.2
pyyaml==5.1.1 # via watchdog
readme-renderer==24.0
six==1.12.0 # via astroid, bleach, cuvner, packaging, pytest, readme-renderer, tox
toml==0.10.0 # via black, check-manifest, tox
toml==0.10.0 # via black, check-manifest, towncrier, tox
towncrier==19.2.0
tox==3.12.1
typed-ast==1.3.5 # via astroid, mypy
unidiff==0.5.5 # via cuvner
Expand Down
4 changes: 2 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Contents
========

.. toctree::
:maxdepth: 2
:maxdepth: 1

readme
installation
Expand All @@ -13,10 +13,10 @@ Contents
authors
changelog


Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

31 changes: 31 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@


[tool.towncrier]

package = "marshmallow_union"
package_dir = "src"
filename = "CHANGELOG.rst"
template = "changelog.d/towncrier_template.rst"
issue_format = "`#{issue} <https://github.com/adamboche/python-marshmallow-union/issues/{issue}>`_"
directory = "changelog.d"
title_format = "{version} ({project_date})"
underlines = ["-", "^"]

[[tool.towncrier.section]]
path = ""


[[tool.towncrier.type]]
directory = "breaking"
name = "Backward-incompatible Changes"
showcontent = true

[[tool.towncrier.type]]
directory = "deprecation"
name = "Deprecations"
showcontent = true

[[tool.towncrier.type]]
directory = "change"
name = "Changes"
showcontent = true
3 changes: 3 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,6 @@ ignore =
requirements.txt
mypy.ini
.pylintrc
pyproject.toml
changelog.d
changelog.d/*
2 changes: 1 addition & 1 deletion src/marshmallow_union/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,4 @@ def deserialize(self, value, attr=None, data=None, **kwargs):
raise marshmallow.exceptions.ValidationError(message=errors, field_name=attr)


__version__ = "__version__ = 0.1.10"
__version__ = "0.1.10"

0 comments on commit 7672418

Please sign in to comment.