-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
53 lines (40 loc) · 1.08 KB
/
Makefile
File metadata and controls
53 lines (40 loc) · 1.08 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
.PHONY: init format check requirements test clean build publish dev-install lint type-check
init:
export PATH="$$HOME/.local/bin:$$PATH"
wget -qO- https://astral.sh/uv/install.sh | sh
uv venv
. .venv/bin/activate
uv sync
uvx pyrefly init
dev-install:
uv pip install -e ".[dev,redis]"
format:
uvx ruff format .
check:
uvx ruff check base_cacheable_class --fix; \
uvx ty check base_cacheable_class; \
uvx pyrefly check base_cacheable_class
lint:
uvx ruff check base_cacheable_class --fix
requirements:
uv export -o requirements.txt --without-hashes --without dev
uv export -o requirements-dev.txt --without-hashes
test:
uv run pytest tests/ -v
test-cov:
uv run pytest tests/ -v --cov=src/base_cacheable_class --cov-report=term-missing
test-watch:
uv run pytest-watch tests/ -v
clean:
rm -rf build/
rm -rf dist/
rm -rf *.egg-info
rm -rf src/*.egg-info
find . -type d -name __pycache__ -exec rm -rf {} +
find . -type f -name "*.pyc" -delete
build: clean
uv build
publish-test: build
uvx twine upload --repository testpypi dist/*
publish: build
uvx twine upload dist/*