Skip to content

Commit ed7fd46

Browse files
author
Tom Softreck
committed
update
1 parent 9c83f42 commit ed7fd46

2 files changed

Lines changed: 63 additions & 16 deletions

File tree

Makefile

Lines changed: 62 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,19 +55,74 @@ install-deps:
5555
@which cargo > /dev/null && echo "✅ Rust found: $$(cargo --version)"
5656

5757
# Development
58-
test:
59-
pytest tests/ -v
60-
@echo "✅ Tests completed"
61-
58+
test: test-unit test-integration test-e2e
59+
60+
# Run unit tests
61+
test-unit:
62+
@pytest tests/unit/ -v --cov=src/dialogchain --cov-report=term-missing
63+
@echo "✅ Unit tests completed"
64+
65+
# Run integration tests
66+
test-integration:
67+
@pytest tests/integration/ -v --cov=src/dialogchain --cov-append
68+
@echo "✅ Integration tests completed"
69+
70+
# Run end-to-end tests
71+
test-e2e:
72+
@pytest tests/e2e/ -v --cov=src/dialogchain --cov-append
73+
@echo "✅ End-to-end tests completed"
74+
75+
# Run tests with coverage report
76+
coverage:
77+
@coverage erase
78+
@coverage run -m pytest
79+
@coverage report -m
80+
@coverage html
81+
@echo "📊 Coverage report available at htmlcov/index.html"
82+
83+
# Run type checking
84+
typecheck:
85+
@mypy src/dialogchain/
86+
@echo "✅ Type checking completed"
87+
88+
# Run all linters
6289
lint:
63-
python -m flake8 src/dialogchain/
64-
python -m black --check src/dialogchain/
90+
@echo "🔍 Running flake8..."
91+
@flake8 src/dialogchain/ tests/
92+
@echo "🎨 Checking code formatting with black..."
93+
@black --check src/dialogchain/ tests/
94+
@echo "📝 Checking import ordering..."
95+
@isort --check-only --profile black src/dialogchain/ tests/
6596
@echo "✅ Linting completed"
6697

98+
# Format code
6799
format:
68-
python -m black src/dialogchain/
100+
@echo "🎨 Formatting code with black..."
101+
@black src/dialogchain/ tests/
102+
@echo "📝 Sorting imports..."
103+
@isort --profile black src/dialogchain/ tests/
69104
@echo "✅ Code formatted"
70105

106+
# Check code style without making changes
107+
check-codestyle:
108+
@black --check --diff src/dialogchain/ tests/
109+
@isort --check-only --profile black src/dialogchain/ tests/
110+
111+
112+
# Run all checks (lint, typecheck, test)
113+
check-all: lint typecheck test
114+
@echo "✨ All checks passed!"
115+
116+
# Install pre-commit hooks
117+
pre-commit-install:
118+
@pre-commit install
119+
@pre-commit install --hook-type pre-push
120+
@echo "✅ Pre-commit hooks installed"
121+
122+
# Setup development environment
123+
setup-dev-env: install pre-commit-install
124+
@echo "🚀 Development environment ready!"
125+
71126
# Build
72127
clean:
73128
rm -rf build/

pytest.ini

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,7 @@ python_functions = test_*
66
asyncio_mode = auto
77

88
# Test execution options
9-
addopts =
10-
-v # Verbose output
11-
--strict-markers # Ensure markers are registered
12-
--disable-warnings # Disable warnings in output
13-
--durations=10 # Show 10 slowest tests
14-
--cov=src/dialogchain # Enable coverage
15-
--cov-report=term-missing # Show missing lines in coverage
16-
--cov-report=xml:coverage.xml # Generate coverage XML report
17-
-p no:warnings # Don't show warnings summary
9+
addopts = -v --strict-markers --disable-warnings --durations=10 --cov=src/dialogchain --cov-report=term-missing --cov-report=xml:coverage.xml -p no:warnings
1810

1911
# Markers for test categorization
2012
markers =

0 commit comments

Comments
 (0)