-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathMakefile
More file actions
73 lines (58 loc) · 1.77 KB
/
Makefile
File metadata and controls
73 lines (58 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
72
73
all: .venv
install:
uv pip install -e .[test,dev] --verbose
install-native:
CMAKE_ARGS="-DQMLLIB_USE_NATIVE=ON" uv pip install -e .[test,dev] --verbose
install-dev:
uv pip install -e .[test,dev] --verbose
uv run pre-commit install
test:
uv run pytest -m "not integration" tests/ -v -s
test-all:
uv run pytest tests/ -v -s
.venv:
uv venv --python 3.14
# These are sometimes missed in GitHub CI builds
uv pip install scikit-build-core pybind11
check: format types
format:
uv run ruff format src/ tests/
uv run ruff check --fix --verbose src/ tests/
types:
uv run ty check src/ --exclude tests/
monkeytype:
uv run monkeytype run -m pytest ./tests -m "not integration"
uv run monkeytype list-modules | grep qmllib | xargs -I{} uv run monkeytype apply {}
stubs:
mkdir -p stubs_temp
uv run stubgen -p qmllib._fdistance -o stubs_temp
uv run stubgen -p qmllib._fgradient_kernels -o stubs_temp
uv run stubgen -p qmllib._fkernels -o stubs_temp
uv run stubgen -p qmllib._facsf -o stubs_temp
uv run stubgen -p qmllib._representations -o stubs_temp
uv run stubgen -p qmllib._fslatm -o stubs_temp
uv run stubgen -p qmllib._solvers -o stubs_temp
uv run stubgen -p qmllib._utils -o stubs_temp
uv run stubgen -p qmllib.representations.fchl.ffchl_module -o stubs_temp
mv stubs_temp/qmllib/*.pyi src/qmllib/
mv stubs_temp/qmllib/representations/fchl/ffchl_module/*.pyi src/qmllib/representations/fchl/
rm -rf stubs_temp
uv run ruff format src/qmllib/
build:
uv build --sdist
test-dist: build
uv run twine check dist/*
clean:
find ./src/ -type f \( \
-name "*.so" -o \
-name "*.pyc" -o \
-name "*.pyo" -o \
-name "*.mod" \
\) -delete
rm -rf ./src/*.egg-info/
rm -rf *.whl
rm -rf ./build/ ./__pycache__/
rm -rf ./dist/
clean-env:
rm -rf ./.venv/
rm -rf ./.git/hooks/pre-commit