forked from yu-iskw/dbt-artifacts-parser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
71 lines (57 loc) · 1.26 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
# Set up an environment
.PHONY: setup
setup: setup-python setup-pre-commit
# Set up the python environment.
.PHONY: setup-python
setup-python:
bash ./dev/setup.sh --deps "develop"
# Set up the pre-commit hooks.
.PHONY: setup-pre-commit
setup-pre-commit:
pre-commit install
# Check all the coding style.
.PHONY: lint
lint: run-pre-commit lint-shell lint-python
# Run the pre-commit hooks.
.PHONY: run-pre-commit
run-pre-commit:
pre-commit run --all-files
# Update the pre-commit hooks.
.PHONY: update-pre-commit
update-pre-commit:
pre-commit autoupdate
# Check the coding style for the shell scripts.
.PHONY: lint-shell
lint-shell:
shellcheck ./dev/*.sh
# Check the coding style for the python files.
.PHONY: lint-python
lint-python:
bash ./dev/lint_python.sh
# Format source codes
.PHONY: format
format: format-python
# Format python codes
.PHONY: format-python
format-python:
bash ./dev/format_python.sh
# Run the unit tests.
.PHONY: test
test:
bash ./dev/test_python.sh
# Build the package
.PHONY: build
build: clean lint test
flit build
# Clean the environment
.PHONY: clean
clean:
bash ./dev/clean.sh
# Publish to pypi
.PHONY: publish
publish:
bash ./dev/publish.sh "pypi"
# Publish to testpypi
.PHONY: test-publish
test-publish:
bash ./dev/publish.sh "testpypi"