-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
40 lines (30 loc) · 1.12 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
venv:
# Install uv on macOS and Linux:
# $ curl -LsSf https://astral.sh/uv/install.sh | sh
uv venv
uv pip install -r requirements-dev.txt
# venv:
# python3 -m venv .venv
# source .venv/bin/activate ; pip install --upgrade pip ; python3 -m pip install -r requirements-dev.txt
# source .venv/bin/activate ; pip freeze > requirements_freeze.txt
clean:
rm -rf .venv
run:
# source .venv/bin/activate ; PYTHONPATH='./src' python -m app reqarg1
uv run src/app.py reqarg1
jupyter:
source .venv/bin/activate; PYTHONPATH='./src' jupyter lab
black-check:
source .venv/bin/activate ; black src --check --verbose --line-length 120
black:
source .venv/bin/activate ; black src --line-length 120
ruff-check:
source .venv/bin/activate ; ruff check .
ruff:
source .venv/bin/activate ; ruff check . --fix
test:
source .venv/bin/activate ; PYTHONPATH='./src' pytest -vv --capture=no tests
.DEFAULT_GOAL := help
.PHONY: help
help:
@LC_ALL=C $(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$'