-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
49 lines (35 loc) · 1.04 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
.PHONY: tests requirements dist
env:
export PYTHONPATH="$PYTHONPATH:$(PWD)"
format:
black -l 79 . --preview
type-checking:
mypy --ignore-missing-imports gpu_utilities
hooks:
git config core.hooksPath .hooks/
chmod -R +x .hooks/
requirements:
pipreqs --encoding utf-8 ./ --savepath requirements/pipreqs.txt --force
pip freeze > requirements/raw-pip-freeze.txt
tests:
pytest tests/ -o log_cli=true --log-cli-level=DEBUG --pdb
build:
docker -H $(HOST) build -t $(IMAGE_NAME) .
run-tests: build
docker -H $(HOST) run --entrypoint pytest --rm -it --gpus all $(IMAGE_NAME)
run-shell: build
docker -H $(HOST) run --entrypoint /bin/bash --rm -it --gpus all $(IMAGE_NAME)
clean-dist:
rm -r dist/
dist: clean-dist
python3 -m pip install --upgrade build
python3 -m build
publish-test: dist
python3 -m pip install --upgrade twine
python3 -m twine upload --repository testpypi dist/* --verbose
publish: dist
python3 -m pip install --upgrade twine
python3 -m twine upload dist/* --verbose
clean:
pip install --upgrade cleanpy
cleanpy --all .