diff --git a/.cspell.json b/.cspell.json index 9beaf0e..0a913e4 100644 --- a/.cspell.json +++ b/.cspell.json @@ -15,37 +15,19 @@ "transisions" ], "ignorePaths": [ + "**/*.bib", "**/.cspell.json", - "*.bib", - "*.ico", - "*.root", - "*.rst_t", - "*.svg", - "*particle*.*ml", - ".constraints/*.txt", ".editorconfig", ".gitignore", ".gitpod.*", - ".mypy.ini", ".pre-commit-config.yaml", ".prettierignore", ".readthedocs.yml", ".vscode/*", - ".vscode/.gitignore", - "CITATION.cff", - "codecov.yml", - "Dockerfile", "docs/_templates/*", - "docs/adr/*/*", "docs/conf.py", "labels.toml", - "Makefile", - "Manifest.toml", - "Project.toml", "pyproject.toml", - "pyrightconfig.json", - "pytest.ini", - "requirements*.txt", "setup.cfg", "setup.py", "tox.ini", diff --git a/.github/workflows/pr-linting.yml b/.github/workflows/pr-linting.yml index 91fdfcf..cd3bb74 100644 --- a/.github/workflows/pr-linting.yml +++ b/.github/workflows/pr-linting.yml @@ -1,5 +1,3 @@ -# cspell:ignore agilepathway commitlint kode - name: PR linting on: pull_request: @@ -14,19 +12,22 @@ on: jobs: check-labels: name: Check labels - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: docker://agilepathway/pull-request-label-checker:latest + - uses: docker://agilepathway/pull-request-label-checker:latest # cspell:ignore agilepathway with: - any_of: Bug,✨ Feature,⚠️ Interface,📝 Docs,🔨 Maintenance,🖱️ DX - none_of: Epic,❌ Won't fix,💫 Good first issue + any_of: >- + 🐛 Bug,✨ Feature,⚙️ Enhancement,⚠️ Interface,❗ Behavior,📝 Docs,🔨 Maintenance,🖱️ DX + none_of: Epic,💫 Good first issue repo_token: ${{ secrets.GITHUB_TOKEN }} check-title: name: Check title - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v1 - - name: Install Dependencies - run: npm install @commitlint/config-conventional - - uses: JulienKode/pull-request-name-linter-action@v0.1.2 + - uses: actions/checkout@v4 + - run: npm install @compwa/commitlint-config + - name: Create commitlint config + run: | + echo "module.exports = {extends: ['@compwa/commitlint-config']}" > commitlint.config.js + - uses: JulienKode/pull-request-name-linter-action@v0.5.0 # cspell:ignore kode diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index d54187d..d64f197 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -9,7 +9,7 @@ on: jobs: update_release_draft: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: release-drafter/release-drafter@v5 env: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8a1797a..111bb84 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -32,7 +32,7 @@ repos: - id: trailing-whitespace - repo: https://github.com/ComPWA/repo-maintenance - rev: 0.1.0rc5 + rev: 0.1.0rc6 hooks: - id: check-dev-files args: @@ -93,3 +93,11 @@ repos: rev: v0.8.1 hooks: - id: taplo + + - repo: https://github.com/pappasam/toml-sort + rev: v0.23.1 + hooks: + - id: toml-sort + args: + - --in-place + exclude: (?x)^(labels.*\.toml)$ diff --git a/.taplo.toml b/.taplo.toml index f5caabe..0578617 100644 --- a/.taplo.toml +++ b/.taplo.toml @@ -1,16 +1,16 @@ exclude = [ - "**/Cargo.toml", - "**/Manifest.toml", - "**/Project.toml", "labels*.toml", ] [formatting] +align_comments = false align_entries = false +allowed_blank_lines = 1 array_auto_collapse = false array_auto_expand = true array_trailing_comma = true column_width = 88 +compact_inline_tables = true indent_string = " " reorder_arrays = true reorder_keys = true diff --git a/.vscode/settings.json b/.vscode/settings.json index 90c9e02..6269430 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -2,6 +2,10 @@ "[bibtex]": { "editor.formatOnSave": false }, + "[git-commit]": { + "editor.rulers": [72], + "rewrap.wrappingColumn": 72 + }, "[json]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, @@ -19,7 +23,8 @@ "editor.codeActionsOnSave": { "source.organizeImports": true }, - "editor.defaultFormatter": "ms-python.black-formatter" + "editor.defaultFormatter": "ms-python.black-formatter", + "editor.rulers": [88] }, "[yaml]": { "editor.defaultFormatter": "esbenp.prettier-vscode" @@ -27,7 +32,6 @@ "black-formatter.importStrategy": "fromEnvironment", "cSpell.enabled": true, "editor.formatOnSave": true, - "editor.rulers": [88], "files.watcherExclude": { "**/*_cache/**": true, "**/.eggs/**": true, @@ -40,7 +44,7 @@ "python.testing.pytestArgs": ["--color=no", "--no-cov"], "python.testing.pytestEnabled": false, "python.testing.unittestEnabled": false, - "rewrap.wrappingColumn": 79, + "rewrap.wrappingColumn": 88, "ruff.enable": true, "ruff.organizeImports": true, "search.exclude": { diff --git a/commitlint.config.js b/commitlint.config.js deleted file mode 100644 index d8b6bdc..0000000 --- a/commitlint.config.js +++ /dev/null @@ -1,11 +0,0 @@ -module.exports = { - extends: ["@commitlint/config-conventional"], - rules: { - "type-case": [2, "always", ["upper-case"]], - "type-enum": [ - 2, - "always", - ["BEHAVIOR", "BREAK", "DOC", "DX", "ENH", "FEAT", "FIX", "MAINT"], - ], - }, -}; diff --git a/labels.toml b/labels.toml index 4d05751..2680c3a 100644 --- a/labels.toml +++ b/labels.toml @@ -1,64 +1,64 @@ [Bug] color = "d93f0b" -name = "Bug" description = "Something isn't working" +name = "Bug" [Epic] color = "3E4B9E" -name = "Epic" description = "Collection of issues, managed by ZenHub" +name = "Epic" ["⚪ Duplicate"] color = "cfd3d7" -name = "⚪ Duplicate" description = "This issue or pull request already exists" +name = "⚪ Duplicate" + +["✨ Feature"] +color = "c2e0c6" +description = "New feature added to the package" +name = "✨ Feature" ["❌ Won't fix"] color = "ffffff" -name = "❌ Won't fix" description = "This will not be worked on" +name = "❌ Won't fix" ["❔ Question"] color = "88506B" -name = "❔ Question" description = "Discuss this matter in the team" - -["✨ Feature"] -color = "c2e0c6" -name = "✨ Feature" -description = "New feature added to the package" +name = "❔ Question" ["💫 Good first issue"] color = "F4EAEF" -name = "💫 Good first issue" description = "Good for newcomers" +name = "💫 Good first issue" ["📖 Analysis"] color = "FBE2BD" -name = "📖 Analysis" description = "About HEP analysis techniques" +name = "📖 Analysis" ["📖 Software"] color = "FDF3E4" -name = "📖 Software" description = "About software development" +name = "📖 Software" ["📖 Theory"] color = "F7C57B" -name = "📖 Theory" description = "About physics" +name = "📖 Theory" ["📝 Docs"] color = "bfd4f2" -name = "📝 Docs" description = "Improvements or additions to documentation" +name = "📝 Docs" ["🔨 Maintenance"] color = "FFCD8F" -name = "🔨 Maintenance" description = "Refactoring that doesn't affect the interface" +name = "🔨 Maintenance" ["🖱️ DX"] color = "fef2c0" -name = "🖱️ DX" description = "Improvements to the Developer Experience" +name = "🖱️ DX" diff --git a/pyproject.toml b/pyproject.toml index c46bbdd..72b8383 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -103,6 +103,7 @@ ignore = [ "D416", "E501", "SIM108", + "UP036", ] show-fixes = true target-version = "py37" @@ -125,3 +126,17 @@ task-tags = ["cspell"] [tool.ruff.pydocstyle] convention = "google" + +[tool.tomlsort] +all = false +ignore_case = true +in_place = true +sort_first = [ + "build-system", + "project", + "tool.setuptools", + "tool.setuptools_scm", +] +sort_table_keys = true +spaces_indent_inline_array = 4 +trailing_comma_inline_array = true