forked from gretelai/gretel-python-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
73 lines (50 loc) · 1.42 KB
/
Makefile
File metadata and controls
73 lines (50 loc) · 1.42 KB
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
73
STAGE?=dev
S3_BUCKET=gretel-opt-$(STAGE)
S3_PREFIX=pub
PYTHON?=python
PIP?=pip
FLAKE?=flake8
PYTEST?=pytest
AWS?=aws
NBUTILS?=nbutils
PKG_WHL=gretel_client
PKG_TAR=gretel-client
VERSION=$(shell $(PYTHON) -c "import setuptools_scm;print(setuptools_scm.get_version())")
.PHONY: setup
setup:
$(PIP) install -U -e ".[fpe,pandas]"
$(PIP) install -r dev-requirements.txt
.PHONY: lint
lint:
$(FLAKE) --count --select=E9,F63,F7,F82 --show-source --statistics src/
$(FLAKE) --count --exit-zero --max-complexity=30 --max-line-length=120 --statistics src/
.PHONY: test
test:
$(PYTEST) -s -vv --cov src --cov-report term-missing tests/src/gretel_client/unit
.PHONY: test-int
test-int:
$(PYTEST) -s -vv --cov src --cov-report term-missing tests/src/gretel_client/integration
.PHONY: test-nb
test-nb:
nbutils run --notebooks="notebooks/{priv,pub}/*.ipynb"
.PHONY: test-all
test-all:
$(PYTEST) -s -vv --cov src --cov-report term-missing tests/src/gretel_client/
.PHONY: blueprints
blueprints:
ls blueprints/*.py|xargs -n 1 -P 4 python
.PHONY: clean
clean:
@rm -rf dist/ build/
.PHONY: build
build: clean
$(PIP) install wheel setuptools_scm
$(PYTHON) setup.py sdist bdist_wheel
.PHONY: publish-notebooks
publish-notebooks:
$(NBUTILS) transform \
--notebooks="notebooks/pub/*.ipynb" \
--template-source="notebooks/etc/Bootstrap_Template.ipynb" \
--output-dir="../gretel-transformers-notebooks/examples" \
--add-to-index \
--all