-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathMakefile
59 lines (47 loc) · 1.21 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.PHONY: build package clean install lint run test bump freeze
build: clean acks
python -m build
package: clean acks model
python ./scripts/ns_packaging.py
model: requirements.txt
python -m scripts.ns_download_models
clean:
rm -rf __pycache__
rm -rf tests/__pycache__
rm -rf *.egg-info
rm -rf htmlcov
rm -rf coverage.xml
rm -rf build/
rm -rf dist/
rm -rf src/neosca.egg-info
# delete macos metadata
find src/neosca/ns_data/ -name "._*" -type f -delete
find src/neosca/ns_data/ -name ".DS_Store" -type f -delete
install:
# avoid rm
echo > src/neosca/ns_data/settings.ini
pip install .
lint:
ruff check src/ tests/ --fix
ruff format src/ tests/
mypy --check-untyped-defs src/
test:
python -m unittest
run:
cd ./src && python -m neosca gui
acks: src/neosca/ns_data/acks.json scripts/ns_generate_acks.py
python ./scripts/ns_generate_acks.py
component="patch"
bump:
# make bump
# make bump component=patch
# make bump component=minor
# make bump component=major
bash ./scripts/ns_bump_version.sh $(component)
freeze:
bash ./scripts/ns_freeze.sh
sync:
# unlisted packages will be removed
uv pip sync ./requirements.txt
# install missing intermediate dependencies
uv pip install -r ./requirements.txt