Skip to content

Commit c591ba8

Browse files
committed
update code to use uv
1 parent d9a854a commit c591ba8

30 files changed

+131
-757
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,4 +165,6 @@ cython_debug/
165165

166166
# Visual studio temps
167167
.vs/
168-
.vscode/
168+
.vscode/
169+
uv.lock
170+
coverage.json

LICENSE

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

Makefile

Lines changed: 20 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,98 +1,59 @@
1+
PROJECT_NAME := unstructured_platform_plugins
2+
PROJECT_SRC_DIR := $(subst -,_,${PROJECT_NAME})
3+
SHELL_FILES := $(shell find . -name '*.sh' -type f | grep -v venv)
14
###########
25
# INSTALL #
36
###########
47

5-
.PHONY: pip-compile
6-
pip-compile:
7-
./scripts/pip-compile.sh
8+
.PHONY: install-dependencies
9+
install-dependencies:
10+
@uv sync --all-groups
811

9-
.PHONY: install
10-
install: install-cli install-lint install-test
11-
12-
.PHONY: install-cli
13-
install-cli:
14-
pip install -r requirements/cli.txt
15-
16-
.PHONY: install-lint
17-
install-lint:
18-
pip install -r requirements/lint.txt
19-
20-
.PHONY: install-test
21-
install-test:
22-
pip install -r requirements/test.txt
23-
24-
.PHONY: install-release
25-
install-release:
26-
pip install -r requirements/release.txt
12+
.PHONY: upgrade-dependencies
13+
upgrade-dependencies:
14+
@uv sync --all-groups --upgrade
2715

2816
###########
2917
# TIDY #
3018
###########
3119

3220
.PHONY: tidy
33-
tidy: tidy-black tidy-ruff tidy-autoflake tidy-shell
34-
35-
.PHONY: tidy_shell
36-
tidy-shell:
37-
shfmt -l -w .
21+
tidy: tidy-ruff
3822

3923
.PHONY: tidy-ruff
4024
tidy-ruff:
41-
ruff check --fix-only --show-fixes .
42-
43-
.PHONY: tidy-black
44-
tidy-black:
45-
black .
25+
uv run ruff format .
26+
uv run ruff check --fix-only --show-fixes .
4627

47-
.PHONY: tidy-autoflake
48-
tidy-autoflake:
49-
autoflake --in-place .
50-
51-
.PHONY: version-sync
52-
version-sync:
53-
scripts/version-sync.sh \
54-
-f "unstructured_platform_plugins/__version__.py" semver
28+
.PHONY: tidy-shell
29+
tidy-shell:
30+
shfmt -l -w ${SHELL_FILES}
5531

5632
###########
5733
# CHECK #
5834
###########
5935

6036
.PHONY: check
61-
check: check-python check-shell
62-
63-
.PHONY: check-python
64-
check-python: check-black check-flake8 check-ruff check-autoflake check-version
65-
66-
.PHONY: check-black
67-
check-black:
68-
black . --check
69-
70-
.PHONY: check-flake8
71-
check-flake8:
72-
flake8 .
37+
check: check-ruff check-shell
7338

7439
.PHONY: check-ruff
7540
check-ruff:
76-
ruff check .
77-
78-
.PHONY: check-autoflake
79-
check-autoflake:
80-
autoflake --check-diff .
41+
uv run ruff check .
8142

8243
.PHONY: check-shell
8344
check-shell:
84-
shfmt -d .
45+
shfmt -d ${SHELL_FILES}
8546

8647
.PHONY: check-version
8748
check-version:
8849
# Fail if syncing version would produce changes
8950
scripts/version-sync.sh -c \
90-
-f "unstructured_platform_plugins/__version__.py" semver
51+
-f "${PROJECT_SRC_DIR}/__version__.py" semver
9152

9253
###########
9354
# TEST #
9455
###########
9556

9657
.PHONY: test
9758
test:
98-
PYTHONPATH=. pytest
59+
PYTHONPATH=. pytest --cov-config=pyproject.toml --cov-report=json --cov-report=term --cov=${PROJECT_SRC_DIR} -sv

0 commit comments

Comments
 (0)