forked from openvinotoolkit/training_extensions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLocalMakefile
44 lines (32 loc) · 1.17 KB
/
LocalMakefile
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
include ../../Makefile.variable
# Copyright (C) 2021-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
# Redefine MyPy Config location because ote_sdk has some custom configurations
MYPY_CONFIG = .mypy.ini
PYLINT_CONFIG= .pylintrc
OTE_SDK = ./ote_sdk
.PHONY: pipeline
pipeline: mypy pylint test
style: mypy pylint flake bandit
flake:
@echo $(ECHO_FLAKE_START)
@cd .. && flake8 $(OTE_SDK) --exclude $(OTE_SDK)/tests,$(OTE_SDK)/.venv -v --config=$(OTE_SDK)/$(FLAKE_CONFIG)
@echo $(ECHO_FLAKE_STOP)
mypy:
@echo $(ECHO_MYPY_START)
@cd .. && mypy $(OTE_SDK) --exclude \\$(OTE_SDK)/tests/.*,\\$(OTE_SDK)/\.venv/.* --config-file=$(OTE_SDK)/$(MYPY_CONFIG)
@echo $(ECHO_MYPY_STOP)
bandit:
@echo $(ECHO_BANDIT_START)
@cd .. && bandit -r $(OTE_SDK) --exclude $(OTE_SDK)/tests,$(OTE_SDK)/.venv
@echo $(ECHO_BANDIT_STOP)
pylint:
@echo $(ECHO_PYLINT_START)
@cd .. && pylint $(OTE_SDK) --ignore=tests,.venv,protobuf,configuration,reporting,exportable_code,augmentations,logging --rcfile=$(OTE_SDK)/$(PYLINT_CONFIG)
@echo $(ECHO_PYLINT_STOP)
test: test-component
test-component:
@echo $(ECHO_COMPONENT_START)
@cd .. && $(PYTEST) $(OTE_SDK)/tests
@echo $(ECHO_COMPONENT_STOP)