From 1e2f7eae818442c4942602b54d4e11caead454da Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Thu, 31 Aug 2023 16:14:07 -0700 Subject: [PATCH 1/3] Add scriv to FastAPI and PyPI templates We've been happy with scriv for change log management. Add it to the templates for both FastAPI Safir apps and SQuaRE PyPI packages, adding a CHANGELOG.md file to FastAPI Safir apps since we're standardizing on keeping change logs. Update the development documentation included in SQuaRE PyPI packages accordingly. --- .../fastapi_safir_app/example/CHANGELOG.md | 12 +++++++ .../example/changelog.d/_template.md.jinja | 7 ++++ .../fastapi_safir_app/example/pyproject.toml | 13 +++++++ .../{{cookiecutter.name}}/CHANGELOG.md | 12 +++++++ .../changelog.d/_template.md.jinja | 7 ++++ .../{{cookiecutter.name}}/pyproject.toml | 13 +++++++ .../square_pypi_package/example/CHANGELOG.md | 11 ++++-- .../example/changelog.d/_template.md.jinja | 7 ++++ .../example/docs/_rst_epilog.rst | 5 +-- .../example/docs/dev/development.rst | 35 +++++++++---------- .../example/docs/dev/release.rst | 27 +++++++++++--- .../example/pyproject.toml | 13 +++++++ .../{{cookiecutter.name}}/CHANGELOG.md | 11 ++++-- .../changelog.d/_template.md.jinja | 7 ++++ .../docs/_rst_epilog.rst | 5 +-- .../docs/dev/development.rst | 35 +++++++++---------- .../docs/dev/release.rst | 27 +++++++++++--- .../{{cookiecutter.name}}/pyproject.toml | 13 +++++++ 18 files changed, 204 insertions(+), 56 deletions(-) create mode 100644 project_templates/fastapi_safir_app/example/CHANGELOG.md create mode 100644 project_templates/fastapi_safir_app/example/changelog.d/_template.md.jinja create mode 100644 project_templates/fastapi_safir_app/{{cookiecutter.name}}/CHANGELOG.md create mode 100644 project_templates/fastapi_safir_app/{{cookiecutter.name}}/changelog.d/_template.md.jinja create mode 100644 project_templates/square_pypi_package/example/changelog.d/_template.md.jinja create mode 100644 project_templates/square_pypi_package/{{cookiecutter.name}}/changelog.d/_template.md.jinja diff --git a/project_templates/fastapi_safir_app/example/CHANGELOG.md b/project_templates/fastapi_safir_app/example/CHANGELOG.md new file mode 100644 index 00000000..0c65db25 --- /dev/null +++ b/project_templates/fastapi_safir_app/example/CHANGELOG.md @@ -0,0 +1,12 @@ +# Change log + +All notable changes to example will be documented in this file. + +Versioning follows [semver](https://semver.org/). + +Dependencies are updated to the latest available version during each release. Those changes are not noted here explicitly. + +This project uses [scriv](https://scriv.readthedocs.io/en/stable/) to maintain the change log. +Changes for the upcoming release can be found in [changelog.d](https://github.com/lsst-sqre/example/tree/main/changelog.d/). + + diff --git a/project_templates/fastapi_safir_app/example/changelog.d/_template.md.jinja b/project_templates/fastapi_safir_app/example/changelog.d/_template.md.jinja new file mode 100644 index 00000000..6e644b85 --- /dev/null +++ b/project_templates/fastapi_safir_app/example/changelog.d/_template.md.jinja @@ -0,0 +1,7 @@ + +{%- for cat in config.categories %} + +### {{ cat }} + +- +{%- endfor %} diff --git a/project_templates/fastapi_safir_app/example/pyproject.toml b/project_templates/fastapi_safir_app/example/pyproject.toml index c885cbc0..dcb327b8 100644 --- a/project_templates/fastapi_safir_app/example/pyproject.toml +++ b/project_templates/fastapi_safir_app/example/pyproject.toml @@ -207,3 +207,16 @@ classmethod-decorators = [ [tool.ruff.pydocstyle] convention = "numpy" + +[tool.scriv] +categories = [ + "Backwards-incompatible changes", + "New features", + "Bug fixes", + "Other changes", +] +entry_title_template = "{{ version }} ({{ date.strftime('%Y-%m-%d') }})" +format = "md" +md_header_level = "2" +new_fragment_template = "file:changelog.d/_template.md.jinja" +skip_fragments = "_template.md.jinja" diff --git a/project_templates/fastapi_safir_app/{{cookiecutter.name}}/CHANGELOG.md b/project_templates/fastapi_safir_app/{{cookiecutter.name}}/CHANGELOG.md new file mode 100644 index 00000000..f2e08aca --- /dev/null +++ b/project_templates/fastapi_safir_app/{{cookiecutter.name}}/CHANGELOG.md @@ -0,0 +1,12 @@ +# Change log + +All notable changes to {{cookiecutter.name}} will be documented in this file. + +Versioning follows [semver](https://semver.org/). + +Dependencies are updated to the latest available version during each release. Those changes are not noted here explicitly. + +This project uses [scriv](https://scriv.readthedocs.io/en/stable/) to maintain the change log. +Changes for the upcoming release can be found in [changelog.d](https://github.com/{{cookiecutter.github_org}}/{{cookiecutter.name}}/tree/main/changelog.d/). + + diff --git a/project_templates/fastapi_safir_app/{{cookiecutter.name}}/changelog.d/_template.md.jinja b/project_templates/fastapi_safir_app/{{cookiecutter.name}}/changelog.d/_template.md.jinja new file mode 100644 index 00000000..aabf509f --- /dev/null +++ b/project_templates/fastapi_safir_app/{{cookiecutter.name}}/changelog.d/_template.md.jinja @@ -0,0 +1,7 @@ + +{{ "{%- for cat in config.categories %}" }} + +### {{ "{{ cat }}" }} + +- +{{ "{%- endfor %}" }} diff --git a/project_templates/fastapi_safir_app/{{cookiecutter.name}}/pyproject.toml b/project_templates/fastapi_safir_app/{{cookiecutter.name}}/pyproject.toml index 7942f1ce..3f46d2f9 100644 --- a/project_templates/fastapi_safir_app/{{cookiecutter.name}}/pyproject.toml +++ b/project_templates/fastapi_safir_app/{{cookiecutter.name}}/pyproject.toml @@ -207,3 +207,16 @@ classmethod-decorators = [ [tool.ruff.pydocstyle] convention = "numpy" + +[tool.scriv] +categories = [ + "Backwards-incompatible changes", + "New features", + "Bug fixes", + "Other changes", +] +entry_title_template = "{{ "{{ version }} ({{ date.strftime('%Y-%m-%d') }})" }}" +format = "md" +md_header_level = "2" +new_fragment_template = "file:changelog.d/_template.md.jinja" +skip_fragments = "_template.md.jinja" diff --git a/project_templates/square_pypi_package/example/CHANGELOG.md b/project_templates/square_pypi_package/example/CHANGELOG.md index 28b0f3cd..0c65db25 100644 --- a/project_templates/square_pypi_package/example/CHANGELOG.md +++ b/project_templates/square_pypi_package/example/CHANGELOG.md @@ -1,7 +1,12 @@ # Change log - +All notable changes to example will be documented in this file. -## Unreleased +Versioning follows [semver](https://semver.org/). -- First release of example +Dependencies are updated to the latest available version during each release. Those changes are not noted here explicitly. + +This project uses [scriv](https://scriv.readthedocs.io/en/stable/) to maintain the change log. +Changes for the upcoming release can be found in [changelog.d](https://github.com/lsst-sqre/example/tree/main/changelog.d/). + + diff --git a/project_templates/square_pypi_package/example/changelog.d/_template.md.jinja b/project_templates/square_pypi_package/example/changelog.d/_template.md.jinja new file mode 100644 index 00000000..6e644b85 --- /dev/null +++ b/project_templates/square_pypi_package/example/changelog.d/_template.md.jinja @@ -0,0 +1,7 @@ + +{%- for cat in config.categories %} + +### {{ cat }} + +- +{%- endfor %} diff --git a/project_templates/square_pypi_package/example/docs/_rst_epilog.rst b/project_templates/square_pypi_package/example/docs/_rst_epilog.rst index eceba2f3..afd04ce1 100644 --- a/project_templates/square_pypi_package/example/docs/_rst_epilog.rst +++ b/project_templates/square_pypi_package/example/docs/_rst_epilog.rst @@ -1,6 +1,7 @@ - +.. _Click: https://click.palletsprojects.com/ .. _mypy: http://www.mypy-lang.org .. _pre-commit: https://pre-commit.com .. _pytest: https://docs.pytest.org/en/latest/ +.. _scriv: https://scriv.readthedocs.io/en/stable/ +.. _semver: https://semver.org/ .. _tox: https://tox.wiki/en/latest/ -.. _Click: https://click.palletsprojects.com/ diff --git a/project_templates/square_pypi_package/example/docs/dev/development.rst b/project_templates/square_pypi_package/example/docs/dev/development.rst index 6b1e102e..d0583012 100644 --- a/project_templates/square_pypi_package/example/docs/dev/development.rst +++ b/project_templates/square_pypi_package/example/docs/dev/development.rst @@ -101,30 +101,29 @@ The built documentation is located in the :file:`docs/_build/html` directory. Updating the change log ======================= -Each pull request should update the change log (:file:`CHANGELOG.md`). -Add a description of new features and fixes as list items under a section at the top of the change log called "Unreleased:" +example uses scriv_ to maintain its change log. -.. code-block:: md +When preparing a pull request, run :command:`scriv create`. +This will create a change log fragment in :file:`changelog.d`. +Edit that fragment, removing the sections that do not apply and adding entries fo this pull request. +You can pass the ``--edit`` flag to :command:`scriv create` to open the created fragment automatically in an editor. - ## Unreleased +Change log entries use the following sections: - - Description of the feature or fix. +.. rst-class:: compact -If the next version is known (because example's main branch is being prepared for a new major or minor version), the section may contain that version information: +- **Backward-incompatible changes** +- **New features** +- **Bug fixes** +- **Other changes** (for minor, patch-level changes that are not bug fixes, such as logging formatting changes or updates to the documentation) -.. code-block:: md +These entries will eventually be cut and pasted into the release description for the next release, so the Markdown for the change descriptions should be compatible with GitHub's Markdown conventions for the release description. +Specifically: - ## X.Y.0 (unreleased) - - - Description of the feature or fix. - -If the exact version and release date is known (:doc:`because a release is being prepared `), the section header is formatted as: - -.. code-block:: md - - ## X.Y.0 (YYYY-MM-DD) - - - Description of the feature or fix. +- Each bullet point should be entirely on one line, even if it contains multiple sentences. + This is an exception to the normal documentation convention of a newline after each sentence. + Unfortunately, GitHub interprets those newlines as hard line breaks, so they would result in an ugly release description. +- Avoid using too much complex markup, such as nested bullet lists, since the formatting in the GitHub release description may not be what you expect and manually editing it is tedious. .. _style-guide: diff --git a/project_templates/square_pypi_package/example/docs/dev/release.rst b/project_templates/square_pypi_package/example/docs/dev/release.rst index 3f393660..41d13513 100644 --- a/project_templates/square_pypi_package/example/docs/dev/release.rst +++ b/project_templates/square_pypi_package/example/docs/dev/release.rst @@ -26,11 +26,28 @@ Release tags are semantic version identifiers following the :pep:`440` specifica 1. Change log and documentation ------------------------------- -Each PR should include updates to the change log. -If the change log or documentation needs additional updates, now is the time to make those changes through the regular branch-and-PR development method against the ``main`` branch. +Change log messages for each release are accumulated using scriv_. +See :ref:`dev-change-log` in the *Developer guide* for more details. -In particular, replace the "Unreleased" section headline with the semantic version and date. -See :ref:`dev-change-log` in the *Developer guide* for details. +When it comes time to make the release, there should be a collection of change log fragments in :file:`changelog.d`. +Those fragments will make up the change log for the new release. + +Review those fragments to determine the version number of the next release. +Safir follows semver_, so follow its rules to pick the next version: + +.. rst-class:: compact + +- If there are any backward-incompatible changes, incremeent the major version number and set the other numbers to 0. +- If there are any new features, increment the minor version number and set the patch version to 0. +- Otherwise, increment the patch version number. + +Then, run ``scriv collect --version `` specifying the version number you decided on. +This will delete the fragment files and collect them into :file:`CHANGELOG.md` under an entry for the new release. +Review that entry and edit it as needed (proofread, change the order to put more important things first, etc.). +scriv will put blank lines between entries from different files. +You may wish to remove those blank lines to ensure consistent formatting by various Markdown parsers. + +Finally, create a PR from those changes and merge it before continuing with the release process. 2. GitHub release and tag ------------------------- @@ -75,7 +92,7 @@ If the release branch doesn't already exist, check out the latest patch for that Developing on a release branch ------------------------------ -Once a release branch exists, it becomes the "master" branch for patches of that major-minor version. +Once a release branch exists, it becomes the "main" branch for patches of that major-minor version. Pull requests should be based on, and merged into, the release branch. If the development on the release branch is a backport of commits on the ``main`` branch, use ``git cherry-pick`` to copy those commits into a new pull request against the release branch. diff --git a/project_templates/square_pypi_package/example/pyproject.toml b/project_templates/square_pypi_package/example/pyproject.toml index 2d01d37b..ef5b6ddd 100644 --- a/project_templates/square_pypi_package/example/pyproject.toml +++ b/project_templates/square_pypi_package/example/pyproject.toml @@ -234,3 +234,16 @@ classmethod-decorators = [ [tool.ruff.pydocstyle] convention = "numpy" + +[tool.scriv] +categories = [ + "Backwards-incompatible changes", + "New features", + "Bug fixes", + "Other changes", +] +entry_title_template = "{{ version }} ({{ date.strftime('%Y-%m-%d') }})" +format = "md" +md_header_level = "2" +new_fragment_template = "file:changelog.d/_template.md.jinja" +skip_fragments = "_template.md.jinja" diff --git a/project_templates/square_pypi_package/{{cookiecutter.name}}/CHANGELOG.md b/project_templates/square_pypi_package/{{cookiecutter.name}}/CHANGELOG.md index 4551dfe6..f2e08aca 100644 --- a/project_templates/square_pypi_package/{{cookiecutter.name}}/CHANGELOG.md +++ b/project_templates/square_pypi_package/{{cookiecutter.name}}/CHANGELOG.md @@ -1,7 +1,12 @@ # Change log - +All notable changes to {{cookiecutter.name}} will be documented in this file. -## Unreleased +Versioning follows [semver](https://semver.org/). -- First release of {{cookiecutter.name}} +Dependencies are updated to the latest available version during each release. Those changes are not noted here explicitly. + +This project uses [scriv](https://scriv.readthedocs.io/en/stable/) to maintain the change log. +Changes for the upcoming release can be found in [changelog.d](https://github.com/{{cookiecutter.github_org}}/{{cookiecutter.name}}/tree/main/changelog.d/). + + diff --git a/project_templates/square_pypi_package/{{cookiecutter.name}}/changelog.d/_template.md.jinja b/project_templates/square_pypi_package/{{cookiecutter.name}}/changelog.d/_template.md.jinja new file mode 100644 index 00000000..aabf509f --- /dev/null +++ b/project_templates/square_pypi_package/{{cookiecutter.name}}/changelog.d/_template.md.jinja @@ -0,0 +1,7 @@ + +{{ "{%- for cat in config.categories %}" }} + +### {{ "{{ cat }}" }} + +- +{{ "{%- endfor %}" }} diff --git a/project_templates/square_pypi_package/{{cookiecutter.name}}/docs/_rst_epilog.rst b/project_templates/square_pypi_package/{{cookiecutter.name}}/docs/_rst_epilog.rst index eceba2f3..afd04ce1 100644 --- a/project_templates/square_pypi_package/{{cookiecutter.name}}/docs/_rst_epilog.rst +++ b/project_templates/square_pypi_package/{{cookiecutter.name}}/docs/_rst_epilog.rst @@ -1,6 +1,7 @@ - +.. _Click: https://click.palletsprojects.com/ .. _mypy: http://www.mypy-lang.org .. _pre-commit: https://pre-commit.com .. _pytest: https://docs.pytest.org/en/latest/ +.. _scriv: https://scriv.readthedocs.io/en/stable/ +.. _semver: https://semver.org/ .. _tox: https://tox.wiki/en/latest/ -.. _Click: https://click.palletsprojects.com/ diff --git a/project_templates/square_pypi_package/{{cookiecutter.name}}/docs/dev/development.rst b/project_templates/square_pypi_package/{{cookiecutter.name}}/docs/dev/development.rst index 6af5c7fe..c396c887 100644 --- a/project_templates/square_pypi_package/{{cookiecutter.name}}/docs/dev/development.rst +++ b/project_templates/square_pypi_package/{{cookiecutter.name}}/docs/dev/development.rst @@ -101,30 +101,29 @@ The built documentation is located in the :file:`docs/_build/html` directory. Updating the change log ======================= -Each pull request should update the change log (:file:`CHANGELOG.md`). -Add a description of new features and fixes as list items under a section at the top of the change log called "Unreleased:" +{{cookiecutter.name}} uses scriv_ to maintain its change log. -.. code-block:: md +When preparing a pull request, run :command:`scriv create`. +This will create a change log fragment in :file:`changelog.d`. +Edit that fragment, removing the sections that do not apply and adding entries fo this pull request. +You can pass the ``--edit`` flag to :command:`scriv create` to open the created fragment automatically in an editor. - ## Unreleased +Change log entries use the following sections: - - Description of the feature or fix. +.. rst-class:: compact -If the next version is known (because {{cookiecutter.name}}'s main branch is being prepared for a new major or minor version), the section may contain that version information: +- **Backward-incompatible changes** +- **New features** +- **Bug fixes** +- **Other changes** (for minor, patch-level changes that are not bug fixes, such as logging formatting changes or updates to the documentation) -.. code-block:: md +These entries will eventually be cut and pasted into the release description for the next release, so the Markdown for the change descriptions should be compatible with GitHub's Markdown conventions for the release description. +Specifically: - ## X.Y.0 (unreleased) - - - Description of the feature or fix. - -If the exact version and release date is known (:doc:`because a release is being prepared `), the section header is formatted as: - -.. code-block:: md - - ## X.Y.0 (YYYY-MM-DD) - - - Description of the feature or fix. +- Each bullet point should be entirely on one line, even if it contains multiple sentences. + This is an exception to the normal documentation convention of a newline after each sentence. + Unfortunately, GitHub interprets those newlines as hard line breaks, so they would result in an ugly release description. +- Avoid using too much complex markup, such as nested bullet lists, since the formatting in the GitHub release description may not be what you expect and manually editing it is tedious. .. _style-guide: diff --git a/project_templates/square_pypi_package/{{cookiecutter.name}}/docs/dev/release.rst b/project_templates/square_pypi_package/{{cookiecutter.name}}/docs/dev/release.rst index 9caa7454..e50820c5 100644 --- a/project_templates/square_pypi_package/{{cookiecutter.name}}/docs/dev/release.rst +++ b/project_templates/square_pypi_package/{{cookiecutter.name}}/docs/dev/release.rst @@ -26,11 +26,28 @@ Release tags are semantic version identifiers following the :pep:`440` specifica 1. Change log and documentation ------------------------------- -Each PR should include updates to the change log. -If the change log or documentation needs additional updates, now is the time to make those changes through the regular branch-and-PR development method against the ``main`` branch. +Change log messages for each release are accumulated using scriv_. +See :ref:`dev-change-log` in the *Developer guide* for more details. -In particular, replace the "Unreleased" section headline with the semantic version and date. -See :ref:`dev-change-log` in the *Developer guide* for details. +When it comes time to make the release, there should be a collection of change log fragments in :file:`changelog.d`. +Those fragments will make up the change log for the new release. + +Review those fragments to determine the version number of the next release. +Safir follows semver_, so follow its rules to pick the next version: + +.. rst-class:: compact + +- If there are any backward-incompatible changes, incremeent the major version number and set the other numbers to 0. +- If there are any new features, increment the minor version number and set the patch version to 0. +- Otherwise, increment the patch version number. + +Then, run ``scriv collect --version `` specifying the version number you decided on. +This will delete the fragment files and collect them into :file:`CHANGELOG.md` under an entry for the new release. +Review that entry and edit it as needed (proofread, change the order to put more important things first, etc.). +scriv will put blank lines between entries from different files. +You may wish to remove those blank lines to ensure consistent formatting by various Markdown parsers. + +Finally, create a PR from those changes and merge it before continuing with the release process. 2. GitHub release and tag ------------------------- @@ -75,7 +92,7 @@ If the release branch doesn't already exist, check out the latest patch for that Developing on a release branch ------------------------------ -Once a release branch exists, it becomes the "master" branch for patches of that major-minor version. +Once a release branch exists, it becomes the "main" branch for patches of that major-minor version. Pull requests should be based on, and merged into, the release branch. If the development on the release branch is a backport of commits on the ``main`` branch, use ``git cherry-pick`` to copy those commits into a new pull request against the release branch. diff --git a/project_templates/square_pypi_package/{{cookiecutter.name}}/pyproject.toml b/project_templates/square_pypi_package/{{cookiecutter.name}}/pyproject.toml index 50da4f19..79c871e2 100644 --- a/project_templates/square_pypi_package/{{cookiecutter.name}}/pyproject.toml +++ b/project_templates/square_pypi_package/{{cookiecutter.name}}/pyproject.toml @@ -234,3 +234,16 @@ classmethod-decorators = [ [tool.ruff.pydocstyle] convention = "numpy" + +[tool.scriv] +categories = [ + "Backwards-incompatible changes", + "New features", + "Bug fixes", + "Other changes", +] +entry_title_template = "{{ "{{ version }} ({{ date.strftime('%Y-%m-%d') }})" }}" +format = "md" +md_header_level = "2" +new_fragment_template = "file:changelog.d/_template.md.jinja" +skip_fragments = "_template.md.jinja" From 90e53283e9e4aca6ed5d072e598b9d1fc1cb9f87 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Wed, 13 Sep 2023 16:50:41 -0700 Subject: [PATCH 2/3] Shorten the CHANGELOG.md preambles The previous version was unnecessarily verbose and included developer information about using scriv that is not likely to be of interest to the target audience. Omit the note about updating dependencies for PyPI apps; those changes aren't done automatically with PyPI apps and may be significant enough to note in the change log. --- .../fastapi_safir_app/example/CHANGELOG.md | 10 +++------- .../{{cookiecutter.name}}/CHANGELOG.md | 10 +++------- .../square_pypi_package/example/CHANGELOG.md | 9 ++------- .../{{cookiecutter.name}}/CHANGELOG.md | 9 ++------- 4 files changed, 10 insertions(+), 28 deletions(-) diff --git a/project_templates/fastapi_safir_app/example/CHANGELOG.md b/project_templates/fastapi_safir_app/example/CHANGELOG.md index 0c65db25..2d1c3815 100644 --- a/project_templates/fastapi_safir_app/example/CHANGELOG.md +++ b/project_templates/fastapi_safir_app/example/CHANGELOG.md @@ -1,12 +1,8 @@ # Change log -All notable changes to example will be documented in this file. +example is versioned with [semver](https://semver.org/). +Dependencies are updated to the latest available version during each release, and aren't noted here. -Versioning follows [semver](https://semver.org/). - -Dependencies are updated to the latest available version during each release. Those changes are not noted here explicitly. - -This project uses [scriv](https://scriv.readthedocs.io/en/stable/) to maintain the change log. -Changes for the upcoming release can be found in [changelog.d](https://github.com/lsst-sqre/example/tree/main/changelog.d/). +Find changes for the upcoming release in the project's [changelog.d directory](https://github.com/lsst-sqre/example/tree/main/changelog.d/). diff --git a/project_templates/fastapi_safir_app/{{cookiecutter.name}}/CHANGELOG.md b/project_templates/fastapi_safir_app/{{cookiecutter.name}}/CHANGELOG.md index f2e08aca..185fc1e2 100644 --- a/project_templates/fastapi_safir_app/{{cookiecutter.name}}/CHANGELOG.md +++ b/project_templates/fastapi_safir_app/{{cookiecutter.name}}/CHANGELOG.md @@ -1,12 +1,8 @@ # Change log -All notable changes to {{cookiecutter.name}} will be documented in this file. +{{cookiecutter.name}} is versioned with [semver](https://semver.org/). +Dependencies are updated to the latest available version during each release, and aren't noted here. -Versioning follows [semver](https://semver.org/). - -Dependencies are updated to the latest available version during each release. Those changes are not noted here explicitly. - -This project uses [scriv](https://scriv.readthedocs.io/en/stable/) to maintain the change log. -Changes for the upcoming release can be found in [changelog.d](https://github.com/{{cookiecutter.github_org}}/{{cookiecutter.name}}/tree/main/changelog.d/). +Find changes for the upcoming release in the project's [changelog.d directory](https://github.com/{{cookiecutter.github_org}}/{{cookiecutter.name}}/tree/main/changelog.d/). diff --git a/project_templates/square_pypi_package/example/CHANGELOG.md b/project_templates/square_pypi_package/example/CHANGELOG.md index 0c65db25..7b1afd4b 100644 --- a/project_templates/square_pypi_package/example/CHANGELOG.md +++ b/project_templates/square_pypi_package/example/CHANGELOG.md @@ -1,12 +1,7 @@ # Change log -All notable changes to example will be documented in this file. +example is versioned with [semver](https://semver.org/). -Versioning follows [semver](https://semver.org/). - -Dependencies are updated to the latest available version during each release. Those changes are not noted here explicitly. - -This project uses [scriv](https://scriv.readthedocs.io/en/stable/) to maintain the change log. -Changes for the upcoming release can be found in [changelog.d](https://github.com/lsst-sqre/example/tree/main/changelog.d/). +Find changes for the upcoming release in the project's [changelog.d directory](https://github.com/lsst-sqre/example/tree/main/changelog.d/). diff --git a/project_templates/square_pypi_package/{{cookiecutter.name}}/CHANGELOG.md b/project_templates/square_pypi_package/{{cookiecutter.name}}/CHANGELOG.md index f2e08aca..9d6d3ee8 100644 --- a/project_templates/square_pypi_package/{{cookiecutter.name}}/CHANGELOG.md +++ b/project_templates/square_pypi_package/{{cookiecutter.name}}/CHANGELOG.md @@ -1,12 +1,7 @@ # Change log -All notable changes to {{cookiecutter.name}} will be documented in this file. +{{cookiecutter.name}} is versioned with [semver](https://semver.org/). -Versioning follows [semver](https://semver.org/). - -Dependencies are updated to the latest available version during each release. Those changes are not noted here explicitly. - -This project uses [scriv](https://scriv.readthedocs.io/en/stable/) to maintain the change log. -Changes for the upcoming release can be found in [changelog.d](https://github.com/{{cookiecutter.github_org}}/{{cookiecutter.name}}/tree/main/changelog.d/). +Find changes for the upcoming release in the project's [changelog.d directory](https://github.com/{{cookiecutter.github_org}}/{{cookiecutter.name}}/tree/main/changelog.d/). From 4ff472c0c21b74e9f2a4a67cbc883050447fb3e1 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Wed, 13 Sep 2023 16:54:31 -0700 Subject: [PATCH 3/3] Add scriv to development dependencies In the FastAPI Safir app and SQuaRE PyPI project templates, add scriv to the development dependencies. --- .../fastapi_safir_app/example/requirements/dev.in | 4 ++++ .../{{cookiecutter.name}}/requirements/dev.in | 4 ++++ project_templates/square_pypi_package/example/pyproject.toml | 1 + .../square_pypi_package/{{cookiecutter.name}}/pyproject.toml | 1 + 4 files changed, 10 insertions(+) diff --git a/project_templates/fastapi_safir_app/example/requirements/dev.in b/project_templates/fastapi_safir_app/example/requirements/dev.in index b960564b..a0cc567d 100644 --- a/project_templates/fastapi_safir_app/example/requirements/dev.in +++ b/project_templates/fastapi_safir_app/example/requirements/dev.in @@ -9,6 +9,7 @@ -c main.txt +# Testing asgi-lifespan coverage[toml] httpx @@ -18,3 +19,6 @@ pydantic pytest pytest-asyncio pytest-cov + +# Documentation +scriv diff --git a/project_templates/fastapi_safir_app/{{cookiecutter.name}}/requirements/dev.in b/project_templates/fastapi_safir_app/{{cookiecutter.name}}/requirements/dev.in index b960564b..a0cc567d 100644 --- a/project_templates/fastapi_safir_app/{{cookiecutter.name}}/requirements/dev.in +++ b/project_templates/fastapi_safir_app/{{cookiecutter.name}}/requirements/dev.in @@ -9,6 +9,7 @@ -c main.txt +# Testing asgi-lifespan coverage[toml] httpx @@ -18,3 +19,6 @@ pydantic pytest pytest-asyncio pytest-cov + +# Documentation +scriv diff --git a/project_templates/square_pypi_package/example/pyproject.toml b/project_templates/square_pypi_package/example/pyproject.toml index ef5b6ddd..eef97fef 100644 --- a/project_templates/square_pypi_package/example/pyproject.toml +++ b/project_templates/square_pypi_package/example/pyproject.toml @@ -34,6 +34,7 @@ dev = [ "mypy", # Documentation "documenteer[guide]<1", + "scriv", ] [project.urls] diff --git a/project_templates/square_pypi_package/{{cookiecutter.name}}/pyproject.toml b/project_templates/square_pypi_package/{{cookiecutter.name}}/pyproject.toml index 79c871e2..375f57bb 100644 --- a/project_templates/square_pypi_package/{{cookiecutter.name}}/pyproject.toml +++ b/project_templates/square_pypi_package/{{cookiecutter.name}}/pyproject.toml @@ -34,6 +34,7 @@ dev = [ "mypy", # Documentation "documenteer[guide]<1", + "scriv", ] [project.urls]