forked from lightly-ai/lightly
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
72 lines (56 loc) · 1.29 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
60
61
62
63
64
65
66
67
68
69
70
71
72
# Copyright (c) 2020. Lightly AG and its affiliates.
# All Rights Reserved
.PHONY: clean clean-build clean-pyc clean-out docs help
.DEFAULT_GOAL := help
# TODO
help:
## make clean
clean: clean-tox clean-build clean-pyc clean-out
## remove build artifacts
clean-build:
rm -fr build/
rm -fr dist/
rm -fr .eggs/
find . -name '*.egg-info' -exec rm -fr {} +
find . -name '*.egg' -exec rm -f {} +
## remove python file artifacts
clean-pyc:
find . -name '__pycache__' -exec rm -fr {} +
## remove hydra outputs
clean-out:
rm -fr outputs/
rm -fr lightly_outputs/
rm -fr lightning_logs/
rm -fr lightly_epoch_*.ckpt
rm -fr last.ckpt
## remove tox cache
clean-tox:
rm -fr .tox
# check style with flake8
lint: lint-lightly lint-tests
## check lightly style with flake8
lint-lightly:
flake8 --ignore=F401 lightly
## check tests style with flake8
lint-tests:
flake8 --ignore=F401 tests
## run tests
test:
pytest tests --runslow
## build source and wheel package
dist: clean
python setup.py sdist bdist_wheel
ls -l dist
## install the package to active site
install: clean
pip install .
# uninstall package from active site
uninstall: clean
pip uninstall lightly
## run tests in tox envs
tox:
tox
## helper for renaming
find:
@read -p "Enter Term: " term; \
grep -rnw ./ -e "$$term"