Skip to content

Commit 6e558f8

Browse files
committed
Add changelog management with towncrier and document filing process
1 parent a77f30a commit 6e558f8

3 files changed

Lines changed: 147 additions & 0 deletions

File tree

CHANGELOG.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
=========
2+
Changelog
3+
=========
4+
5+
All notable changes to **anyplotlib** are documented here.
6+
7+
Fragment files in ``upcoming_changes/`` are assembled into this file by
8+
`towncrier <https://towncrier.readthedocs.io/>`_ when a release is prepared
9+
(see ``upcoming_changes/README.rst`` for contributor instructions).
10+
11+
.. towncrier release notes start
12+
13+
v0.1.0 (2026-04-12)
14+
====================
15+
16+
Initial release. Includes ``Figure``, ``Axes``, ``GridSpec``, ``subplots``,
17+
``Plot1D``, ``Plot2D``, ``PlotMesh``, ``Plot3D``, ``PlotBar``, a full marker
18+
system, interactive overlay widgets, and a two-tier callback registry.
19+

pyproject.toml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,50 @@ dev = [
3939
"playwright>=1.58.0",
4040
"pytest>=9.0.2",
4141
"scipy>=1.15.3",
42+
"towncrier>=24.0.0",
4243
]
4344

45+
# ---------------------------------------------------------------------------
46+
# Changelog management (towncrier)
47+
# ---------------------------------------------------------------------------
48+
[tool.towncrier]
49+
package = "anyplotlib"
50+
package_dir = "anyplotlib"
51+
directory = "upcoming_changes"
52+
filename = "CHANGELOG.rst"
53+
start_string = ".. towncrier release notes start\n"
54+
issue_format = "`#{issue} <https://github.com/CSSFrancis/anyplotlib/pull/{issue}>`_"
55+
title_format = "{version} ({project_date})"
56+
underlines = ["=", "-", "~"]
57+
58+
[[tool.towncrier.type]]
59+
directory = "new_feature"
60+
name = "New Features"
61+
showcontent = true
62+
63+
[[tool.towncrier.type]]
64+
directory = "bugfix"
65+
name = "Bug Fixes"
66+
showcontent = true
67+
68+
[[tool.towncrier.type]]
69+
directory = "deprecation"
70+
name = "Deprecations"
71+
showcontent = true
72+
73+
[[tool.towncrier.type]]
74+
directory = "removal"
75+
name = "Removals"
76+
showcontent = true
77+
78+
[[tool.towncrier.type]]
79+
directory = "doc"
80+
name = "Documentation"
81+
showcontent = true
82+
83+
[[tool.towncrier.type]]
84+
directory = "maintenance"
85+
name = "Maintenance"
86+
showcontent = true
87+
4488

upcoming_changes/README.rst

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
Filing Change Log Entries
2+
=========================
3+
4+
anyplotlib uses `towncrier <https://towncrier.readthedocs.io/>`_ to manage its
5+
changelog. When you open a pull request that should appear in the next release
6+
notes, add a short news **fragment file** to this directory as part of that PR.
7+
8+
Naming convention
9+
-----------------
10+
11+
Each fragment is a plain ``.rst`` file named::
12+
13+
{PR_number}.{type}.rst
14+
15+
where ``{PR_number}`` is the GitHub pull-request number and ``{type}`` is one
16+
of:
17+
18+
================= ==============================================================
19+
Type Use when …
20+
================= ==============================================================
21+
``new_feature`` A user-visible capability has been added.
22+
``bugfix`` A bug has been fixed.
23+
``deprecation`` Something is deprecated and will be removed in a future release.
24+
``removal`` A previously deprecated API has been removed.
25+
``doc`` Documentation improved without any code change.
26+
``maintenance`` Internal / infrastructure change invisible to end users.
27+
================= ==============================================================
28+
29+
Content guidelines
30+
------------------
31+
32+
* **One sentence per file**, written in the **past tense**, from a user's
33+
perspective.
34+
* Cross-reference the relevant class or function with a Sphinx role where
35+
it adds value.
36+
* Do **not** include the PR number in the sentence body — towncrier appends
37+
the link automatically.
38+
39+
Examples
40+
--------
41+
42+
``123.new_feature.rst``::
43+
44+
Added :meth:`~anyplotlib.Axes.scatter` for rendering collections of circles
45+
with per-point radii and colours.
46+
47+
``124.bugfix.rst``::
48+
49+
Fixed :meth:`~anyplotlib.Figure.savefig` raising ``ValueError`` when the
50+
``dpi`` keyword was not supplied explicitly.
51+
52+
``125.deprecation.rst``::
53+
54+
Deprecated the ``color`` keyword on :class:`~anyplotlib.Plot2D`; use
55+
``facecolor`` instead. ``color`` will be removed in a future release.
56+
57+
``126.removal.rst``::
58+
59+
Removed ``Figure.tight_layout()``, which was deprecated since v0.1.0.
60+
61+
``127.doc.rst``::
62+
63+
Expanded the getting-started guide with a pcolormesh walkthrough and
64+
performance tips.
65+
66+
``128.maintenance.rst``::
67+
68+
Migrated the CI pipeline to ``uv`` for faster, reproducible dependency
69+
installation.
70+
71+
Previewing the changelog locally
72+
---------------------------------
73+
74+
See what the next release notes would look like **without** modifying any
75+
files or consuming any fragments::
76+
77+
uvx towncrier build --draft --version 0.x.0
78+
79+
To actually build the changelog (done automatically by the
80+
**Prepare Release** workflow — do not run this by hand unless you know what
81+
you are doing)::
82+
83+
uvx towncrier build --yes --version 0.x.0
84+

0 commit comments

Comments
 (0)