Skip to content

Commit 7b4dd1e

Browse files
authored
Merge pull request #625 from willcl-ark/pin-ruff
tool: pin ruff version
2 parents 2fbbf8c + 5c3e501 commit 7b4dd1e

File tree

3 files changed

+26
-9
lines changed

3 files changed

+26
-9
lines changed

.github/workflows/test.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,23 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- uses: actions/checkout@v4
19-
- uses: eifinger/setup-uv@v1
20-
- run: uvx ruff check .
19+
- name: Install a specific version of uv
20+
uses: astral-sh/setup-uv@v3
21+
with:
22+
version: "0.4.4"
23+
enable-cache: true
24+
- run: uvx [email protected] check .
2125

2226
ruff-format:
2327
runs-on: ubuntu-latest
2428
steps:
2529
- uses: actions/checkout@v4
26-
- name: Install the latest version of uv
27-
uses: astral-sh/setup-uv@v2
30+
- name: Install a specific version of uv
31+
uses: astral-sh/setup-uv@v3
2832
with:
29-
version: "latest"
33+
version: "0.4.4"
3034
enable-cache: true
31-
- run: uvx ruff format . --check
35+
- run: uvx ruff@0.6.8 format . --check
3236

3337
test:
3438
needs: [ruff, ruff-format]

docs/developer-notes.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,27 @@ pip install --upgrade pip
2121
pip install -e .
2222
```
2323

24-
## Lint
24+
## Formatting & linting
2525

2626
This project primarily uses the `uv` python packaging tool: https://docs.astral.sh/uv/ along with the sister formatter/linter `ruff` https://docs.astral.sh/ruff/
2727

28+
Refer to the `uv` documentation for installation methods: https://docs.astral.sh/uv/getting-started/installation/
29+
2830
With `uv` installed you can add/remove dependencies using `uv add <dep>` or `uv remove <dep>.
2931
This will update the [`uv.lock`](https://docs.astral.sh/uv/guides/projects/#uvlock) file automatically.
3032

33+
We use ruff version 0.6.8 in this project currently. This can be installed as a stand-alone binary (see documentation), or via `uv` using:
34+
35+
```bash
36+
# install
37+
$ uv tool install [email protected]
38+
39+
# lint
40+
$ uvx [email protected] check .
3141

32-
`uv` can also run tools (like `ruff`) without external installation, simply run `uvx ruff check .` or `uvx ruff format .` to use a uv-managed format/lint on the project.
42+
# format
43+
$ uvx [email protected] format .
44+
```
3345

3446
## Release process
3547

@@ -59,4 +71,4 @@ python3 -m build
5971
```bash
6072
# Upload to Pypi
6173
python3 -m twine upload dist/*
62-
```
74+
```

ruff.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
required-version = "==0.6.8"
12
extend-exclude = [
23
"resources/scenarios/test_framework",
34
"resources/images/exporter/authproxy.py",

0 commit comments

Comments
 (0)