-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
54 lines (41 loc) · 1.2 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
SHELL:=/bin/bash
TEST=pytest
LINT=pylint
TESTFLAGS= -v
.PHONY: help env env-dev env-remove doc clean-doc clean test lint docker-build docker-run
help:
@echo "env - create the conda environment 'dl-repo' based on environment.yml"
@echo "env-dev - runs 'make env' and installs additional development dependencies"
@echo "env-remove - remove 'dl-repo'"
@echo "doc - build sphinx docs, requires 'dl-repo'"
@echo "clean-doc - remove binaries created by sphinx"
@echo "clean - remove all compiled bytecode and doc binaries"
@echo "test - run unit tests"
@echo "lint - run linter for all modules"
@echo "docker-build - build docker image"
@echo "docker-run - run docker container"
setup:
$(SHELL) setup.sh
env:
conda env create -f environment.yml
env-dev:
conda env create -f environment.yml || true
conda env update -f dev.yml
env-remove:
conda remove --name dl-repo --all
doc:
mkdir -p docs/source/_static || true
$(MAKE) -C docs/ html
clean-doc:
$(MAKE) -C docs/ clean || true
clean:
$(MAKE) clean-doc
py3clean . && rm -rf .pytest_cache
test:
$(TEST) $(TESTFLAGS)
lint:
find . -iname "*.py" | xargs $(LINT)
docker-build:
docker build . -t dl-repo
docker-run:
docker run -it dl-repo