-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
61 lines (49 loc) · 1.65 KB
/
Makefile
File metadata and controls
61 lines (49 loc) · 1.65 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
.PHONY: help install test lint format type-check clean build publish
help:
@echo "Available commands:"
@echo " make install - Install package in development mode"
@echo " make test - Run tests with coverage"
@echo " make lint - Run linting checks"
@echo " make format - Format code with black"
@echo " make type-check - Run type checking with mypy"
@echo " make clean - Clean build artifacts"
@echo " make build - Build distribution packages"
@echo " make check-build - Build and validate distribution"
@echo " make publish - Publish to PyPI (interactive)"
@echo " make publish-test - Publish to TestPyPI"
install:
pip install -e ".[dev]"
test:
pytest --cov=authkit_token --cov-report=term-missing --cov-report=html
lint:
ruff check src tests examples
format:
black src tests examples
ruff check --fix src tests examples
type-check:
mypy src/authkit_token
clean:
rm -rf build/
rm -rf dist/
rm -rf *.egg-info
rm -rf .pytest_cache/
rm -rf .mypy_cache/
rm -rf .ruff_cache/
rm -rf htmlcov/
rm -rf .coverage
find . -type d -name __pycache__ -exec rm -rf {} +
find . -type f -name "*.pyc" -delete
build: clean
python -m pip install --upgrade build
python -m build
check-build: build
python -m pip install --upgrade twine
python -m twine check dist/*
publish: check-build
@echo "Publishing to PyPI..."
@echo "Make sure you've updated the version in pyproject.toml!"
@read -p "Continue? [y/N] " confirm && [ "$$confirm" = "y" ] || exit 1
python -m twine upload dist/*
publish-test: check-build
@echo "Publishing to TestPyPI..."
python -m twine upload --repository testpypi dist/*