-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathMakefile
116 lines (88 loc) · 3 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
PACKAGE_NAME := unstructured_ingest
ARCH := $(shell uname -m)
SHELL_FILES := $(shell find . -name '*.sh' -type f | grep -v venv)
###########
# INSTALL #
###########
.PHONY: install-dependencies
install-dependencies:
@uv sync --all-groups --all-extras
.PHONY: upgrade-dependencies
upgrade-dependencies:
@uv sync --all-groups --all-extras --upgrade
.PHONY: install-docker-compose
install-docker-compose:
ARCH=${ARCH} ./scripts/install-docker-compose.sh
###########
# TIDY #
###########
.PHONY: tidy
tidy: tidy-ruff
.PHONY: tidy-ruff
tidy-ruff:
uv run --frozen ruff format .
uv run --frozen ruff check --fix-only --show-fixes .
.PHONY: tidy-shell
tidy-shell:
shfmt -i 2 -l -w ${SHELL_FILES}
###########
# CHECK #
###########
.PHONY: check
check: check-ruff
.PHONY: check-ruff
check-ruff:
uv run ruff check .
.PHONY: check-shell
check-shell:
shfmt shfmt -i 2 -d ${SHELL_FILES}
.PHONY: check-version
check-version:
# Fail if syncing version would produce changes
scripts/version-sync.sh -c \
-f "unstructured_ingest/__version__.py" semver
###########
# TEST #
###########
.PHONY: unit-test
unit-test:
uv run --frozen pytest -sv --cov unstructured_ingest/ test/unit --ignore test/unit/unstructured
.PHONY: unit-test-unstructured
unit-test-unstructured:
uv run --frozen pytest -sv --cov unstructured_ingest/ test/unit/unstructured
.PHONY: integration-test
integration-test:
uv run --frozen pytest -sv test/integration
.PHONY: integration-test-partitioners
integration-test-partitioners:
uv run --frozen pytest -sv test/integration/partitioners --json-report
.PHONY: integration-test-chunkers
integration-test-chunkers:
uv run --frozen pytest -sv test/integration/chunkers --json-report
.PHONY: integration-test-embedders
integration-test-embedders:
uv run --frozen pytest -sv test/integration/embedders --json-report
.PHONY: integration-test-connectors-blob-storage
integration-test-connectors-blob-storage:
uv run --frozen pytest --tags blob_storage -sv test/integration/connectors --json-report
.PHONY: integration-test-connectors-sql
integration-test-connectors-sql:
uv run --frozen pytest --tags sql -sv test/integration/connectors --json-report
.PHONY: integration-test-connectors-nosql
integration-test-connectors-nosql:
uv run --frozen pytest --tags nosql -sv test/integration/connectors --json-report
.PHONY: integration-test-connectors-vector-db
integration-test-connectors-vector-db:
uv run --frozen pytest --tags vector_db -sv test/integration/connectors --json-report
.PHONY: integration-test-connectors-graph-db
integration-test-connectors-graph-db:
uv run --frozen pytest --tags graph_db -sv test/integration/connectors --json-report
.PHONY: integration-test-connectors-uncategorized
integration-test-connectors-uncategorized:
uv run --frozen pytest --tags uncategorized -sv test/integration/connectors --json-report
.PHONY: parse-skipped-tests
parse-skipped-tests:
uv run python ./scripts/parse_pytest_report.py
.PHONY: check-untagged-tests
check-untagged-tests:
./scripts/check_untagged_tests.sh