-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
/
Makefile
49 lines (39 loc) · 954 Bytes
/
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
# Makefile for Project Automation
.PHONY: install lint type-check test build all clean
# Variables
PACKAGE_NAME = scrapegraphai
TEST_DIR = tests
# Default target
all: lint type-check test
# Install project dependencies
install:
uv sync
uv run pre-commit install
# Linting and Formatting Checks
lint:
uv run ruff check $(PACKAGE_NAME) $(TEST_DIR)
uv run black --check $(PACKAGE_NAME) $(TEST_DIR)
uv run isort --check-only $(PACKAGE_NAME) $(TEST_DIR)
# Type Checking with MyPy
type-check:
uv run mypy $(PACKAGE_NAME) $(TEST_DIR)
# Run Tests with Coverage
test:
uv run pytest --cov=$(PACKAGE_NAME) --cov-report=xml $(TEST_DIR)/
# Run Pre-Commit Hooks
pre-commit:
uv run pre-commit run --all-files
# Clean Up Generated Files
clean:
rm -rf dist/
rm -rf build/
rm -rf *.egg-info
rm -rf htmlcov/
rm -rf .mypy_cache/
rm -rf .pytest_cache/
rm -rf .ruff_cache/
rm -rf .uv/
rm -rf .venv/
# Build the Package
build:
uv build --no-sources