diff --git a/docs/Coding_Conventions_and_Standards.md b/docs/Coding_Conventions_and_Standards.md index 02af7ddaa49be..af9b26538fe6a 100644 --- a/docs/Coding_Conventions_and_Standards.md +++ b/docs/Coding_Conventions_and_Standards.md @@ -188,13 +188,13 @@ new adapter following examples in https://github.com/justinchuby/lintrunner-adap ## Python Code Style -Follow the [Black formatter](https://black.readthedocs.io)'s coding style when possible. A maximum line length of 120 characters is allowed for consistency with the C++ code. +Follow the [Ruff formatter](https://docs.astral.sh/ruff/formatter/)'s coding style when possible. A maximum line length of 120 characters is allowed for consistency with the C++ code. Please adhere to the [PEP8 Style Guide](https://www.python.org/dev/peps/pep-0008/). We use [Google's python style guide](https://google.github.io/styleguide/pyguide.html) as the style guide which is an extension to PEP8. Use `pyright`, which is provided as a component of the `pylance` extension in VS Code for static type checking. -Auto-formatting is done with `black` and `isort`. The tools are configured in `pyproject.toml`. From the root of the repository, you can run +Auto-formatting and linting are done with [Ruff](https://docs.astral.sh/ruff/), which handles both code formatting and import sorting. The tools are configured in `pyproject.toml` and `.lintrunner.toml`. From the root of the repository, you can run ```sh lintrunner f --all-files @@ -202,21 +202,19 @@ lintrunner f --all-files to format Python files. -Use `pydocstyle` to lint documentation styles. `pydocstyle` is enabled in VS Code. - ## IDEs ### VS Code VS Code is automatically configured with workspace configurations. -For Python development is VS Code, read +For Python development in VS Code, read [this tutorial](https://code.visualstudio.com/docs/python/python-tutorial) for more information. ### PyCharm -Follow [black's documentation](https://black.readthedocs.io/en/stable/integrations/editors.html#pycharm-intellij-idea) to set up the black formatter for PyCharm. +Follow [Ruff's documentation](https://docs.astral.sh/ruff/editors/setup/#pycharm) to set up the Ruff formatter for PyCharm. ## Testing diff --git a/include/onnxruntime/core/graph/constants.h b/include/onnxruntime/core/graph/constants.h index 4ed16ffd27264..724d05b91ab67 100644 --- a/include/onnxruntime/core/graph/constants.h +++ b/include/onnxruntime/core/graph/constants.h @@ -46,7 +46,6 @@ constexpr const char* kAclExecutionProvider = "ACLExecutionProvider"; constexpr const char* kCoreMLExecutionProvider = "CoreMLExecutionProvider"; constexpr const char* kJsExecutionProvider = "JsExecutionProvider"; constexpr const char* kSnpeExecutionProvider = "SNPEExecutionProvider"; -constexpr const char* kTvmExecutionProvider = "TvmExecutionProvider"; constexpr const char* kXnnpackExecutionProvider = "XnnpackExecutionProvider"; constexpr const char* kWebNNExecutionProvider = "WebNNExecutionProvider"; constexpr const char* kWebGpuExecutionProvider = "WebGpuExecutionProvider"; diff --git a/onnxruntime/test/python/onnxruntime_test_python.py b/onnxruntime/test/python/onnxruntime_test_python.py index ae4fc2616168f..d9cafeee31aa7 100644 --- a/onnxruntime/test/python/onnxruntime_test_python.py +++ b/onnxruntime/test/python/onnxruntime_test_python.py @@ -98,13 +98,6 @@ def cuda_device_count(self, cuda_lib): return -1 return num_device.value - def test_tvm_imported(self): - if "TvmExecutionProvider" not in onnxrt.get_available_providers(): - return - import tvm # noqa: PLC0415 - - self.assertTrue(tvm is not None) - def test_get_version_string(self): self.assertIsNot(onnxrt.get_version_string(), None) diff --git a/onnxruntime/test/util/include/default_providers.h b/onnxruntime/test/util/include/default_providers.h index e1354909d08b2..2e659beb84c59 100644 --- a/onnxruntime/test/util/include/default_providers.h +++ b/onnxruntime/test/util/include/default_providers.h @@ -41,7 +41,6 @@ std::unique_ptr DefaultCudaNHWCExecutionProvider(); std::unique_ptr CudaExecutionProviderWithOptions(const OrtCUDAProviderOptionsV2* provider_options); std::unique_ptr DefaultDnnlExecutionProvider(); std::unique_ptr DnnlExecutionProviderWithOptions(const OrtDnnlProviderOptions* provider_options); -// std::unique_ptr DefaultTvmExecutionProvider(); std::unique_ptr DefaultTensorrtExecutionProvider(); std::unique_ptr DefaultNvTensorRTRTXExecutionProvider(); std::unique_ptr TensorrtExecutionProviderWithOptions(const OrtTensorRTProviderOptions* params);