Skip to content

Commit eaa53cd

Browse files
committed
Improve docs-build account in developer notes.
1 parent 6c0ac9e commit eaa53cd

File tree

1 file changed

+20
-8
lines changed

1 file changed

+20
-8
lines changed

docs/details/developer_notes.rst

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,21 @@ A new change-note fragment file should be included in each PR, but is normally c
1111
with a ``towncrier`` command-line command:
1212

1313
* shortly, with ``towncrier create --content "mynotes..." <ISSUE-num>.<category>.rst``
14-
* ... or for longer forms, use ``towncrier create --edit``.
15-
* Here, "<category>" is one of feat/doc/bug/dev/misc. Which are: user features;
16-
bug fixes; documentation changes; general developer-relevant changes;
17-
or "miscellaneous".
14+
15+
... or, for longer content, use ``towncrier create --edit``.
16+
17+
* Here, "<category>" is one of:
18+
19+
* "feat": user features
20+
* "doc": documentation changes
21+
* "bug": bug fixes
22+
* "def": general developer-relevant changes
23+
* "misc": miscellaneous
24+
1825
(For reference, these categories are configured in ``pyproject.toml``).
26+
1927
* the fragment files are stored in ``docs/changelog_fragments``.
28+
2029
* N.B. for this to work well, every change should be identified with a matching github issue.
2130
If there are multiple associated PRs, they should all be linked to the issue.
2231

@@ -26,15 +35,18 @@ Documentation build
2635

2736
For a full docs-build:
2837

29-
* a simple ``$ make html`` will do for now
38+
* The most useful way is simply ``$ cd docs`` and ``$ make html-keeplog``.
39+
* Note: the plainer ``$ make html`` is the same, but "-keeplog", in addition, preserves the
40+
changelog fragments **and** reverts the change_log.rst after the html build:
41+
This stops you accidentally including a "built" changelog when making further commits.
3042
* The ``docs/Makefile`` wipes the API docs and invokes sphinx-apidoc for a full rebuild
3143
* It also calls towncrier to clear out the changelog fragments + update ``docs/change_log.rst``.
32-
This should be reverted before pushing your PR -- i.e. leave changenotes in the fragments.
33-
* the results is then available at ``docs/_build/html/index.html``.
44+
* ( *assuming "-keeplog"*: fragments and change_notes.rst are then reverted, undoing the towncrier build ).
45+
* the result is then available at ``docs/_build/html/index.html``.
3446

3547
.. note::
3648

37-
* the above is just for *local testing*, if required.
49+
* the above is just for *local testing*, when required.
3850
* For PRs (and releases), we also provide *automatic* builds on GitHub,
3951
via ReadTheDocs_.
4052

0 commit comments

Comments
 (0)