Py code style (#6086)
* GitHub CI: Enable Python for Code style * Update formatting * Fix * Add cython * Add upgrade pip * Update to src/requirements-dev.txt * Fixed clang code style Co-authored-by: azhogov <alexander.zhogov@intel.com>
This commit is contained in:
parent
d171b5c4b7
commit
246932a5d3
2
.github/org_control/check_pr.py
vendored
2
.github/org_control/check_pr.py
vendored
@ -229,7 +229,7 @@ def main():
|
||||
if wrong_pulls:
|
||||
for pull_number, wrong_commits in wrong_pulls.items():
|
||||
print(
|
||||
f"\nERROR: Remove or replace wrong commits in the PR {pull_number}:\n ",
|
||||
f"\nERROR: Remove or replace wrong commits in the PR {pull_number}:\n ",
|
||||
"\n ".join(wrong_commits),
|
||||
)
|
||||
print(
|
||||
|
5
.github/workflows/code_style.yml
vendored
5
.github/workflows/code_style.yml
vendored
@ -15,14 +15,17 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt --assume-yes install libusb-1.0-0-dev
|
||||
python3 -m pip install --upgrade pip
|
||||
python3 -m pip install -r ./inference-engine/ie_bridges/python/requirements.txt
|
||||
# Add for -DENABLE_PYTHON=ON, no cython
|
||||
python3 -m pip install -r ./inference-engine/ie_bridges/python/src/requirements-dev.txt
|
||||
|
||||
# Run cmake with -DENABLE_PROFILING_ITT=ON -DSELECTIVE_BUILD=COLLECT in order to enable codestyle check for ITT collector
|
||||
- name: CMake
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DENABLE_PROFILING_ITT=ON -DSELECTIVE_BUILD=COLLECT ..
|
||||
cmake -DENABLE_PYTHON=ON -DENABLE_PROFILING_ITT=ON -DSELECTIVE_BUILD=COLLECT ..
|
||||
|
||||
- name: Check code style
|
||||
run: cmake --build build --target clang_format_check_all
|
||||
|
@ -77,4 +77,5 @@ install(PROGRAMS __init__.py
|
||||
DESTINATION ${PYTHON_BRIDGE_CPACK_PATH}/${PYTHON_VERSION}/openvino/inference_engine
|
||||
COMPONENT ${PYTHON_VERSION})
|
||||
|
||||
add_clang_format_target(${TARGET_NAME}_clang FOR_TARGETS ${TARGET_NAME})
|
||||
add_clang_format_target(${TARGET_NAME}_clang FOR_TARGETS ${TARGET_NAME}
|
||||
EXCLUDE_PATTERNS ".*\\.cxx;.*\\.pxd;.*\\.pyx")
|
||||
|
@ -42,7 +42,8 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
target_compile_options(${TARGET_NAME} PRIVATE "-Wno-error=register")
|
||||
endif()
|
||||
|
||||
add_clang_format_target(${TARGET_NAME}_clang FOR_TARGETS ${TARGET_NAME})
|
||||
add_clang_format_target(${TARGET_NAME}_clang FOR_TARGETS ${TARGET_NAME}
|
||||
EXCLUDE_PATTERNS ".*\\.cxx;.*\\.pxd;.*\\.pyx")
|
||||
|
||||
# perform copy
|
||||
add_custom_command(TARGET ${TARGET_NAME}
|
||||
|
@ -48,4 +48,5 @@ add_custom_command(TARGET ${TARGET_NAME}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${PYTHON_BRIDGE_SRC_ROOT}/src/openvino/test_utils/__init__.py ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/__init__.py
|
||||
)
|
||||
|
||||
add_clang_format_target(${TARGET_NAME}_clang FOR_TARGETS ${TARGET_NAME})
|
||||
add_clang_format_target(${TARGET_NAME}_clang FOR_TARGETS ${TARGET_NAME}
|
||||
EXCLUDE_PATTERNS ".*\\.cxx;.*\\.pxd;.*\\.pyx")
|
@ -4,8 +4,8 @@
|
||||
|
||||
#include <pybind11/numpy.h>
|
||||
|
||||
#include "pyngraph/util.hpp"
|
||||
#include "ngraph/validation_util.hpp"
|
||||
#include "pyngraph/util.hpp"
|
||||
|
||||
namespace py = pybind11;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user