From ec0012409d28bec349ba5853fad09936f3943338 Mon Sep 17 00:00:00 2001 From: elser Date: Tue, 26 Sep 2023 16:47:56 -0400 Subject: [PATCH] finished renames --- CMakeLists.txt | 8 ++++---- apps/cesium.omniverse.cpp.tests.runner.kit | 2 +- .../bindings/CMakeLists.txt | 4 ++-- .../bindings/PythonBindings.cpp | 20 +++++++++---------- .../include/CesiumOmniverseCppTests.h | 4 ++-- .../public/CMakeLists.txt | 4 ++-- .../public/CesiumOmniverseCppTests.cpp | 10 +++++----- .../CesiumOmniverseCppTestsPythonBindings.pyi | 10 ++++++++++ .../omniverse/cpp/tests/bindings/__init__.py | 2 +- .../cesium/omniverse/cpp/tests/extension.py | 2 +- 10 files changed, 38 insertions(+), 28 deletions(-) create mode 100644 exts/cesium.omniverse.cpp.tests/cesium/omniverse/cpp/tests/bindings/CesiumOmniverseCppTestsPythonBindings.pyi diff --git a/CMakeLists.txt b/CMakeLists.txt index ce5558da7..cfa281e40 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -670,12 +670,12 @@ install( EXCLUDE_FROM_ALL) install( - TARGETS cesium.omniverse.tests.plugin + TARGETS cesium.omniverse.cpp.tests.plugin ARCHIVE DESTINATION ${KIT_EXTENSION_TESTS_BIN_PATH} COMPONENT install LIBRARY DESTINATION ${KIT_EXTENSION_TESTS_BIN_PATH} COMPONENT install RUNTIME DESTINATION ${KIT_EXTENSION_TESTS_BIN_PATH} COMPONENT install) install( - TARGETS cesium.omniverse.tests.plugin + TARGETS cesium.omniverse.cpp.tests.plugin RUNTIME_DEPENDENCIES DIRECTORIES ${INSTALL_SEARCH_PATHS} @@ -694,13 +694,13 @@ install( EXCLUDE_FROM_ALL) install( - TARGETS CesiumOmniverseTestsPythonBindings + TARGETS CesiumOmniverseCppTestsPythonBindings ARCHIVE DESTINATION ${KIT_EXTENSION_TESTS_BINDINGS_PATH} COMPONENT install LIBRARY DESTINATION ${KIT_EXTENSION_TESTS_BINDINGS_PATH} COMPONENT install RUNTIME DESTINATION ${KIT_EXTENSION_TESTS_BINDINGS_PATH} COMPONENT install) install( - TARGETS CesiumOmniverseTestsPythonBindings + TARGETS CesiumOmniverseCppTestsPythonBindings RUNTIME_DEPENDENCIES DIRECTORIES ${INSTALL_SEARCH_PATHS} diff --git a/apps/cesium.omniverse.cpp.tests.runner.kit b/apps/cesium.omniverse.cpp.tests.runner.kit index c643511ca..bf3ca3580 100644 --- a/apps/cesium.omniverse.cpp.tests.runner.kit +++ b/apps/cesium.omniverse.cpp.tests.runner.kit @@ -5,7 +5,7 @@ app = true [dependencies] "cesium.omniverse.dev" = {} -"cesium.omniverse.tests" = {} +"cesium.omniverse.cpp.tests" = {} [settings] app.window.title = "Cesium for Omniverse Tests App" diff --git a/cesiumOmniverseCppTestsExtension/bindings/CMakeLists.txt b/cesiumOmniverseCppTestsExtension/bindings/CMakeLists.txt index ae0f64ed4..7e51a1b9a 100644 --- a/cesiumOmniverseCppTestsExtension/bindings/CMakeLists.txt +++ b/cesiumOmniverseCppTestsExtension/bindings/CMakeLists.txt @@ -8,11 +8,11 @@ setup_python_module( # Use the same Python version as Omniverse (Python 3.10) "${PROJECT_SOURCE_DIR}/extern/nvidia/_build/target-deps/python" TARGET_NAME - CesiumOmniverseTestsPythonBindings + CesiumOmniverseCppTestsPythonBindings SOURCES ${SOURCES} LIBRARIES - cesium.omniverse.tests.plugin + cesium.omniverse.cpp.tests.plugin CXX_FLAGS ${CESIUM_OMNI_CXX_FLAGS} CXX_FLAGS_DEBUG diff --git a/cesiumOmniverseCppTestsExtension/bindings/PythonBindings.cpp b/cesiumOmniverseCppTestsExtension/bindings/PythonBindings.cpp index 6e9aa3bf8..c44da9544 100644 --- a/cesiumOmniverseCppTestsExtension/bindings/PythonBindings.cpp +++ b/cesiumOmniverseCppTestsExtension/bindings/PythonBindings.cpp @@ -1,22 +1,22 @@ -#include "CesiumOmniverseTests.h" +#include "CesiumOmniverseCppTests.h" #include // NOLINTNEXTLINE -CARB_BINDINGS("cesium.omniverse.tests.python") -DISABLE_PYBIND11_DYNAMIC_CAST(cesium::omniverse::tests::ICesiumOmniverseTestsInterface) +CARB_BINDINGS("cesium.omniverse.cpp.tests.python") +DISABLE_PYBIND11_DYNAMIC_CAST(cesium::omniverse::tests::ICesiumOmniverseCppTestsInterface) -PYBIND11_MODULE(CesiumOmniverseTestsPythonBindings, m) { +PYBIND11_MODULE(CesiumOmniverseCppTestsPythonBindings, m) { using namespace cesium::omniverse::tests; - m.doc() = "pybind11 cesium.omniverse.tests bindings"; + m.doc() = "pybind11 cesium.omniverse.cpp.tests bindings"; // clang-format off - carb::defineInterfaceClass( - m, "ICesiumOmniverseTestsInterface", "acquire_cesium_omniverse_tests_interface", "release_cesium_omniverse_tests_interface") - .def("run_all_tests", &ICesiumOmniverseTestsInterface::run_all_tests) - .def("on_startup", &ICesiumOmniverseTestsInterface::onStartup) - .def("on_shutdown", &ICesiumOmniverseTestsInterface::onShutdown); + carb::defineInterfaceClass( + m, "ICesiumOmniverseCppTestsInterface", "acquire_cesium_omniverse_tests_interface", "release_cesium_omniverse_tests_interface") + .def("run_all_tests", &ICesiumOmniverseCppTestsInterface::run_all_tests) + .def("on_startup", &ICesiumOmniverseCppTestsInterface::onStartup) + .def("on_shutdown", &ICesiumOmniverseCppTestsInterface::onShutdown); // clang-format on } diff --git a/cesiumOmniverseCppTestsExtension/include/CesiumOmniverseCppTests.h b/cesiumOmniverseCppTestsExtension/include/CesiumOmniverseCppTests.h index e165b1175..6b0b0dac8 100644 --- a/cesiumOmniverseCppTestsExtension/include/CesiumOmniverseCppTests.h +++ b/cesiumOmniverseCppTestsExtension/include/CesiumOmniverseCppTests.h @@ -3,9 +3,9 @@ namespace cesium::omniverse::tests { -class ICesiumOmniverseTestsInterface { +class ICesiumOmniverseCppTestsInterface { public: - CARB_PLUGIN_INTERFACE("cesium::omniverse::tests::ICesiumOmniverseTestsInterface", 0, 0); + CARB_PLUGIN_INTERFACE("cesium::omniverse::tests::ICesiumOmniverseCppTestsInterface", 0, 0); /** * @brief Call this on extension startup. * diff --git a/cesiumOmniverseCppTestsExtension/public/CMakeLists.txt b/cesiumOmniverseCppTestsExtension/public/CMakeLists.txt index d694ea1bf..5090e78cb 100644 --- a/cesiumOmniverseCppTestsExtension/public/CMakeLists.txt +++ b/cesiumOmniverseCppTestsExtension/public/CMakeLists.txt @@ -7,14 +7,14 @@ get_property(ADDITIONAL_LIBRARIES GLOBAL PROPERTY NVIDIA_ADDITIONAL_LIBRARIES_PR # cmake-format: off setup_lib( TARGET_NAME - cesium.omniverse.tests.plugin + cesium.omniverse.cpp.tests.plugin TYPE # Carbonite Plugins needs to be shared libraries SHARED SOURCES ${SOURCES} INCLUDE_DIRS - "${PROJECT_SOURCE_DIR}/cesiumOmniverseTestsExtension/include" + "${PROJECT_SOURCE_DIR}/cesiumOmniverseCppTestsExtension/include" LIBRARIES CesiumOmniverseCore doctest::doctest diff --git a/cesiumOmniverseCppTestsExtension/public/CesiumOmniverseCppTests.cpp b/cesiumOmniverseCppTestsExtension/public/CesiumOmniverseCppTests.cpp index f55988d27..339f4cc5f 100644 --- a/cesiumOmniverseCppTestsExtension/public/CesiumOmniverseCppTests.cpp +++ b/cesiumOmniverseCppTestsExtension/public/CesiumOmniverseCppTests.cpp @@ -3,7 +3,7 @@ #define DOCTEST_CONFIG_IMPLEMENTATION_IN_DLL #define DOCTEST_CONFIG_SUPER_FAST_ASSERTS -#include "CesiumOmniverseTests.h" +#include "CesiumOmniverseCppTests.h" #include "cesium/omniverse/Context.h" #include "cesium/omniverse/LoggerSink.h" @@ -52,7 +52,7 @@ static void handler(const doctest::AssertData& ad) { namespace cesium::omniverse::tests { -class CesiumOmniverseTestsPlugin final : public ICesiumOmniverseTestsInterface { +class CesiumOmniverseCppTestsPlugin final : public ICesiumOmniverseCppTestsInterface { public: void onStartup(const char* cesiumExtensionLocation) noexcept override { Context::onStartup(cesiumExtensionLocation); @@ -85,15 +85,15 @@ class CesiumOmniverseTestsPlugin final : public ICesiumOmniverseTestsInterface { } // namespace cesium::omniverse::tests const struct carb::PluginImplDesc pluginImplDesc = { - "cesium.omniverse.tests.plugin", + "cesium.omniverse.cpp.tests.plugin", "Cesium Omniverse Tests Plugin.", "Cesium", carb::PluginHotReload::eDisabled, "dev"}; // NOLINTBEGIN -CARB_PLUGIN_IMPL(pluginImplDesc, cesium::omniverse::tests::CesiumOmniverseTestsPlugin) +CARB_PLUGIN_IMPL(pluginImplDesc, cesium::omniverse::tests::CesiumOmniverseCppTestsPlugin) CARB_PLUGIN_IMPL_DEPS(omni::fabric::IFabric, omni::fabric::IStageReaderWriter) // NOLINTEND -void fillInterface([[maybe_unused]] cesium::omniverse::tests::CesiumOmniverseTestsPlugin& iface) {} +void fillInterface([[maybe_unused]] cesium::omniverse::tests::CesiumOmniverseCppTestsPlugin& iface) {} diff --git a/exts/cesium.omniverse.cpp.tests/cesium/omniverse/cpp/tests/bindings/CesiumOmniverseCppTestsPythonBindings.pyi b/exts/cesium.omniverse.cpp.tests/cesium/omniverse/cpp/tests/bindings/CesiumOmniverseCppTestsPythonBindings.pyi new file mode 100644 index 000000000..cead660bb --- /dev/null +++ b/exts/cesium.omniverse.cpp.tests/cesium/omniverse/cpp/tests/bindings/CesiumOmniverseCppTestsPythonBindings.pyi @@ -0,0 +1,10 @@ +class ICesiumOmniverseCppTestsInterface: + def __init__(self, *args, **kwargs) -> None: ... + def on_shutdown(self) -> None: ... + def on_startup(self, arg0: str) -> None: ... + def run_all_tests(self, arg0: int) -> None: ... + +def acquire_cesium_omniverse_tests_interface( + plugin_name: str = ..., library_path: str = ... +) -> ICesiumOmniverseCppTestsInterface: ... +def release_cesium_omniverse_tests_interface(arg0: ICesiumOmniverseCppTestsInterface) -> None: ... diff --git a/exts/cesium.omniverse.cpp.tests/cesium/omniverse/cpp/tests/bindings/__init__.py b/exts/cesium.omniverse.cpp.tests/cesium/omniverse/cpp/tests/bindings/__init__.py index 002aae5f6..509ecc0e5 100644 --- a/exts/cesium.omniverse.cpp.tests/cesium/omniverse/cpp/tests/bindings/__init__.py +++ b/exts/cesium.omniverse.cpp.tests/cesium/omniverse/cpp/tests/bindings/__init__.py @@ -1 +1 @@ -from .CesiumOmniverseTestsPythonBindings import * # noqa: F401 F403 +from .CesiumOmniverseCppTestsPythonBindings import * # noqa: F401 F403 diff --git a/exts/cesium.omniverse.cpp.tests/cesium/omniverse/cpp/tests/extension.py b/exts/cesium.omniverse.cpp.tests/cesium/omniverse/cpp/tests/extension.py index ecb126814..c864ab960 100644 --- a/exts/cesium.omniverse.cpp.tests/cesium/omniverse/cpp/tests/extension.py +++ b/exts/cesium.omniverse.cpp.tests/cesium/omniverse/cpp/tests/extension.py @@ -4,7 +4,7 @@ from .bindings import acquire_cesium_omniverse_tests_interface, release_cesium_omniverse_tests_interface -class CesiumOmniverseTestsExtension(omni.ext.IExt): +class CesiumOmniverseCppTestsExtension(omni.ext.IExt): def __init__(self): super().__init__()