Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PyOV] clean up after legacy python api removal #22101

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/job_python_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/py_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 ./
Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
4 changes: 1 addition & 3 deletions src/bindings/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 3 additions & 14 deletions src/bindings/python/docs/test_examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export PYTHONPATH=PYTHONPATH:<openvino_repo>/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/
```
Expand Down Expand Up @@ -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:
```
Expand All @@ -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
Expand Down
Loading