From f51a67417e2c1f747444fb612c2d690efc10f448 Mon Sep 17 00:00:00 2001 From: kai-ma Date: Fri, 11 Jul 2025 14:20:45 +0800 Subject: [PATCH] add main --- msprobe/msprobe/CMakeLists.txt | 1 + msprobe/msprobe/__init__.py | 16 ++++++++++++++++ msprobe/msprobe/__main__.py | 26 ++++++++++++++++++++++++++ 3 files changed, 43 insertions(+) create mode 100644 msprobe/msprobe/CMakeLists.txt create mode 100644 msprobe/msprobe/__init__.py create mode 100644 msprobe/msprobe/__main__.py diff --git a/msprobe/msprobe/CMakeLists.txt b/msprobe/msprobe/CMakeLists.txt new file mode 100644 index 0000000000..86735ca287 --- /dev/null +++ b/msprobe/msprobe/CMakeLists.txt @@ -0,0 +1 @@ +add_subdirectory(csrc) diff --git a/msprobe/msprobe/__init__.py b/msprobe/msprobe/__init__.py new file mode 100644 index 0000000000..e24ad32c29 --- /dev/null +++ b/msprobe/msprobe/__init__.py @@ -0,0 +1,16 @@ +# Copyright (c) 2025-2025 Huawei Technologies Co., Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from msprobe import core +from msprobe.base import Service diff --git a/msprobe/msprobe/__main__.py b/msprobe/msprobe/__main__.py new file mode 100644 index 0000000000..1733661912 --- /dev/null +++ b/msprobe/msprobe/__main__.py @@ -0,0 +1,26 @@ +# Copyright (c) 2025-2025 Huawei Technologies Co., Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from msprobe.common.cli import MainCommand + + +def main(): + msprobe_command = MainCommand() + msprobe_command.register() + args = msprobe_command.parse() + msprobe_command.execute(args) + + +if __name__ == "__main__": + main() -- Gitee