-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
60 lines (47 loc) · 1.4 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
define USAGE
Super awesome hand-crafted build system ⚙️
Commands:
setup Install dependencies, dev included
lock Generate requirements.txt
test Run tests
lint Run linting tests
run Run docker image with --rm flag but mounted dirs.
release Publish docker image based on some variables
docker Build the docker image
tag Make a git tab using poetry information
endef
export USAGE
.EXPORT_ALL_VARIABLES:
GIT_TAG := $(shell git describe --tags)
BUILD := $(shell git rev-parse --short HEAD)
PROJECTNAME := $(shell basename "$(PWD)")
PACKAGE_DIR = $(shell basename "$(PWD)")
DOCKERID = $(shell echo "nuxion")
help:
@echo "$$USAGE"
clean:
find . ! -path "./.eggs/*" -name "*.pyc" -exec rm {} \;
find . ! -path "./.eggs/*" -name "*.pyo" -exec rm {} \;
find . ! -path "./.eggs/*" -name ".coverage" -exec rm {} \;
rm -rf build/* > /dev/null 2>&1
rm -rf dist/* > /dev/null 2>&1
rm -rf .ipynb_checkpoints/* > /dev/null 2>&1
rm -rf docker/client/dist
rm -rf docker/all/dist
lint:
pylint --disable=R,C,W services --ignore-paths=services/files
check:
mypy -p services --exclude services.files
black:
black services tests
isort:
isort services tests --profile=black
format: isort black
.PHONY: test
test:
PYTHONPATH=$(PWD) pytest --cov-report xml --cov=labfunctions tests/
.PHONY: docs-server
docs-serve:
hatch run docs:watch
redis:
docker run --rm -p 6379:6379 redis:6.2