-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
58 lines (46 loc) · 1.5 KB
/
Makefile
File metadata and controls
58 lines (46 loc) · 1.5 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
.PHONY: help install install-dev test lint format type-check clean build release docs docs-clean
help:
@echo "Available targets:"
@echo " install - Install the package"
@echo " install-dev - Install the package with development dependencies"
@echo " test - Run tests"
@echo " lint - Run linting (flake8, pylint)"
@echo " format - Format code (black, isort)"
@echo " type-check - Run type checking (mypy)"
@echo " docs - Build documentation"
@echo " docs-clean - Clean documentation build"
@echo " clean - Clean build artifacts"
@echo " build - Build the package"
@echo " release - Build and check the package for release"
install: build test
pip install -e .
install-dev:
pip install -e ".[dev,test]"
test:
python -m pytest tests/ -m "not integration"
lint:
python -m flake8 src tests
python -m pylint src tests
format:
python -m black src tests
python -m isort --profile black src tests
type-check:
python -m mypy src
docs: $(shell find src -name '*.py') doc/*.rst doc/*.py
sphinx-build -b html doc doc/_build/html
docs-clean:
rm -rf doc/_build/
rm -rf doc/_apidoc/
clean: docs-clean
rm -rf build/
rm -rf dist/
rm -rf *.egg-info/
rm -rf htmlcov/
rm -f coverage.xml
find . -type d -name __pycache__ -exec rm -rf {} +
find . -type f -name "*.pyc" -delete
build:
python -m build
release: clean build test
python -m twine check dist/*
@echo "Package is ready for release. Run 'python -m twine upload dist/*' to publish."