forked from vdanen/vex-reader
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
71 lines (59 loc) · 1.77 KB
/
Makefile
File metadata and controls
71 lines (59 loc) · 1.77 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
67
68
69
70
71
.PHONY: help test test-unit test-cov install install-dev lint clean build
# Default target
help:
@echo "Available targets:"
@echo " help - Show this help"
@echo " install - Install the package"
@echo " install-dev - Install development dependencies"
@echo " test - Run tests with unittest"
@echo " test-unit - Run tests with unittest (verbose)"
@echo " test-cov - Run tests with coverage (requires pytest)"
@echo " lint - Run linting checks"
@echo " clean - Clean build artifacts"
@echo " build - Build the package"
@echo " upload - Upload the package to PyPI"
# Install the package
install:
pip install -e .
# Install development dependencies
install-dev:
pip install -e .[test]
pip install -r requirements.txt
# Run tests with unittest
test:
python -m unittest discover tests -v
# Run tests with unittest (verbose)
test-unit:
python -m unittest discover tests -v
# Run tests with coverage (requires pytest)
test-cov:
python -m pytest tests/ --cov=vex --cov-report=term-missing --cov-report=html
# Run linting checks
lint:
@echo "Running flake8..."
-flake8 vex/ --count --select=E9,F63,F7,F82 --show-source --statistics
@echo "Running black (check only)..."
-black --check --diff vex/
@echo "Running isort (check only)..."
-isort --check-only --diff vex/
# Clean build artifacts
clean:
rm -rf build/
rm -rf dist/
rm -rf *.egg-info/
rm -rf htmlcov/
rm -rf .coverage
rm -rf .pytest_cache/
find . -type d -name __pycache__ -exec rm -rf {} +
find . -type f -name "*.pyc" -delete
# Build the package
build: clean
python -m build .
# Upload the package
upload: build
python -m twine upload dist/*
# Run the test runner script
run-tests:
python run_tests.py --verbose
# Install and run tests
test-all: install-dev test