-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
53 lines (42 loc) · 1.33 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
.PHONY: install update test lint clean-pyc clean-build clean-test clean upload-job upload-libs
help:
@echo "install - install the packages by poetry"
@echo "update - update the packages by poetry"
@echo "test - run tests with pytest"
@echo "lint - check code quality and fix"
@echo "clean - remove all build, test, cache and Python artifacts"
@echo "clean-pyc - remove Python file artifacts"
@echo "clean-build - remove build artifacts"
@echo "clean-test - remove test and coverage artifacts"
install:
poetry install
update:
poetry update
test:
poetry run pytest tests
lint:
poetry run black .
poetry run isort .
-poetry run mypy .
-poetry run flake8
-poetry run pydocstyle
clean-pyc:
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
find . -name '__pycache__' -exec rm -fr {} +
clean-build:
find . -name '*.zip' -exec rm -f {} +
clean-test:
rm -rf .tox/
rm -rf htmlcov/
rm -f .coverage
clean: clean-build clean-pyc clean-test
upload-jobs:
dbfs cp -r --overwrite spark_jobs/ dbfs:/spark_jobs/
upload-libs: clean-build
$(eval TIMESTAMP=$(shell date -u +%Y-%m-%dT%H:%M:%SZ))
cd spark_libs && zip -r ../$(TIMESTAMP).zip * && cd ..
dbfs rm --recursive dbfs:/spark_libs
dbfs cp --overwrite $(TIMESTAMP).zip dbfs:/spark_libs/$(TIMESTAMP).zip
rm -f $(TIMESTAMP).zip