Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use towncrier to handle change log entries #147

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
> [!TIP]
> For a public change, remember to write news fragment(s) in `changes/`:
> - ``changes/<PR#>.apichange.rst``: change to public API
> - ``changes/<PR#>.bugfix.rst``: fixes an issue
> - ``changes/<PR#>.general.rst``: infrastructure or miscellaneous change
>
> Otherwise, add the label `no-changelog-entry-needed`.
30 changes: 30 additions & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: changelog

on:
pull_request:
types:
- labeled
- unlabeled
- opened
- synchronize
- reopened

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
check:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-changelog-entry-needed') }}
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v5
with:
python-version: 3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: pip install .
- run: pip install towncrier
- run: towncrier check
- run: towncrier build --draft | grep -P '#${{ github.event.number }}'
3 changes: 3 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ build:
os: ubuntu-22.04
tools:
python: mambaforge-4.10
jobs:
post_install:
- towncrier build --keep

conda:
environment: docs/rtd_environment.yaml
Expand Down
1 change: 1 addition & 0 deletions changes/.gitkeep
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions changes/147.general.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use ``towncrier`` to handle change log entries
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Contents
romanisim/parameters
romanisim/util

romanisim/changes

Indices and tables
==================
Expand Down
7 changes: 7 additions & 0 deletions docs/romanisim/changes.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.. currentmodule:: romanisim

***********
Change Log
***********

.. include:: ../../CHANGES.rst
1 change: 1 addition & 0 deletions docs/rtd_environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ dependencies:
- python=3.11
- pip
- graphviz
- towncrier
18 changes: 18 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,21 @@ extend-ignore = [

[tool.cibuildwheel.macos]
before-build = "brew install eigen fftw"

[tool.towncrier]
filename = "CHANGES.rst"
directory = "changes"
package = "romanisim"
title_format = "{version} ({project_date})"
ignore = [".gitkeep"]
wrap = true
issue_format = "`#{issue} <https://github.com/spacetelescope/romanisim/issues/{issue}>`_"

[tool.towncrier.fragment.apichange]
name = "Changes to API"

[tool.towncrier.fragment.bugfix]
name = "Bug Fixes"

[tool.towncrier.fragment.general]
name = "General"
Loading