Skip to content

Commit

Permalink
DX: enforce new commit types and PR labels (#323)
Browse files Browse the repository at this point in the history
* MAINT: update pip constraints and pre-commit config
* MAINT: use correct commit type in autoupdate PRs

Co-authored-by: GitHub <noreply@github.com>
  • Loading branch information
redeboer and web-flow committed Sep 3, 2022
1 parent 599c8f2 commit bd7bacc
Show file tree
Hide file tree
Showing 11 changed files with 49 additions and 40 deletions.
5 changes: 3 additions & 2 deletions .constraints/py3.10.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ kiwisolver==1.4.4
latexcodec==2.0.1
lazy-object-proxy==1.7.1
livereload==2.6.3
lxml==4.9.1
mando==0.6.4
markdown-it-py==2.1.0
markupsafe==2.1.1
Expand All @@ -101,7 +102,7 @@ myst-nb==0.16.0
myst-parser==0.18.0
nbclassic==0.4.3
nbclient==0.5.13
nbconvert==6.5.0
nbconvert==6.5.1
nbformat==5.4.0
nbmake==1.3.0
nest-asyncio==1.5.5
Expand Down Expand Up @@ -176,7 +177,7 @@ sphinxcontrib-htmlhelp==2.0.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
sqlalchemy==1.4.39
sqlalchemy==1.4.40
stack-data==0.3.0
sympy==1.10.1
tabulate==0.8.10
Expand Down
5 changes: 3 additions & 2 deletions .constraints/py3.7.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ kiwisolver==1.4.4
latexcodec==2.0.1
lazy-object-proxy==1.7.1
livereload==2.6.3
lxml==4.9.1
mando==0.6.4
markdown-it-py==2.1.0
markupsafe==2.1.1
Expand All @@ -99,7 +100,7 @@ myst-nb==0.16.0
myst-parser==0.18.0
nbclassic==0.4.3
nbclient==0.5.13
nbconvert==6.5.0
nbconvert==6.5.1
nbformat==5.4.0
nbmake==1.3.0
nest-asyncio==1.5.5
Expand Down Expand Up @@ -175,7 +176,7 @@ sphinxcontrib-htmlhelp==2.0.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
sqlalchemy==1.4.39
sqlalchemy==1.4.40
sympy==1.10.1
tabulate==0.8.10
terminado==0.15.0
Expand Down
5 changes: 3 additions & 2 deletions .constraints/py3.8.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ kiwisolver==1.4.4
latexcodec==2.0.1
lazy-object-proxy==1.7.1
livereload==2.6.3
lxml==4.9.1
mando==0.6.4
markdown-it-py==2.1.0
markupsafe==2.1.1
Expand All @@ -102,7 +103,7 @@ myst-nb==0.16.0
myst-parser==0.18.0
nbclassic==0.4.3
nbclient==0.5.13
nbconvert==6.5.0
nbconvert==6.5.1
nbformat==5.4.0
nbmake==1.3.0
nest-asyncio==1.5.5
Expand Down Expand Up @@ -178,7 +179,7 @@ sphinxcontrib-htmlhelp==2.0.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
sqlalchemy==1.4.39
sqlalchemy==1.4.40
stack-data==0.3.0
sympy==1.10.1
tabulate==0.8.10
Expand Down
5 changes: 3 additions & 2 deletions .constraints/py3.9.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ kiwisolver==1.4.4
latexcodec==2.0.1
lazy-object-proxy==1.7.1
livereload==2.6.3
lxml==4.9.1
mando==0.6.4
markdown-it-py==2.1.0
markupsafe==2.1.1
Expand All @@ -101,7 +102,7 @@ myst-nb==0.16.0
myst-parser==0.18.0
nbclassic==0.4.3
nbclient==0.5.13
nbconvert==6.5.0
nbconvert==6.5.1
nbformat==5.4.0
nbmake==1.3.0
nest-asyncio==1.5.5
Expand Down Expand Up @@ -176,7 +177,7 @@ sphinxcontrib-htmlhelp==2.0.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
sqlalchemy==1.4.39
sqlalchemy==1.4.40
stack-data==0.3.0
sympy==1.10.1
tabulate==0.8.10
Expand Down
1 change: 1 addition & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@
"linkcheck",
"linspace",
"macos",
"MAINT",
"marangotto",
"markdownlint",
"mathcal",
Expand Down
34 changes: 21 additions & 13 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,43 @@
name-template: AmpForm $NEXT_PATCH_VERSION
name-template: Repo Maintenance $NEXT_PATCH_VERSION
tag-template: $NEXT_PATCH_VERSION

references:
- main
- epic/*

categories:
- title: 💡 New features
- title: New features
label: 💡 Feature
- title: ⚠️ Interface
labels:
- ⚠️ Interface
- 📖 Physics
- title: ⚠️ Enhancements and optimizations
label: ⚙️ Enhancement
- title: ⚠️ API changes
label: ⚠️ Interface
- title: ⚠️ Changes that may affect behavior
label: ❗ Behavior
- title: 🐛 Bug fixes
label: Bug
- title: 🔨 Internal maintenance
label: 🔨 Maintenance
label: 🐛 Bug
- title: 📝 Documentation
label: 📝 Docs
- title: 🔨 Maintenance
label: 🔨 Maintenance
- title: 🖱️ Developer Experience
label: 🖱️ DX

change-template: "- $TITLE (#$NUMBER)"
change-template: |
<details>
<summary>$TITLE (#$NUMBER)</summary>
$BODY
</details>
replacers:
- search: /([a-z]+!?:\s*)(.*)/g
replace: $2
- search: /<summary>([a-z]+!?:\s*)(.*)</summary>/g
replace: <summary>$2</summary>

sort-direction: ascending

template: |
_See all documentation for this version [here](https://ampform.rtfd.io/en/$NEXT_PATCH_VERSION)._
# Release $NEXT_PATCH_VERSION
$CHANGES
8 changes: 8 additions & 0 deletions .github/workflows/ci-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ jobs:
echo
cat "$log_file"
done
for log_file in $(ls /tmp/sphinx-*.log); do
for i in $(seq 6); do echo; done
printf '%45s\n' | tr ' ' =
echo "$log_file"
printf '%45s\n' | tr ' ' =
echo
cat "$log_file"
done
- uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/requirements-cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ jobs:
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
commit-message: "ci: update pip constraints and pre-commit config"
commit-message: "MAINT: update pip constraints and pre-commit config"
committer: GitHub <noreply@github.com>
author: GitHub <noreply@github.com>
title: "ci: update pip constraints and pre-commit config"
title: "MAINT: update pip constraints and pre-commit config"
labels: |
🔨 Maintenance
branch-suffix: timestamp
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/requirements-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:
git checkout -b ${GITHUB_HEAD_REF}
if [[ $(git status -s) ]]; then
git add -A
git commit -m "ci: update pip constraints and pre-commit config"
git commit -m "MAINT: update pip constraints and pre-commit config"
git config pull.rebase true
git pull origin ${GITHUB_HEAD_REF}
git push origin HEAD:${GITHUB_HEAD_REF}
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/ComPWA/repo-maintenance
rev: 0.0.133
rev: 0.0.136
hooks:
- id: check-dev-files
args:
Expand Down Expand Up @@ -177,7 +177,7 @@ repos:
- python

- repo: https://github.com/ComPWA/mirrors-pyright
rev: v1.1.265
rev: v1.1.266
hooks:
- id: pyright

Expand Down
16 changes: 2 additions & 14 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,11 @@
module.exports = {
extends: ["@commitlint/config-conventional"],
rules: {
"type-case": [2, "always", ["upper-case"]],
"type-enum": [
2,
"always",
[
"adr",
"build",
"chore",
"ci",
"docs",
"epic",
"feat",
"fix",
"phys",
"refactor",
"style",
"test",
],
["BEHAVIOR", "BREAK", "DOC", "DX", "ENH", "FEAT", "FIX", "MAINT"],
],
},
};

0 comments on commit bd7bacc

Please sign in to comment.