Skip to content

Commit

Permalink
FIX: define dev dependencies as dependency groups (#113)
Browse files Browse the repository at this point in the history
* DX: remove git commit message helper VS Code extension
* MAINT: update lock files
  • Loading branch information
redeboer authored Oct 28, 2024
1 parent 8fd92d1 commit b5a1944
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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]
Expand Down Expand Up @@ -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

Expand All @@ -77,6 +77,6 @@ repos:
)$
- repo: https://github.com/ComPWA/pyright-pre-commit
rev: v1.1.385
rev: v1.1.386
hooks:
- id: pyright
1 change: 0 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
20 changes: 19 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
14 changes: 4 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,20 @@ requires = ["setuptools>=61.2"]

[project]
authors = [{name = "Common Partial Wave Analysis", email = "[email protected]"}]
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"]
Expand Down

0 comments on commit b5a1944

Please sign in to comment.