1- ifeq ($(origin MONKEYTYPE ) , undefined)
2- PYTHON = python3
3- else
4- PYTHON = monkeytype run
5- endif
6-
7- ISORT_MODULES = monkeytype_config.py setup.py bin/stratis src tests
8-
9- MONKEYTYPE_MODULES = stratis_cli._actions._bind \
10- stratis_cli._actions._constants \
11- stratis_cli._actions._data \
12- stratis_cli._actions._debug \
13- stratis_cli._actions._environment \
14- stratis_cli._actions._list_filesystem \
15- stratis_cli._actions._logical \
16- stratis_cli._actions._physical \
17- stratis_cli._actions._pool \
18- stratis_cli._actions._stratisd_version \
19- stratis_cli._actions._stratis \
20- stratis_cli._actions._top \
21- stratis_cli._actions._utils \
22- stratis_cli._exit \
23- stratis_cli._main \
24- stratis_cli._parser._debug \
25- stratis_cli._parser._encryption \
26- stratis_cli._parser._key \
27- stratis_cli._parser._pool \
28- stratis_cli._version
1+ ISORT_MODULES = setup.py bin/stratis src tests
292
303UNITTEST_OPTS = --verbose
314#
@@ -38,12 +11,10 @@ PYLINT_DISABLE = --disable=fixme
3811
3912.PHONY : lint
4013lint :
41- pylint monkeytype_config.py ${PYLINT_DISABLE}
4214 pylint setup.py ${PYLINT_DISABLE}
4315 pylint bin/stratis ${PYLINT_DISABLE}
4416 pylint src/stratis_cli --disable=duplicate-code ${PYLINT_DISABLE} --ignore=_introspect.py
4517 pylint tests --disable=duplicate-code ${PYLINT_DISABLE}
46- bandit monkeytype_config.py ${BANDIT_SKIP}
4718 bandit setup.py ${BANDIT_SKIP}
4819 bandit bin/stratis ${BANDIT_SKIP}
4920 # Ignore B101 errors. We do not distribute optimized code, i.e., .pyo
@@ -55,13 +26,11 @@ lint:
5526
5627.PHONY : fmt
5728fmt :
58- (cd src; yes | abs2rel)
5929 isort ${ISORT_MODULES}
6030 black ./bin/stratis .
6131
6232.PHONY : fmt-ci
6333fmt-ci :
64- (cd src; yes | abs2rel)
6534 isort --diff --check-only ${ISORT_MODULES}
6635 black ./bin/stratis . --check
6736
@@ -88,10 +57,10 @@ api-docs:
8857 sphinx-build-3 -b html api api/_build/html
8958
9059dbus-tests :
91- ${PYTHON} -m unittest discover ${UNITTEST_OPTS} --top-level-directory ./tests --start-directory ./tests/integration
60+ python3 -m unittest discover ${UNITTEST_OPTS} --top-level-directory ./tests --start-directory ./tests/integration
9261
9362unit-tests :
94- ${PYTHON} -m unittest discover ${UNITTEST_OPTS} --start-directory ./tests/unit
63+ python3 -m unittest discover ${UNITTEST_OPTS} --start-directory ./tests/unit
9564
9665.PHONY : coverage
9766coverage :
@@ -118,12 +87,3 @@ yamllint:
11887.PHONY : package
11988package :
12089 (umask 0022; python -m build; python -m twine check --strict ./dist/* )
121-
122- .PHONY : apply
123- apply :
124- @echo " Modules traced:"
125- @monkeytype list-modules
126- @echo " Annotating:"
127- @for module in ${MONKEYTYPE_MODULES} ; do \
128- monkeytype --verbose apply --sample-count --ignore-existing-annotations $$ {module} > /dev/null; \
129- done
0 commit comments