From f33cb98dbce5d8705d872536500602afd1fc884a Mon Sep 17 00:00:00 2001 From: Kevin Gurney Date: Mon, 18 Sep 2023 15:14:24 -0400 Subject: [PATCH 01/11] Remove MATLAB_BUILD_TESTS flag from CMake build system. --- matlab/CMakeLists.txt | 103 +----------------------------------------- 1 file changed, 2 insertions(+), 101 deletions(-) diff --git a/matlab/CMakeLists.txt b/matlab/CMakeLists.txt index d73173b58e7..0cd4810b58a 100644 --- a/matlab/CMakeLists.txt +++ b/matlab/CMakeLists.txt @@ -185,8 +185,6 @@ if(WIN32) set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreadedDLL") endif() -option(MATLAB_BUILD_TESTS "Build the C++ tests for the MATLAB interface" OFF) - # Add tools/cmake directory to the CMAKE_MODULE_PATH. list(PREPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/tools/cmake) @@ -208,56 +206,9 @@ else() set(MATLAB_BUILD_OUTPUT_DIR "${CMAKE_BINARY_DIR}") endif() -# Only build the MATLAB interface C++ tests if MATLAB_BUILD_TESTS=ON. -if(MATLAB_BUILD_TESTS) - # find_package(GTest) supports custom GTEST_ROOT as well as package managers. - find_package(GTest) - - if(NOT GTest_FOUND) - # find_package(Arrow) supports custom ARROW_HOME as well as package - # managers. - find_package(Arrow QUIET) - # Trigger an automatic build of the Arrow C++ libraries and bundled - # GoogleTest binaries. If a valid Arrow installation was not already - # found by find_package, then build_arrow will use the Arrow - # C++ libraries that are built from source. - build_arrow(BUILD_GTEST) - else() - # On Windows, IMPORTED_LOCATION needs to be set to indicate where the shared - # libraries live when GTest is found. - if(WIN32) - set(GTEST_SHARED_LIB_DIR "${GTEST_ROOT}/bin") - set(GTEST_SHARED_LIBRARY_FILENAME - "${CMAKE_SHARED_LIBRARY_PREFIX}gtest${CMAKE_SHARED_LIBRARY_SUFFIX}") - set(GTEST_SHARED_LIBRARY_LIB - "${GTEST_SHARED_LIB_DIR}/${GTEST_SHARED_LIBRARY_FILENAME}") - - set(GTEST_MAIN_SHARED_LIB_DIR "${GTEST_ROOT}/bin") - set(GTEST_MAIN_SHARED_LIBRARY_FILENAME - "${CMAKE_SHARED_LIBRARY_PREFIX}gtest_main${CMAKE_SHARED_LIBRARY_SUFFIX}") - set(GTEST_MAIN_SHARED_LIBRARY_LIB - "${GTEST_MAIN_SHARED_LIB_DIR}/${GTEST_MAIN_SHARED_LIBRARY_FILENAME}") - - set_target_properties(GTest::gtest PROPERTIES IMPORTED_LOCATION - "${GTEST_SHARED_LIBRARY_LIB}") - - set_target_properties(GTest::gtest_main - PROPERTIES IMPORTED_LOCATION - "${GTEST_MAIN_SHARED_LIBRARY_LIB}") - endif() - - find_package(Arrow QUIET) - if(NOT Arrow_FOUND) - # Trigger an automatic build of the Arrow C++ libraries. - build_arrow() - endif() - endif() - -else() - find_package(Arrow QUIET) - if(NOT Arrow_FOUND) +find_package(Arrow QUIET) +if(NOT Arrow_FOUND) build_arrow() - endif() endif() # MATLAB is Required @@ -311,56 +262,6 @@ else() message(STATUS "ARROW_INCLUDE_DIR: ${ARROW_INCLUDE_DIR}") endif() -# ############################################################################## -# C++ Tests -# ############################################################################## -# Only build the C++ tests if MATLAB_BUILD_TESTS=ON. -if(MATLAB_BUILD_TESTS) - enable_testing() - - # Define a test executable target. TODO: Remove the placeholder test. This is - # just for testing GoogleTest integration. - add_executable(placeholder_test ${CMAKE_SOURCE_DIR}/src/placeholder_test.cc) - - # Declare a dependency on the GTest::gtest and GTest::gtest_main IMPORTED - # targets. - target_link_libraries(placeholder_test GTest::gtest GTest::gtest_main) - - # Ensure using GTest:gtest and GTest::gtest_main on macOS without - # specifying DYLD_LIBRARY_DIR. - set_target_properties(placeholder_test - PROPERTIES BUILD_RPATH - "$;$" - ) - - # Add test targets for C++ tests. - add_test(PlaceholderTestTarget placeholder_test) - - # On Windows: - # Add the directory of gtest.dll and gtest_main.dll to the %PATH% for running - # all tests. - # Add the directory of libmx.dll, libmex.dll, and libarrow.dll to the %PATH% for running - # CheckNumArgsTestTarget. - # Note: When appending to the path using set_test_properties' ENVIRONMENT property, - # make sure that we escape ';' to prevent CMake from interpreting the input as - # a list of strings. - if(WIN32) - get_target_property(GTEST_SHARED_LIB GTest::gtest IMPORTED_LOCATION) - get_filename_component(GTEST_SHARED_LIB_DIR ${GTEST_SHARED_LIB} DIRECTORY) - - get_target_property(GTEST_MAIN_SHARED_LIB GTest::gtest_main IMPORTED_LOCATION) - get_filename_component(GTEST_MAIN_SHARED_LIB_DIR ${GTEST_MAIN_SHARED_LIB} DIRECTORY) - - set_tests_properties(PlaceholderTestTarget - PROPERTIES ENVIRONMENT - "PATH=${GTEST_SHARED_LIB_DIR}\;${GTEST_MAIN_SHARED_LIB_DIR}\;$ENV{PATH}" - ) - - get_target_property(ARROW_SHARED_LIB arrow_shared IMPORTED_LOCATION) - get_filename_component(ARROW_SHARED_LIB_DIR ${ARROW_SHARED_LIB} DIRECTORY) - endif() -endif() - # ############################################################################## # Install # ############################################################################## From 366316df103f7339693fc635b45686b14fc9ae1d Mon Sep 17 00:00:00 2001 From: Kevin Gurney Date: Mon, 18 Sep 2023 15:17:03 -0400 Subject: [PATCH 02/11] Remove build_gtest and enable_gtest macros. --- matlab/CMakeLists.txt | 58 ------------------------------------------- 1 file changed, 58 deletions(-) diff --git a/matlab/CMakeLists.txt b/matlab/CMakeLists.txt index 0cd4810b58a..83e377bd15d 100644 --- a/matlab/CMakeLists.txt +++ b/matlab/CMakeLists.txt @@ -114,64 +114,6 @@ function(build_arrow) endif() endfunction() -macro(enable_gtest) - set(ARROW_GTEST_INCLUDE_DIR "${ARROW_PREFIX}/include/arrow-gtest") - - set(ARROW_GTEST_IMPORT_LIB_DIR "${ARROW_PREFIX}/lib") - if(WIN32) - set(ARROW_GTEST_SHARED_LIB_DIR "${ARROW_PREFIX}/bin") - else() - set(ARROW_GTEST_SHARED_LIB_DIR "${ARROW_PREFIX}/lib") - endif() - set(ARROW_GTEST_IMPORT_LIB - "${ARROW_GTEST_IMPORT_LIB_DIR}/${CMAKE_IMPORT_LIBRARY_PREFIX}arrow_gtest${CMAKE_IMPORT_LIBRARY_SUFFIX}" - ) - set(ARROW_GTEST_MAIN_IMPORT_LIB - "${ARROW_GTEST_IMPORT_LIB_DIR}/${CMAKE_IMPORT_LIBRARY_PREFIX}arrow_gtest_main${CMAKE_IMPORT_LIBRARY_SUFFIX}" - ) - set(ARROW_GTEST_SHARED_LIB - "${ARROW_GTEST_SHARED_LIB_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}arrow_gtest${CMAKE_SHARED_LIBRARY_SUFFIX}" - ) - set(ARROW_GTEST_MAIN_SHARED_LIB - "${ARROW_GTEST_SHARED_LIB_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}arrow_gtest_main${CMAKE_SHARED_LIBRARY_SUFFIX}" - ) - - list(APPEND ARROW_CMAKE_ARGS "-DARROW_BUILD_TESTS=ON") - - # The appropriate libraries need to be guaranteed to be available when linking the test - # executables. - if(WIN32) - # On Windows, add the gtest link libraries as BUILD_BYPRODUCTS for arrow_ep. - list(APPEND ARROW_BUILD_BYPRODUCTS "${ARROW_GTEST_IMPORT_LIB}" - "${ARROW_GTEST_MAIN_IMPORT_LIB}") - else() - # On Linux and macOS, add the gtest shared libraries as BUILD_BYPRODUCTS for arrow_ep. - list(APPEND ARROW_BUILD_BYPRODUCTS "${ARROW_GTEST_SHARED_LIB}" - "${ARROW_GTEST_MAIN_SHARED_LIB}") - endif() -endmacro() - -# Build the GoogleTest binaries that are bundled with the Arrow C++ libraries. -macro(build_gtest) - file(MAKE_DIRECTORY "${ARROW_GTEST_INCLUDE_DIR}") - - # Create target GTest::gtest - add_library(GTest::gtest SHARED IMPORTED) - set_target_properties(GTest::gtest - PROPERTIES IMPORTED_IMPLIB ${ARROW_GTEST_IMPORT_LIB} - IMPORTED_LOCATION ${ARROW_GTEST_SHARED_LIB} - INTERFACE_INCLUDE_DIRECTORIES - ${ARROW_GTEST_INCLUDE_DIR}) - add_dependencies(GTest::gtest arrow_ep) - - # Create target GTest::gtest_main - add_library(GTest::gtest_main SHARED IMPORTED) - set_target_properties(GTest::gtest_main - PROPERTIES IMPORTED_IMPLIB ${ARROW_GTEST_MAIN_IMPORT_LIB} - IMPORTED_LOCATION ${ARROW_GTEST_MAIN_SHARED_LIB}) - add_dependencies(GTest::gtest_main arrow_ep) -endmacro() - set(CMAKE_CXX_STANDARD 17) set(MLARROW_VERSION "14.0.0-SNAPSHOT") From 75d76b59f73a333532acdbeb97e6b19f79aecb4b Mon Sep 17 00:00:00 2001 From: Kevin Gurney Date: Mon, 18 Sep 2023 15:37:41 -0400 Subject: [PATCH 03/11] Remove the BUILD_GTEST option from the build_arrow function. --- matlab/CMakeLists.txt | 103 +++++++++++++++++------------------------- 1 file changed, 41 insertions(+), 62 deletions(-) diff --git a/matlab/CMakeLists.txt b/matlab/CMakeLists.txt index 83e377bd15d..f03102f1042 100644 --- a/matlab/CMakeLists.txt +++ b/matlab/CMakeLists.txt @@ -19,7 +19,7 @@ cmake_minimum_required(VERSION 3.20) # Build the Arrow C++ libraries. function(build_arrow) - set(options BUILD_GTEST) + set(options) set(one_value_args) set(multi_value_args) @@ -37,70 +37,52 @@ function(build_arrow) set(ARROW_CMAKE_ARGS "-DCMAKE_INSTALL_PREFIX=${ARROW_PREFIX}" "-DCMAKE_INSTALL_LIBDIR=lib" "-DARROW_BUILD_STATIC=OFF") - if(Arrow_FOUND - AND NOT GTest_FOUND - AND ARG_BUILD_GTEST) - # If find_package has already found a valid Arrow installation, then - # we don't want to link against the Arrow libraries that will be built - # from source. - # - # However, we still need to create a library target to trigger building - # of the arrow_ep target, which will ultimately build the bundled - # GoogleTest binaries. - add_library(arrow_shared_for_gtest SHARED IMPORTED) - set(ARROW_LIBRARY_TARGET arrow_shared_for_gtest) + add_library(arrow_shared SHARED IMPORTED) + set(ARROW_LIBRARY_TARGET arrow_shared) + + # Set the runtime shared library (.dll, .so, or .dylib) + if(WIN32) + # The shared library (i.e. .dll) is located in the "bin" directory. + set(ARROW_SHARED_LIBRARY_DIR "${ARROW_PREFIX}/bin") else() - add_library(arrow_shared SHARED IMPORTED) - set(ARROW_LIBRARY_TARGET arrow_shared) - - # Set the runtime shared library (.dll, .so, or .dylib) - if(WIN32) - # The shared library (i.e. .dll) is located in the "bin" directory. - set(ARROW_SHARED_LIBRARY_DIR "${ARROW_PREFIX}/bin") - else() - # The shared library (i.e. .so or .dylib) is located in the "lib" directory. - set(ARROW_SHARED_LIBRARY_DIR "${ARROW_PREFIX}/lib") - endif() - - set(ARROW_SHARED_LIB_FILENAME - "${CMAKE_SHARED_LIBRARY_PREFIX}arrow${CMAKE_SHARED_LIBRARY_SUFFIX}") - set(ARROW_SHARED_LIB "${ARROW_SHARED_LIBRARY_DIR}/${ARROW_SHARED_LIB_FILENAME}") - - set_target_properties(arrow_shared PROPERTIES IMPORTED_LOCATION ${ARROW_SHARED_LIB}) - - # Set the link-time import library (.lib) - if(WIN32) - # The import library (i.e. .lib) is located in the "lib" directory. - set(ARROW_IMPORT_LIB_FILENAME - "${CMAKE_IMPORT_LIBRARY_PREFIX}arrow${CMAKE_IMPORT_LIBRARY_SUFFIX}") - set(ARROW_IMPORT_LIB "${ARROW_PREFIX}/lib/${ARROW_IMPORT_LIB_FILENAME}") - - set_target_properties(arrow_shared PROPERTIES IMPORTED_IMPLIB ${ARROW_IMPORT_LIB}) - endif() - - # Set the include directories - set(ARROW_INCLUDE_DIR "${ARROW_PREFIX}/include") - file(MAKE_DIRECTORY "${ARROW_INCLUDE_DIR}") - set_target_properties(arrow_shared PROPERTIES INTERFACE_INCLUDE_DIRECTORIES - ${ARROW_INCLUDE_DIR}) - - # Set the build byproducts for the ExternalProject build - # The appropriate libraries need to be guaranteed to be available when linking the test - # executables. - if(WIN32) - set(ARROW_BUILD_BYPRODUCTS "${ARROW_IMPORT_LIB}") - else() - set(ARROW_BUILD_BYPRODUCTS "${ARROW_SHARED_LIB}") - endif() + # The shared library (i.e. .so or .dylib) is located in the "lib" directory. + set(ARROW_SHARED_LIBRARY_DIR "${ARROW_PREFIX}/lib") endif() - # Building the Arrow C++ libraries and bundled GoogleTest binaries requires ExternalProject. - include(ExternalProject) + set(ARROW_SHARED_LIB_FILENAME + "${CMAKE_SHARED_LIBRARY_PREFIX}arrow${CMAKE_SHARED_LIBRARY_SUFFIX}") + set(ARROW_SHARED_LIB "${ARROW_SHARED_LIBRARY_DIR}/${ARROW_SHARED_LIB_FILENAME}") + + set_target_properties(arrow_shared PROPERTIES IMPORTED_LOCATION ${ARROW_SHARED_LIB}) + + # Set the link-time import library (.lib) + if(WIN32) + # The import library (i.e. .lib) is located in the "lib" directory. + set(ARROW_IMPORT_LIB_FILENAME + "${CMAKE_IMPORT_LIBRARY_PREFIX}arrow${CMAKE_IMPORT_LIBRARY_SUFFIX}") + set(ARROW_IMPORT_LIB "${ARROW_PREFIX}/lib/${ARROW_IMPORT_LIB_FILENAME}") + + set_target_properties(arrow_shared PROPERTIES IMPORTED_IMPLIB ${ARROW_IMPORT_LIB}) + endif() - if(ARG_BUILD_GTEST) - enable_gtest() + # Set the include directories + set(ARROW_INCLUDE_DIR "${ARROW_PREFIX}/include") + file(MAKE_DIRECTORY "${ARROW_INCLUDE_DIR}") + set_target_properties(arrow_shared PROPERTIES INTERFACE_INCLUDE_DIRECTORIES + ${ARROW_INCLUDE_DIR}) + + # Set the build byproducts for the ExternalProject build + # The appropriate libraries need to be guaranteed to be available when linking the test + # executables. + if(WIN32) + set(ARROW_BUILD_BYPRODUCTS "${ARROW_IMPORT_LIB}") + else() + set(ARROW_BUILD_BYPRODUCTS "${ARROW_SHARED_LIB}") endif() + # Building the Arrow C++ libraries requires ExternalProject. + include(ExternalProject) + externalproject_add(arrow_ep SOURCE_DIR "${CMAKE_SOURCE_DIR}/../cpp" BINARY_DIR "${ARROW_BINARY_DIR}" @@ -109,9 +91,6 @@ function(build_arrow) add_dependencies(${ARROW_LIBRARY_TARGET} arrow_ep) - if(ARG_BUILD_GTEST) - build_gtest() - endif() endfunction() set(CMAKE_CXX_STANDARD 17) From e4ffc74f20e042333fbebb347cce72e08f4547b0 Mon Sep 17 00:00:00 2001 From: Kevin Gurney Date: Mon, 18 Sep 2023 15:46:25 -0400 Subject: [PATCH 04/11] Modify comments. --- matlab/CMakeLists.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/matlab/CMakeLists.txt b/matlab/CMakeLists.txt index f03102f1042..62fd6cf930e 100644 --- a/matlab/CMakeLists.txt +++ b/matlab/CMakeLists.txt @@ -17,7 +17,7 @@ cmake_minimum_required(VERSION 3.20) -# Build the Arrow C++ libraries. +# Build the Arrow C++ libraries as using ExternalProject_Add. function(build_arrow) set(options) set(one_value_args) @@ -72,8 +72,6 @@ function(build_arrow) ${ARROW_INCLUDE_DIR}) # Set the build byproducts for the ExternalProject build - # The appropriate libraries need to be guaranteed to be available when linking the test - # executables. if(WIN32) set(ARROW_BUILD_BYPRODUCTS "${ARROW_IMPORT_LIB}") else() From 469017c280ad31043c0bda92a7d1243505e1065d Mon Sep 17 00:00:00 2001 From: Kevin Gurney Date: Mon, 18 Sep 2023 15:46:59 -0400 Subject: [PATCH 05/11] Delete C++ placeholder test. --- matlab/src/placeholder_test.cc | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 matlab/src/placeholder_test.cc diff --git a/matlab/src/placeholder_test.cc b/matlab/src/placeholder_test.cc deleted file mode 100644 index eef37e178f6..00000000000 --- a/matlab/src/placeholder_test.cc +++ /dev/null @@ -1,27 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you 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. - -#include - -namespace arrow { -namespace matlab { -namespace test { -// TODO: Remove this placeholder test. -TEST(PlaceholderTestSuite, PlaceholderTestCase) { ASSERT_TRUE(true); } -} // namespace test -} // namespace matlab -} // namespace arrow From c9100dbc10e827093ea0177f0db796629e6bca43 Mon Sep 17 00:00:00 2001 From: Kevin Gurney Date: Mon, 18 Sep 2023 15:50:18 -0400 Subject: [PATCH 06/11] Update design document to remove mention of GoogleTest. --- matlab/doc/matlab_interface_for_apache_arrow_design.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matlab/doc/matlab_interface_for_apache_arrow_design.md b/matlab/doc/matlab_interface_for_apache_arrow_design.md index 79b43fd0251..8ded283f250 100644 --- a/matlab/doc/matlab_interface_for_apache_arrow_design.md +++ b/matlab/doc/matlab_interface_for_apache_arrow_design.md @@ -258,7 +258,7 @@ For large tables used in a multi-process "data processing pipeline", a user coul ## Testing To ensure code quality, we would like to include the following testing infrastructure, at a minimum: 1. C++ APIs - - GoogleTest C++ Unit Tests + - C++ Unit Tests - Integration with CI workflows 2. MATLAB APIs - [MATLAB Class-Based Unit Tests] From 8fce8c1f956e91685d6e0e70476c6b5d8c9c50bd Mon Sep 17 00:00:00 2001 From: Kevin Gurney Date: Mon, 18 Sep 2023 15:52:34 -0400 Subject: [PATCH 07/11] Remove mention of C++ tests and MATLAB_BUILD_TESTS flag from the README.md. --- matlab/README.md | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/matlab/README.md b/matlab/README.md index d6b08fbee1c..0a2bdf01f46 100644 --- a/matlab/README.md +++ b/matlab/README.md @@ -100,31 +100,12 @@ As part of the install step, the installation directory is added to the [MATLAB ## Test -There are two kinds of tests for the MATLAB Interface: MATLAB and C++. - -### MATLAB - To run the MATLAB tests, start MATLAB in the `arrow/matlab` directory and call the [`runtests`](https://mathworks.com/help/matlab/ref/runtests.html) command on the `test` directory with `IncludeSubFolders=true`: ``` matlab >> runtests("test", IncludeSubFolders=true); ``` -### C++ - -To enable the C++ tests, set the `MATLAB_BUILD_TESTS` flag to `ON` at build time: - -```console -$ cmake -S . -B build -D MATLAB_BUILD_TESTS=ON -$ cmake --build build --config Release -``` - -After building with the `MATLAB_BUILD_TESTS` flag enabled, the C++ tests can be run using [CTest](https://cmake.org/cmake/help/latest/manual/ctest.1.html): - -```console -$ ctest --test-dir build -``` - ## Usage Included below are some example code snippets that illustrate how to use the MATLAB interface. From b14c6636f1db372e4f1d6ff34b61abbb38e77584 Mon Sep 17 00:00:00 2001 From: Kevin Gurney Date: Mon, 18 Sep 2023 15:55:45 -0400 Subject: [PATCH 08/11] Remove MATLAB_BUILD_TESTS=ON and ctest call from matlab_build.sh CI script. Co-authored-by: Sarah Gilmore --- ci/scripts/matlab_build.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/ci/scripts/matlab_build.sh b/ci/scripts/matlab_build.sh index 235002da3af..d3f86adbb8a 100755 --- a/ci/scripts/matlab_build.sh +++ b/ci/scripts/matlab_build.sh @@ -29,8 +29,6 @@ cmake \ -S ${source_dir} \ -B ${build_dir} \ -G Ninja \ - -D MATLAB_BUILD_TESTS=ON \ -D CMAKE_INSTALL_PREFIX=${install_dir} \ -D MATLAB_ADD_INSTALL_DIR_TO_SEARCH_PATH=OFF cmake --build ${build_dir} --config Release --target install -ctest --test-dir ${build_dir} From 078f96df381084966e350b3f72541cd818d035f3 Mon Sep 17 00:00:00 2001 From: Kevin Gurney Date: Mon, 18 Sep 2023 16:40:01 -0400 Subject: [PATCH 09/11] Fix typo. --- matlab/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matlab/CMakeLists.txt b/matlab/CMakeLists.txt index 62fd6cf930e..5ee19235ad9 100644 --- a/matlab/CMakeLists.txt +++ b/matlab/CMakeLists.txt @@ -17,7 +17,7 @@ cmake_minimum_required(VERSION 3.20) -# Build the Arrow C++ libraries as using ExternalProject_Add. +# Build the Arrow C++ libraries using ExternalProject_Add. function(build_arrow) set(options) set(one_value_args) From a7f41b246ce93ef787f98bc2491490c46c6b9a7d Mon Sep 17 00:00:00 2001 From: Kevin Gurney Date: Mon, 18 Sep 2023 17:20:58 -0400 Subject: [PATCH 10/11] Fix CMake linting error. --- matlab/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matlab/CMakeLists.txt b/matlab/CMakeLists.txt index 5ee19235ad9..c8100a389ac 100644 --- a/matlab/CMakeLists.txt +++ b/matlab/CMakeLists.txt @@ -127,7 +127,7 @@ endif() find_package(Arrow QUIET) if(NOT Arrow_FOUND) - build_arrow() + build_arrow() endif() # MATLAB is Required From a9d7622293b64b431aa6f19f20da1d7048f3434a Mon Sep 17 00:00:00 2001 From: Kevin Gurney Date: Tue, 19 Sep 2023 13:42:06 -0400 Subject: [PATCH 11/11] 1. Modify testing section. 2. Add a note about testing internal C++ code via MEX function calls. --- .../doc/matlab_interface_for_apache_arrow_design.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/matlab/doc/matlab_interface_for_apache_arrow_design.md b/matlab/doc/matlab_interface_for_apache_arrow_design.md index 8ded283f250..17c7ba254c0 100644 --- a/matlab/doc/matlab_interface_for_apache_arrow_design.md +++ b/matlab/doc/matlab_interface_for_apache_arrow_design.md @@ -257,14 +257,13 @@ For large tables used in a multi-process "data processing pipeline", a user coul ## Testing To ensure code quality, we would like to include the following testing infrastructure, at a minimum: -1. C++ APIs - - C++ Unit Tests - - Integration with CI workflows -2. MATLAB APIs - - [MATLAB Class-Based Unit Tests] - - Integration with CI workflows + +1. [MATLAB Class-Based Unit Tests] +2. [MATLAB CI Workflows] 3. [Integration Testing] +**Note**: To test internal C++ code, we can use a [MEX function] to call the C++ code from a MATLAB Class-Based Unit Test. + ## Documentation To ensure usability, discoverability, and accessibility, we would like to include high quality documentation for the MATLAB Interface for Apache Arrow. @@ -318,3 +317,4 @@ The table below provides a high-level roadmap for the development of specific ca [`apache-arrow` package via the `npm` package manager]: https://www.npmjs.com/package/apache-arrow [Rust user]: https://github.com/apache/arrow-rs [`arrow` crate via the `cargo` package manager]: https://crates.io/crates/arrow +[MATLAB CI Workflows]: https://github.com/apache/arrow/actions/workflows/matlab.yml