Skip to content

Commit 1e1c2fc

Browse files
authored
use uv-0.3 (#148)
* use uv-0.3 * updating setup uv * updating devcontainer with use ruff formatter in VSCode
1 parent a5d16aa commit 1e1c2fc

File tree

8 files changed

+1032
-17
lines changed

8 files changed

+1032
-17
lines changed

.devcontainer/devcontainer.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@
77
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
88
"ghcr.io/devcontainers/features/git:1": {},
99
"ghcr.io/devcontainers/features/github-cli:1": {},
10-
"ghcr.io/va-h/devcontainers-features/uv:1": {},
11-
"ghcr.io/devcontainers-contrib/features/act:1": {},
12-
"ghcr.io/devcontainers-contrib/features/ruff:1": {}
10+
"ghcr.io/devcontainers-contrib/features/act:1": {}
1311
},
1412

1513
// Use 'forwardPorts' to make a list of ports inside the container available locally.
@@ -32,7 +30,13 @@
3230
],
3331
// Set *default* container specific settings.json values on container create.
3432
"settings": {
35-
"ruff.path": ["/usr/local/py-utils/bin/ruff"]
33+
"editor.codeActionsOnSave": {
34+
"source.fixAll": "explicit"
35+
},
36+
"[python]": {
37+
"editor.defaultFormatter": "charliermarsh.ruff"
38+
},
39+
"python.defaultInterpreterPath": "/usr/local/bin/python"
3640
}
3741
}
3842
},

.devcontainer/on_create_command.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
# setup
2+
set -ex
23

3-
pip install -r dev-requires.txt
4+
curl -LsSf https://astral.sh/uv/install.sh | sh
5+
. $HOME/.cargo/env
6+
uv tool install -U ruff
7+
uv tool install -U tox --with tox-uv
8+
uv sync --extra psycopg2-binary

.github/workflows/release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@ jobs:
2323
- name: Install dependencies
2424
run: |
2525
curl -LsSf https://astral.sh/uv/install.sh | sh
26-
uv pip install --system -U setuptools_scm build twine
26+
uv sync
2727
2828
- name: Build package
2929
run: |
30+
. .venv/bin/activate
3031
python -m build --version
3132
python -m build
3233
twine check dist/*

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ jobs:
4747
- name: Install dependencies
4848
run: |
4949
curl -LsSf https://astral.sh/uv/install.sh | sh
50-
uv pip install --system --upgrade tox-uv tox-gh-actions
50+
uv sync
5151
5252
- name: Tox tests
5353
run: |
54-
tox -v
54+
.venv/bin/tox -v
5555
env:
5656
DJANGO: ${{ matrix.django-version }}
5757
TEST_WITH_POSTGRES: 1

dev-requires.txt

Lines changed: 0 additions & 7 deletions
This file was deleted.

doc/dev.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ Setup development environment
2020
* Requires supported Python version
2121
* do setup under django-redshift-backend.git repository root as::
2222

23-
$ pip install -U pip setuptools
24-
$ pip install -r dev-requires.txt
23+
$ pip install uv
24+
$ uv sync
2525

2626
Testing
2727
=======

pyproject.toml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,19 @@ local_scheme = "no-local-version"
6464

6565
[tool.ruff]
6666
exclude = ["django_redshift_backend/_vendor"]
67+
68+
[tool.uv]
69+
dev-dependencies = [
70+
"setuptools>=73.0.1",
71+
"wheel>=0.44.0",
72+
"setuptools-scm>=8.1.0",
73+
"tox-uv>=1.11.2",
74+
"build>=1.2.1",
75+
"twine>=5.1.1",
76+
"django-redshift-backend",
77+
"ruff>=0.6.2",
78+
"tox-gh-actions>=3.2.0",
79+
]
80+
81+
[tool.uv.sources]
82+
django-redshift-backend = { workspace = true }

uv.lock

Lines changed: 996 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)