-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
66 lines (53 loc) · 1.52 KB
/
Copy pathMakefile
File metadata and controls
66 lines (53 loc) · 1.52 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
61
62
63
64
65
66
.PHONY: help install install-dev lint format check test test-cov clean pre-commit run
# Default target
help:
@echo "Available commands:"
@echo " install Install production dependencies"
@echo " install-dev Install all dependencies including dev tools"
@echo " lint Run linting checks"
@echo " format Format code with ruff"
@echo " check Run all checks (lint + format check)"
@echo " quality Run lint, format, and tests"
@echo " test Run pytest tests"
@echo " test-cov Run tests with coverage report"
@echo " pre-commit Run all pre-commit hooks"
@echo " run Run the main script"
@echo " clean Clean up temporary files"
# Installation targets
install:
pip install requests pyyaml
install-dev:
pip install -r requirements.txt
pre-commit install
# Code quality targets
lint:
ruff check .
format:
ruff format .
check:
pre-commit run --all-files
ruff check .
ruff format --check .
check-test: \
check \
test
# Full quality check including tests
quality: lint format test
# Testing targets
test:
@echo "Running pytest tests..."
python -m pytest tests/ -v
test-cov:
@echo "Running tests with coverage..."
python -m pytest tests/ --cov=scripts --cov-report=term-missing --cov-report=html
# Pre-commit targets
pre-commit:
pre-commit run --all-files
# Run targets
run:
python scripts/fetch_downloads.py
# Cleanup targets
clean:
find . -type f -name "*.pyc" -delete
find . -type d -name "__pycache__" -delete
find . -type d -name ".pytest_cache" -delete