|
1 | | -# Makefile for Project Automation |
2 | | - |
3 | | -.PHONY: install lint type-check test docs serve-docs build all clean |
4 | | - |
5 | | -# Variables |
6 | | -PACKAGE_NAME = scrapegraph_py |
7 | | -TEST_DIR = tests |
8 | | - |
9 | | -# Default target |
10 | | -all: lint type-check test docs |
11 | | - |
12 | | -# Install project dependencies |
13 | | -install: |
14 | | - uv sync |
15 | | - |
16 | | -# Linting and Formatting Checks |
17 | | -lint: |
18 | | - uv run ruff check $(PACKAGE_NAME) $(TEST_DIR) |
19 | | - uv run black --check $(PACKAGE_NAME) $(TEST_DIR) |
20 | | - uv run isort --check-only $(PACKAGE_NAME) $(TEST_DIR) |
21 | | - |
22 | | -# Type Checking with MyPy |
23 | | -type-check: |
24 | | - uv run mypy $(PACKAGE_NAME) $(TEST_DIR) |
25 | | - |
26 | | -# Run Tests with Coverage |
27 | | -test: |
28 | | - uv run pytest --cov=$(PACKAGE_NAME) --cov-report=xml $(TEST_DIR)/ |
29 | | - |
30 | | -# Build Documentation using MkDocs |
31 | | -docs: |
32 | | - uv run mkdocs build |
33 | | - |
34 | | -# Serve Documentation Locally |
35 | | -serve-docs: |
36 | | - uv run mkdocs serve |
37 | | - |
38 | | -# Run Pre-Commit Hooks |
39 | | -pre-commit: |
40 | | - uv run pre-commit run --all-files |
41 | | - |
42 | | -# Clean Up Generated Files |
43 | | -clean: |
44 | | - rm -rf dist/ |
45 | | - rm -rf build/ |
46 | | - rm -rf *.egg-info |
47 | | - rm -rf htmlcov/ |
48 | | - rm -rf .mypy_cache/ |
49 | | - rm -rf .pytest_cache/ |
50 | | - rm -rf .ruff_cache/ |
51 | | - rm -rf site/ |
52 | | - |
53 | | -# Build the Package |
54 | | -build: |
| 1 | +# Makefile for Project Automation |
| 2 | + |
| 3 | +.PHONY: install lint type-check test docs serve-docs build all clean |
| 4 | + |
| 5 | +# Variables |
| 6 | +PACKAGE_NAME = scrapegraph_py |
| 7 | +TEST_DIR = tests |
| 8 | + |
| 9 | +# Default target |
| 10 | +all: lint type-check test docs |
| 11 | + |
| 12 | +# Install project dependencies |
| 13 | +install: |
| 14 | + uv sync |
| 15 | + |
| 16 | +# Linting and Formatting Checks |
| 17 | +lint: |
| 18 | + uv run ruff check $(PACKAGE_NAME) $(TEST_DIR) |
| 19 | + uv run black --check $(PACKAGE_NAME) $(TEST_DIR) |
| 20 | + uv run isort --check-only $(PACKAGE_NAME) $(TEST_DIR) |
| 21 | + |
| 22 | +# Type Checking with MyPy |
| 23 | +type-check: |
| 24 | + uv run mypy $(PACKAGE_NAME) $(TEST_DIR) |
| 25 | + |
| 26 | +# Run Tests with Coverage |
| 27 | +test: |
| 28 | + uv run pytest --cov=$(PACKAGE_NAME) --cov-report=xml $(TEST_DIR)/ |
| 29 | + |
| 30 | +# Build Documentation using MkDocs |
| 31 | +docs: |
| 32 | + uv run mkdocs build |
| 33 | + |
| 34 | +# Serve Documentation Locally |
| 35 | +serve-docs: |
| 36 | + uv run mkdocs serve |
| 37 | + |
| 38 | +# Run Pre-Commit Hooks |
| 39 | +pre-commit: |
| 40 | + uv run pre-commit run --all-files |
| 41 | + |
| 42 | +# Clean Up Generated Files |
| 43 | +clean: |
| 44 | + rm -rf dist/ |
| 45 | + rm -rf build/ |
| 46 | + rm -rf *.egg-info |
| 47 | + rm -rf htmlcov/ |
| 48 | + rm -rf .mypy_cache/ |
| 49 | + rm -rf .pytest_cache/ |
| 50 | + rm -rf .ruff_cache/ |
| 51 | + rm -rf site/ |
| 52 | + |
| 53 | +# Build the Package |
| 54 | +build: |
55 | 55 | uv build |
0 commit comments