forked from dagster-io/dagster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
93 lines (76 loc) · 3.51 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# Makefile oddities:
# - Commands must start with literal tab characters (\t), not spaces.
# - Multi-command rules (like `black` below) by default terminate as soon as a command has a non-0
# exit status. Prefix the command with "-" to instruct make to continue to the next command
# regardless of the preceding command's exit status.
# NOTE: See pyproject.toml [tool.black] for majority of black config. Only include/exclude options
# and format targets should be specified here. Note there are separate pyproject.toml for the root
# and examples/docs_snippets.
#
# NOTE: Use `extend-exclude` instead of `exclude`. If `exclude` is provided, it stops black from
# reading gitignore. `extend-exclude` is layered on top of gitignore. See:
# https://black.readthedocs.io/en/stable/usage_and_configuration/file_collection_and_discovery.html#gitignore
black:
black --fast \
--extend-exclude="examples/docs_snippets|snapshots" \
examples integration_tests helm python_modules .buildkite
black --fast \
examples/docs_snippets
check_black:
black --check --fast \
--extend-exclude="examples/docs_snippets|snapshots" \
examples integration_tests helm python_modules .buildkite
black --check --fast \
examples/docs_snippets
# NOTE: We use `git ls-files` instead of isort's built-in recursive discovery
# because it is much faster. Note that we also need to skip files with `git
# ls-files` (the `:!:` directives are exclued patterns). Even isort
# `--skip`/`--filter-files` is very slow.
isort:
isort \
`git ls-files '.buildkite/*.py' 'examples/*.py' 'integration_tests/*.py' 'helm/*.py' 'python_modules/*.py' \
':!:examples/docs_snippets' \
':!:*/snapshots/*.py'`
isort \
`git ls-files 'examples/docs_snippets/*.py'`
check_isort:
isort --check \
`git ls-files '.buildkite/*.py' 'examples/*.py' 'integration_tests/*.py' 'helm/*.py' 'python_modules/*.py' \
':!:examples/docs_snippets' \
':!:*/snapshots/*.py'`
isort --check \
`git ls-files 'examples/docs_snippets/*.py'`
pylint:
pylint \
`git ls-files '.buildkite/*.py' 'examples/*.py' 'integration_tests/*.py' \
'helm/*.py' 'python_modules/*.py' 'scripts/*.py' \
':!:examples/with_airflow' \
':!:python_modules/libraries/dagster-airflow' \
':!:vendor' \
':!:*/snapshots/*.py'`
yamllint:
yamllint -c .yamllint.yaml --strict \
`git ls-files 'helm/*.yml' 'helm/*.yaml' ':!:helm/**/templates/*.yml' ':!:helm/**/templates/*.yaml'`
install_dev_python_modules:
python scripts/install_dev_python_modules.py -qqq
install_dev_python_modules_verbose:
python scripts/install_dev_python_modules.py
graphql:
cd js_modules/dagit/; make generate-graphql; make generate-perms
sanity_check:
#NOTE: fails on nonPOSIX-compliant shells (e.g. CMD, powershell)
@echo Checking for prod installs - if any are listed below reinstall with 'pip -e'
@! (pip list --exclude-editable | grep -e dagster -e dagit)
rebuild_dagit: sanity_check
cd js_modules/dagit/; yarn install && yarn build
rebuild_dagit_with_profiling: sanity_check
cd js_modules/dagit/; yarn install && yarn build-with-profiling
dev_install: install_dev_python_modules_verbose rebuild_dagit
dev_install_quiet: install_dev_python_modules rebuild_dagit
graphql_tests:
pytest python_modules/dagster-graphql/dagster_graphql_tests/graphql/ -s -vv
check_manifest:
check-manifest python_modules/dagster
check-manifest python_modules/dagit
check-manifest python_modules/dagster-graphql
ls python_modules/libraries | xargs -n 1 -Ipkg check-manifest python_modules/libraries/pkg