diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a1b164a..79edf73 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,4 +31,4 @@ jobs: if: inputs.specific-pip-packages == '' secrets: token: ${{ secrets.PAT }} - uses: ComPWA/actions/.github/workflows/pre-commit.yml@v2 + uses: ComPWA/actions/.github/workflows/pre-commit.yml@v2.1 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index da6fce9..2223c75 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,7 +11,7 @@ repos: - id: check-useless-excludes - repo: https://github.com/ComPWA/policy - rev: 0.5.0 + rev: 0.5.4 hooks: - id: check-dev-files args: @@ -25,7 +25,7 @@ repos: - --update-lock-files=no - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.7.0 + rev: v0.7.1 hooks: - id: ruff args: [--fix] @@ -61,7 +61,7 @@ repos: - --in-place - repo: https://github.com/streetsidesoftware/cspell-cli - rev: v8.15.1 + rev: v8.15.2 hooks: - id: cspell @@ -77,6 +77,6 @@ repos: )$ - repo: https://github.com/ComPWA/pyright-pre-commit - rev: v1.1.385 + rev: v1.1.386 hooks: - id: pyright diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 7eaf302..cacc4d6 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -14,7 +14,6 @@ "stkb.rewrap", "streetsidesoftware.code-spell-checker", "tamasfe.even-better-toml", - "trentrand.git-commit-helper-vscode", "yzhang.markdown-all-in-one" ], "unwantedRecommendations": [ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e321da3..1e9ddcc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -19,8 +19,26 @@ uv sync source .venv/bin/activate ``` -Formatting and linting checks are automatically performed when committing changes. This is done with [pre-commit](https://pre-commit.com). To install the hooks in your local repository, run [`pre-commit install`](https://pre-commit.com/#3-install-the-git-hook-scripts) **once**: +Formatting and linting checks are automatically performed when committing changes. This is done with [pre-commit](https://pre-commit.com). To install the hooks in your local repository, run install `pre-commit` with `uv`: + +```shell +uv tool install pre-commit --with pre-commit-uv --force-reinstall +``` + +and [`pre-commit install`](https://pre-commit.com/#3-install-the-git-hook-scripts) **once**: ```shell pre-commit install --install-hooks ``` + +In addition, it may be handy to install `tox`: + +```shell +uv tool install tox --with tox-uv +``` + +If the repository provides a Tox configuration under [`pyproject.toml`](./pyproject.toml), you can see which jobs it defines with: + +```shell +tox list +``` diff --git a/pyproject.toml b/pyproject.toml index ef1ce37..b2f46cb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,26 +4,20 @@ requires = ["setuptools>=61.2"] [project] authors = [{name = "Common Partial Wave Analysis", email = "compwa-admin@ep1.rub.de"}] -dependencies = ["packaging"] description = "Python scripts used by the ComPWA/actions repository" dynamic = ["version"] license = {text = "License :: OSI Approved :: MIT License"} name = "compwa-actions" requires-python = ">=3.12" -[project.optional-dependencies] -dev = [ - "compwa-actions[sty]", -] -sty = [ - "pre-commit-uv", - "ruff", -] - [project.readme] content-type = "text/markdown" file = "README.md" +[dependency-groups] +dev = ["ruff"] +style = ["packaging"] + [tool.setuptools] include-package-data = false license-files = ["LICENSE"]