-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
75 lines (60 loc) · 1.88 KB
/
Makefile
File metadata and controls
75 lines (60 loc) · 1.88 KB
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
.PHONY: init install clean test unit-test integration-test lint format format-check help
# Default target executed when no arguments are given to make
default: help
# Initialize the development environment
init:
pip install --upgrade pip
pip install poetry
poetry install --all-extras
# Install only production dependencies
install:
poetry install --with test,dev
# Clean up build artifacts and caches
clean:
rm -rf dist/ build/ *.egg-info/ .pytest_cache/ .ruff_cache/
find . -type d -name __pycache__ -exec rm -rf {} +
# Run all tests
test: unit-test integration-test
# Run only unit tests
unit-test:
poetry run pytest -xvs tests/unit_tests
# Run integration tests (includes Docker-based tests)
integration-test:
poetry run pytest -xvs tests/integration_tests
# Code quality checks
lint:
poetry run ruff check .
# Format the code
format:
poetry run ruff format .
# Check formatting
format-check:
poetry run ruff format --check .
# Spell check
spell-check:
poetry run codespell .
# Check all code quality aspects
check: format-check lint spell-check
# Build package distributions
build: clean
poetry build
# Publish to PyPI
publish: build
poetry publish
# Show help
help:
@echo "Available targets:"
@echo " init - Initialize development environment"
@echo " install - Install production dependencies"
@echo " clean - Clean build artifacts"
@echo " test - Run all tests"
@echo " unit-test - Run unit tests"
@echo " integration-test - Run integration tests"
@echo " format - Format the code"
@echo " format-check - Check code formatting"
@echo " lint - Run linter"
@echo " spell-check - Check for spelling errors"
@echo " check - Run all code quality checks"
@echo " build - Build package distributions"
@echo " publish - Publish to PyPI"
@echo " help - Show this help message"