|
2 | 2 | PYTHON := python3 |
3 | 3 | PYTHONPATH := `pwd` |
4 | 4 |
|
5 | | -#* Poetry |
6 | | -.PHONY: poetry-download |
7 | | -poetry-download: |
8 | | - curl -sSL https://install.python-poetry.org/ | $(PYTHON) - |
9 | | - |
10 | | -.PHONY: poetry-remove |
11 | | -poetry-remove: |
12 | | - curl -sSL https://install.python-poetry.org/ | $(PYTHON) - --uninstall |
| 5 | +#* uv |
| 6 | +.PHONY: uv-download |
| 7 | +uv-download: |
| 8 | + curl -LsSf https://astral.sh/uv/install.sh | sh |
13 | 9 |
|
14 | 10 | #* Installation |
15 | 11 | .PHONY: install |
16 | 12 | install: |
17 | | - poetry install -n --with dev,docs,examples |
| 13 | + uv sync --all-groups |
18 | 14 |
|
19 | 15 | .PHONY: pre-commit-install |
20 | 16 | pre-commit-install: |
21 | | - poetry run pre-commit install |
| 17 | + uv run pre-commit install |
22 | 18 |
|
23 | 19 | #* Formatters |
24 | 20 | .PHONY: codestyle |
25 | 21 | codestyle: |
26 | | - poetry run pyupgrade --exit-zero-even-if-changed --py38-plus **/*.py |
27 | | - poetry run isort --settings-path pyproject.toml ./ |
28 | | - poetry run black --config pyproject.toml ./ |
| 22 | + uv run pyupgrade --exit-zero-even-if-changed --py38-plus **/*.py |
| 23 | + uv run isort --settings-path pyproject.toml ./ |
| 24 | + uv run black --config pyproject.toml ./ |
29 | 25 |
|
30 | 26 | .PHONY: formatting |
31 | 27 | formatting: codestyle |
32 | 28 |
|
33 | 29 | #* Linting |
34 | 30 | .PHONY: test |
35 | 31 | test: |
36 | | - poetry run pytest -c pyproject.toml --cov=src |
| 32 | + uv run pytest -c pyproject.toml --cov=src |
37 | 33 |
|
38 | 34 | .PHONY: test_ci |
39 | 35 | test_ci: |
40 | | - poetry run pytest -c pyproject.toml --cov=src --cov-report=xml |
| 36 | + uv run pytest -c pyproject.toml --cov=src --cov-report=xml |
41 | 37 |
|
42 | 38 | .PHONY: check-codestyle |
43 | 39 | check-codestyle: |
44 | | - poetry run isort --diff --check-only --settings-path pyproject.toml ./ |
45 | | - poetry run black --diff --check --config pyproject.toml ./ |
| 40 | + uv run isort --diff --check-only --settings-path pyproject.toml ./ |
| 41 | + uv run black --diff --check --config pyproject.toml ./ |
46 | 42 |
|
47 | 43 | .PHONY: mypy |
48 | 44 | mypy: |
49 | | - poetry run mypy --config-file pyproject.toml src |
| 45 | + uv run mypy --config-file pyproject.toml src |
50 | 46 |
|
51 | 47 | .PHONY: lint |
52 | 48 | lint: test check-codestyle mypy check-safety |
53 | 49 |
|
54 | 50 | .PHONY: update-dev-deps |
55 | 51 | update-dev-deps: |
56 | | - poetry add -D "isort[colors]@latest" mypy@latest pre-commit@latest pydocstyle@latest pylint@latest pytest@latest pyupgrade@latest coverage@latest pytest-html@latest pytest-cov@latest black@latest |
| 52 | + uv add --group dev --upgrade "isort[colors]" mypy pre-commit pytest pyupgrade coverage pytest-html pytest-cov black |
57 | 53 |
|
58 | 54 | #* Cleaning |
59 | 55 | .PHONY: pycache-remove |
|
0 commit comments