Skip to content

Commit 72bd25f

Browse files
committed
chore: use uv
Signed-off-by: Jack Cherng <jfcherng@gmail.com>
1 parent a902ab4 commit 72bd25f

9 files changed

Lines changed: 342 additions & 52 deletions

File tree

.gitattributes

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,30 @@
1+
*.dist-info/ export-ignore
2+
*.pyi export-ignore
13
.dependabot export-ignore
24
.editorconfig export-ignore
35
.flake8 export-ignore
46
.gitattributes export-ignore
57
.github/ export-ignore
68
.gitignore export-ignore
79
.gitmodules export-ignore
10+
.markdownlint.yaml export-ignore
811
.style.yapf export-ignore
912
.travis.yml export-ignore
13+
cliff.toml export-ignore
1014
codecov.yml export-ignore
1115
docs/ export-ignore
12-
images/*.sh export-ignore
13-
images/FontAwesome/*.svg export-ignore
1416
Makefile export-ignore
17+
Makefile.* export-ignore
1518
mkdocs.yml export-ignore
1619
mypy.ini export-ignore
20+
py.typed export-ignore
1721
pyproject.toml export-ignore
1822
pyrightconfig.json export-ignore
19-
requirements-*.* export-ignore
20-
requirements.* export-ignore
23+
renovate.json export-ignore
2124
scripts/ export-ignore
2225
stubs/ export-ignore
2326
tests/ export-ignore
2427
tox.ini export-ignore
2528
typings/ export-ignore
2629
unittesting.json export-ignore
30+
uv.lock export-ignore

.github/workflows/python.yml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,23 +31,15 @@ jobs:
3131
os: ['ubuntu-latest']
3232
python-version: ['3.8']
3333

34-
env:
35-
UV_SYSTEM_PYTHON: 1
36-
3734
steps:
38-
- uses: actions/checkout@v4
35+
- uses: astral-sh/setup-uv@v6
36+
- uses: actions/checkout@v5
3937
with:
4038
submodules: recursive
41-
4239
- name: Set up Python ${{ matrix.python-version }}
43-
uses: actions/setup-python@v5
40+
uses: actions/setup-python@v6
4441
with:
4542
python-version: ${{ matrix.python-version }}
46-
47-
- name: Install dependencies
48-
run: |
49-
python -m pip install -U uv
50-
5143
- name: Do linting
5244
run: |
53-
make install-dev ci-check
45+
make ci-check

Makefile

Lines changed: 31 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,51 @@
1-
UV_INSTALL_FLAGS :=
2-
31
.PHONY: all
42
all:
53

4+
# ---- #
5+
# deps #
6+
# ---- #
7+
8+
.PHONY: install-all
9+
install-all:
10+
uv sync --all-groups
11+
612
.PHONY: install
713
install:
8-
uv pip install $(UV_INSTALL_FLAGS) -r requirements.txt
14+
uv sync --no-dev
915

1016
.PHONY: install-dev
1117
install-dev:
12-
uv pip install $(UV_INSTALL_FLAGS) -r requirements-dev.txt
18+
uv sync --dev
19+
20+
.PHONY: pip-upgrade
21+
pip-upgrade:
22+
uv sync --all-groups --upgrade
1323

14-
.PHONY: pip-compile
15-
pip-compile:
16-
uv pip compile --upgrade requirements.in -o requirements.txt
17-
uv pip compile --upgrade requirements-dev.in -o requirements-dev.txt
24+
# -- #
25+
# CI #
26+
# -- #
27+
28+
ci-base-cmd = uv run --dev
1829

1930
.PHONY: ci-check
2031
ci-check:
2132
@echo "========== check: mypy =========="
22-
mypy -p plugin
33+
$(ci-base-cmd) mypy -p plugin
2334
@echo "========== check: ruff (lint) =========="
24-
ruff check --diff .
35+
$(ci-base-cmd) ruff check --diff .
2536
@echo "========== check: ruff (format) =========="
26-
ruff format --diff .
37+
$(ci-base-cmd) ruff format --diff .
2738

2839
.PHONY: ci-fix
2940
ci-fix:
3041
@echo "========== fix: ruff (lint) =========="
31-
ruff check --fix .
42+
$(ci-base-cmd) ruff check --fix .
43+
@echo "========== fix: ruff (format) =========="
44+
$(ci-base-cmd) ruff format .
45+
46+
.PHONY: ci-fix-unsafe
47+
ci-fix-unsafe:
48+
@echo "========== fix: ruff (lint unsafe) =========="
49+
$(ci-base-cmd) ruff check --fix --unsafe-fixes .
3250
@echo "========== fix: ruff (format) =========="
33-
ruff format .
51+
$(ci-base-cmd) ruff format .

pyproject.toml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
[project]
2+
name = "OpenUri"
3+
version = "0.0.0"
4+
description = "The ultimate Sublime Text plugin for opening URIs (URLs) in your file."
5+
readme = "README.md"
6+
requires-python = ">=3.8"
7+
dependencies = [
8+
"more-itertools>=10,<11",
9+
]
10+
11+
[dependency-groups]
12+
dev = [
13+
"mypy>=1.14",
14+
"ruff>=0.13",
15+
]
16+
17+
[tool.uv]
18+
default-groups = ["dev"]
19+
120
[tool.mypy]
221
# ignore_missing_imports = False
322
check_untyped_defs = true

requirements-dev.in

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

requirements-dev.txt

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

requirements.in

Lines changed: 0 additions & 1 deletion
This file was deleted.

requirements.txt

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

uv.lock

Lines changed: 280 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)