Skip to content
Merged
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
1 change: 0 additions & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
".github/dependabot.yml",
".gitignore",
".pre-commit-config.yaml",
".taplo.toml",
".vscode/*",
"pyproject.toml"
],
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: CI

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: |-
${{ github.ref != format('refs/heads/{0}', github.event.repository.default_branch) }}

on:
push:
branches:
- main
- epic/*
- "[0-9]+.[0-9]+.x"
pull_request:
branches:
- main
- epic/*
- "[0-9]+.[0-9]+.x"
workflow_dispatch:

jobs:
style:
secrets:
token: ${{ secrets.PAT }}
uses: ComPWA/actions/.github/workflows/style.yml@v4.0
32 changes: 12 additions & 20 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ ci:
autofix_commit_msg: "MAINT: implement pre-commit autofixes"
autoupdate_commit_msg: "MAINT: upgrade lock files"
autoupdate_schedule: quarterly
skip:
- tombi-format
- tombi-lint

repos:
- repo: meta
Expand All @@ -10,16 +13,9 @@ repos:
- id: check-useless-excludes

- repo: https://github.com/ComPWA/policy
rev: 0.8.9
rev: 0.9.0
hooks:
- id: check-dev-files
args:
- --no-cd
- --keep-issue-templates
- --no-pypi
- --package-manager=none
- --repo-name=.github
- --repo-title=Public ComPWA GitHub profile

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
Expand All @@ -32,24 +28,20 @@ repos:
- id: mixed-line-ending
- id: trailing-whitespace

- repo: https://github.com/tombi-toml/tombi-pre-commit
rev: v1.2.0
hooks:
- id: tombi-format
- id: tombi-lint
args: [--error-on-warnings]

- repo: https://github.com/ComPWA/prettier-pre-commit
rev: v3.8.1
hooks:
- id: prettier

- repo: https://github.com/ComPWA/taplo-pre-commit
rev: v0.9.3
hooks:
- id: taplo-format

- repo: https://github.com/pappasam/toml-sort
rev: v0.24.4
hooks:
- id: toml-sort
args: [--in-place]

- repo: https://github.com/streetsidesoftware/cspell-cli
rev: v10.0.0
rev: v10.0.1
hooks:
- id: cspell
language_version: 25.9.0
1 change: 0 additions & 1 deletion .python-version

This file was deleted.

12 changes: 0 additions & 12 deletions .taplo.toml

This file was deleted.

3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"soulcode.vscode-unwanted-extensions",
"stkb.rewrap",
"streetsidesoftware.code-spell-checker",
"tamasfe.even-better-toml"
"tombi-toml.tombi"
],
"unwantedRecommendations": [
"bungcip.better-toml",
Expand All @@ -17,6 +17,7 @@
"ms-python.flake8",
"ms-python.isort",
"ms-python.pylint",
"tamasfe.even-better-toml",
"travisillig.vscode-json-stable-stringify",
"tyriar.sort-lines"
]
Expand Down
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
"[json]": {
"editor.wordWrap": "on"
},
"[toml]": {
"editor.defaultFormatter": "tombi-toml.tombi"
},
"diffEditor.experimental.showMoves": true,
"editor.formatOnSave": true,
"github-actions.workflows.pinned.workflows": [".github/workflows/ci.yml"],
Expand Down
47 changes: 41 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,41 @@
[tool.tomlsort]
all = false
ignore_case = true
in_place = true
spaces_indent_inline_array = 4
trailing_comma_inline_array = true
[tool.compwa.policy]
package-manager = "none"
repo-name = ".github"
repo-title = "Public ComPWA GitHub profile"

[tool.compwa.policy.github]
no-cd = true
no-pypi = true

[tool.compwa.policy.repo]
keep-issue-templates = true

[tool.poe.tasks.all]
help = "Run all continuous integration (CI) tasks locally"
sequence = ["style"]

[tool.poe.tasks.style]
cmd = "pre-commit run --all-files"
executor = { type = "simple" }
help = "Perform all linting, formatting, and spelling checks"

[tool.poe.tasks.upgrade]
executor = { type = "simple" }
help = "Upgrade lock files"
parallel = ["_upgrade-precommit"]

[tool.poe.tasks._upgrade-precommit]
cmd = "pre-commit autoupdate -j8"
executor = { type = "simple" }

[tool.tombi.format.rules]
indent-width = 4
line-width = 88

[tool.tombi.lint.rules]
key-empty = "off"

[[tool.tombi.schemas]]
root = "tool.compwa.policy"
path = "https://raw.githubusercontent.com/ComPWA/policy/0.9.0/compwa-policy.schema.json"
include = ["pyproject.toml"]