-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
49 lines (38 loc) · 1.43 KB
/
Makefile
File metadata and controls
49 lines (38 loc) · 1.43 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
.PHONY: help install test test-cov lint format clean build publish
help:
@echo "LocalPortManager - Available commands:"
@echo " make install - Install package in development mode"
@echo " make test - Run tests"
@echo " make test-cov - Run tests with coverage (80%+ required)"
@echo " make lint - Run linting (flake8, black, isort)"
@echo " make format - Format code with black and isort"
@echo " make type - Run type checking with mypy"
@echo " make clean - Clean build artifacts"
@echo " make build - Build package for distribution"
@echo " make publish - Publish to PyPI"
install:
pip install -e ".[dev]"
test:
pytest -v
test-cov:
pytest --cov=localportmanager --cov-report=html --cov-report=term --cov-fail-under=80
lint:
flake8 localportmanager.py tests/ --max-line-length=100 --ignore=E203,W503
black --check --diff localportmanager.py tests/
isort --check --diff localportmanager.py tests/
format:
black localportmanager.py tests/
isort localportmanager.py tests/
type:
mypy localportmanager.py --ignore-missing-imports
clean:
rm -rf build/ dist/ *.egg-info/ .pytest_cache/ .coverage htmlcov/ __pycache__/
find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
find . -type f -name "*.pyc" -delete 2>/dev/null || true
build: clean
python -m build
publish: build
twine check dist/*
twine upload dist/*
ci: lint type test-cov
@echo "All CI checks passed!"