diff --git a/.github/workflows/job_python_unit_tests.yml b/.github/workflows/job_python_unit_tests.yml index e740525a7f2542..274aaaacea3223 100644 --- a/.github/workflows/job_python_unit_tests.yml +++ b/.github/workflows/job_python_unit_tests.yml @@ -121,7 +121,7 @@ jobs: # Tests # - - name: Python API 2.0 Tests + - name: Python API Tests # if: ${{ fromJSON(inputs.affected-components).Python_API.test && runner.arch != 'ARM64' }} # Ticket: 126380, 127101 run: | # for 'template' extension diff --git a/.github/workflows/py_checks.yml b/.github/workflows/py_checks.yml index 56b58faacf0c16..7dbe07752766db 100644 --- a/.github/workflows/py_checks.yml +++ b/.github/workflows/py_checks.yml @@ -53,12 +53,12 @@ jobs: name: samples_diff path: samples_diff.diff - # Python API 2.0 Flake code-style - - name: Run flake8 on Python API 2.0 + # Python API Flake code-style + - name: Run flake8 on Python API run: python -m flake8 ./src/openvino --config=setup.cfg working-directory: src/bindings/python - - name: Create code style diff for Python API 2.0 + - name: Create code style diff for Python API if: failure() run: | python -m black -l 160 -S ./ @@ -89,14 +89,14 @@ jobs: name: wheel_diff path: wheel_diff.diff - # Python API 2.0 tests Flake code-style + # Python API tests Flake code-style - name: Run flake8 on python tests # ignore lack of docs in tests run: python -m flake8 tests/ --config=setup.cfg working-directory: src/bindings/python - # Python API 2.0 mypy check - - name: Run mypy on Python API 2.0 + # Python API mypy check + - name: Run mypy on Python API run: python -m mypy ./src/openvino --config-file ./setup.cfg working-directory: src/bindings/python diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 06b36f7725d1ca..e25ff48ca31128 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -428,7 +428,7 @@ jobs: # TODO: replace with Python API tests requirements python3 -m pip install -r ${{ env.INSTALL_TEST_DIR }}/mo/requirements_dev.txt - - name: Python API 2.0 Tests + - name: Python API Tests #if: fromJSON(needs.smart_ci.outputs.affected_components).Python_API.test # Ticket: 127101 shell: cmd run: | diff --git a/src/bindings/python/CMakeLists.txt b/src/bindings/python/CMakeLists.txt index 2e2d6786bfa476..efd9c2ea664502 100644 --- a/src/bindings/python/CMakeLists.txt +++ b/src/bindings/python/CMakeLists.txt @@ -267,9 +267,7 @@ endmacro() macro(ov_define_setup_py_dependencies) foreach(_target # Python API dependencies - _pyngraph pyopenvino py_ov_frontends - # legacy Python API 1.0 dependencies (remove before 2024.0 release) - ie_api constants + _pyopenvino py_ov_frontends # plugins ov_plugins # frontends diff --git a/src/bindings/python/docs/test_examples.md b/src/bindings/python/docs/test_examples.md index c7078c08cc8bd1..661db4c738a89f 100644 --- a/src/bindings/python/docs/test_examples.md +++ b/src/bindings/python/docs/test_examples.md @@ -18,7 +18,7 @@ export PYTHONPATH=PYTHONPATH:/bin/intel64/Release/python cd .../openvino/src/bindings/python/ ``` -To run OpenVINO Python API 2.0 tests: +To run OpenVINO Python API tests: ```shell pytest tests/ ``` @@ -54,22 +54,12 @@ tox There are two packages used in the project to check the codestyle of python code: *mypy* and *flake8*. Besides, OpenVINO™ uses a [custom configuration file](./../setup.cfg) to exclude some strict rules. -To check the codestyle of the Python API 2.0, run the following commands: +To check the codestyle of the Python API, run the following commands: ``` python -m flake8 ./src/openvino/ --config=setup.cfg python -m mypy ./src/openvino --config-file ./setup.cfg ``` -To check the codestyle of the nGraph Python API, run the following commands: -``` -python -m flake8 ./src/compatibility/ngraph/ --config=setup.cfg -python -m mypy ./src/compatibility/ngraph --config-file ./setup.cfg -``` -To check the codestyle of the InferenceEngine Python API, run the following commands: -``` -cd src/compatibility/openvino -python -m flake8 ./ --config=setup.cfg -python -m mypy ./ --config-file ./setup.cfg -``` + It's recommended to run the mentioned codestyle check whenever new tests are added. This check should be executed from the main Python API folder: ``` @@ -94,7 +84,6 @@ Note that name of the file is connected to the class/module to be tested. This i tests/test_frontend <-- frontend manager and extensions tests/test_runtime <-- runtime classes such as Core and Tensor tests/test_graph <-- operators and their implementation - tests/test_onnx <-- ONNX Frontend tests and validation tests/test_transformations <-- optimization passes for OV Models ### Writing of the test itself