From bd7baccae1190741307dc3fbb5b17437b899dee5 Mon Sep 17 00:00:00 2001 From: Remco de Boer <29308176+redeboer@users.noreply.github.com> Date: Sat, 3 Sep 2022 23:44:39 +0200 Subject: [PATCH] DX: enforce new commit types and PR labels (#323) * MAINT: update pip constraints and pre-commit config * MAINT: use correct commit type in autoupdate PRs Co-authored-by: GitHub --- .constraints/py3.10.txt | 5 ++-- .constraints/py3.7.txt | 5 ++-- .constraints/py3.8.txt | 5 ++-- .constraints/py3.9.txt | 5 ++-- .cspell.json | 1 + .github/release-drafter.yml | 34 +++++++++++++++---------- .github/workflows/ci-docs.yml | 8 ++++++ .github/workflows/requirements-cron.yml | 4 +-- .github/workflows/requirements-pr.yml | 2 +- .pre-commit-config.yaml | 4 +-- commitlint.config.js | 16 ++---------- 11 files changed, 49 insertions(+), 40 deletions(-) diff --git a/.constraints/py3.10.txt b/.constraints/py3.10.txt index c07f9c310..5aceacf91 100644 --- a/.constraints/py3.10.txt +++ b/.constraints/py3.10.txt @@ -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 @@ -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 @@ -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 diff --git a/.constraints/py3.7.txt b/.constraints/py3.7.txt index 4debd8edc..2632b01be 100644 --- a/.constraints/py3.7.txt +++ b/.constraints/py3.7.txt @@ -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 @@ -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 @@ -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 diff --git a/.constraints/py3.8.txt b/.constraints/py3.8.txt index 00ea8a4e4..6e5e03ee4 100644 --- a/.constraints/py3.8.txt +++ b/.constraints/py3.8.txt @@ -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 @@ -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 @@ -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 diff --git a/.constraints/py3.9.txt b/.constraints/py3.9.txt index 60764ca7b..12fb9586c 100644 --- a/.constraints/py3.9.txt +++ b/.constraints/py3.9.txt @@ -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 @@ -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 @@ -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 diff --git a/.cspell.json b/.cspell.json index 1f4730b40..a27269db3 100644 --- a/.cspell.json +++ b/.cspell.json @@ -135,6 +135,7 @@ "linkcheck", "linspace", "macos", + "MAINT", "marangotto", "markdownlint", "mathcal", diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index a14b582cf..491ce58ea 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -1,4 +1,4 @@ -name-template: AmpForm $NEXT_PATCH_VERSION +name-template: Repo Maintenance $NEXT_PATCH_VERSION tag-template: $NEXT_PATCH_VERSION references: @@ -6,30 +6,38 @@ references: - 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: | +
+ $TITLE (#$NUMBER) + + $BODY + +
replacers: - - search: /([a-z]+!?:\s*)(.*)/g - replace: $2 + - search: /([a-z]+!?:\s*)(.*)/g + replace: $2 sort-direction: ascending template: | - _See all documentation for this version [here](https://ampform.rtfd.io/en/$NEXT_PATCH_VERSION)._ + # Release $NEXT_PATCH_VERSION $CHANGES diff --git a/.github/workflows/ci-docs.yml b/.github/workflows/ci-docs.yml index ef1a21151..18ff30f66 100644 --- a/.github/workflows/ci-docs.yml +++ b/.github/workflows/ci-docs.yml @@ -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: diff --git a/.github/workflows/requirements-cron.yml b/.github/workflows/requirements-cron.yml index bec4d00b4..a230dd3d5 100644 --- a/.github/workflows/requirements-cron.yml +++ b/.github/workflows/requirements-cron.yml @@ -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 author: GitHub - title: "ci: update pip constraints and pre-commit config" + title: "MAINT: update pip constraints and pre-commit config" labels: | 🔨 Maintenance branch-suffix: timestamp diff --git a/.github/workflows/requirements-pr.yml b/.github/workflows/requirements-pr.yml index 0d77386e4..084a6ac1e 100644 --- a/.github/workflows/requirements-pr.yml +++ b/.github/workflows/requirements-pr.yml @@ -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} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 84c3163b9..794d2469e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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: @@ -177,7 +177,7 @@ repos: - python - repo: https://github.com/ComPWA/mirrors-pyright - rev: v1.1.265 + rev: v1.1.266 hooks: - id: pyright diff --git a/commitlint.config.js b/commitlint.config.js index 7c72e811b..d8b6bdcda 100644 --- a/commitlint.config.js +++ b/commitlint.config.js @@ -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"], ], }, };