-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
45 lines (35 loc) · 1.15 KB
/
Makefile
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
SHELL=/bin/bash
.venv: ## Set up virtual environment
uv sync --all-extras --dev
uv sync --all-extras --dev
install: .venv
unset CONDA_PREFIX && \
source .venv/bin/activate && maturin develop --uv
source .venv/bin/activate && maturin develop --uv
install-release: .venv
unset CONDA_PREFIX && \
source .venv/bin/activate && maturin develop --uv --release
source .venv/bin/activate && maturin develop --uv --release
pre-commit: .venv
uv run pre-commit install
uv run pre-commit run --all-files
uv run mypy polars_iptools tests
uv run pre-commit install
uv run pre-commit run --all-files
uv run mypy polars_iptools tests
clean:
cargo clean
find polars_iptools -name "*.so" -type f -delete
fetch-test-mmdb:
@curl -L -o tests/maxmind/GeoLite2-City.mmdb https://raw.githubusercontent.com/maxmind/MaxMind-DB/main/test-data/GeoLite2-City-Test.mmdb
@curl -L -o tests/maxmind/GeoLite2-ASN.mmdb https://raw.githubusercontent.com/maxmind/MaxMind-DB/main/test-data/GeoLite2-ASN-Test.mmdb
test: .venv
uv run pytest tests
test-matrix: .venv
hatch run test:tests
run: install
uv run run.py
uv run run.py
run-release: install-release
uv run run.py
uv run run.py