-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
23 lines (17 loc) · 661 Bytes
/
Makefile
File metadata and controls
23 lines (17 loc) · 661 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
.PHONY: install test lint fmt check clean
install:
pip install -e ".[dev]"
test:
python -m pytest tests/ -v
lint:
ruff check .
fmt:
ruff format .
check: lint test
clean:
python -c "import pathlib, shutil; \
paths = ['dist', 'build', '.pytest_cache', '.ruff_cache', 'htmlcov', 'out', 'receipts']; \
[shutil.rmtree(p, ignore_errors=True) for p in paths]; \
[path.unlink() for path in pathlib.Path('.').glob('.coverage*') if path.is_file()]; \
[shutil.rmtree(p, ignore_errors=True) for p in pathlib.Path('.').rglob('__pycache__') if p.is_dir()]; \
[shutil.rmtree(p, ignore_errors=True) for p in pathlib.Path('.').glob('*.egg-info') if p.is_dir()]"