Skip to content

Commit cc99279

Browse files
authored
Merge pull request #26 from psavery/nsls2-q3
Q3 Features and Fixes
2 parents ff9dd5b + 1ceeecb commit cc99279

657 files changed

Lines changed: 60874 additions & 18893 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build_and_test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: build and test
22

33
on:
44
push:
5-
branches: [ master ]
5+
branches: [ master, 3.0 ]
66
pull_request:
7-
branches: [ master ]
7+
branches: [ master, 3.0 ]
88

99
jobs:
1010
test:
@@ -91,7 +91,7 @@ jobs:
9191
TOMVIZ_REQUIRE_PYXRF: true
9292
run: |
9393
cd tomviz-build
94-
export TOMVIZ_TEST_PYTHON_EXECUTABLE=$(which python3)
94+
export TOMVIZ_TEST_PYTHON_EXECUTABLE=$(which python)
9595
ctest --output-on-failure
9696
9797
- name: Upload CTest Log (On Failure Only)

.github/workflows/build_requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ libxml2-devel=2.14*
88
gtest
99
# This is needed for installing stuff on Python3.13
1010
setuptools
11+
pip

CMakeLists.txt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,12 @@ set(tomviz_js_binary_path "${tomviz_html_binary_dir}/tomviz.js")
5454
set(tomviz_html_binary_path "${tomviz_html_binary_dir}/tomviz.html")
5555
set(tomviz_web_install_dir "${INSTALL_DATA_DIR}/tomviz/web")
5656

57-
# Centrally set the grand exception for macOS...
5857
if(APPLE)
58+
option(TOMVIZ_MACOSX_BUNDLE "Build a macOS app bundle" ON)
59+
endif()
60+
61+
# Centrally set the grand exception for macOS...
62+
if(APPLE AND TOMVIZ_MACOSX_BUNDLE)
5963
set(MACOSX_BUNDLE_NAME "tomviz")
6064
set(prefix "Applications/${MACOSX_BUNDLE_NAME}.app/Contents")
6165
set(INSTALL_INCLUDE_DIR "${prefix}/${INSTALL_INCLUDE_DIR}")
@@ -102,8 +106,8 @@ include(Git)
102106
determine_version("${tomviz_SOURCE_DIR}" "${GIT_EXECUTABLE}" "tomviz")
103107
# Hard coded for source tarballs, releases, etc.
104108
set(tomviz_version_major 2)
105-
set(tomviz_version_minor 0)
106-
set(tomviz_version_patch 0)
109+
set(tomviz_version_minor 3)
110+
set(tomviz_version_patch 1)
107111
set(tomviz_version_extra)
108112
set(tomviz_version
109113
"${tomviz_version_major}.${tomviz_version_minor}.${tomviz_version_patch}")

cmake/tomvizDetermineVersion.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function(determine_version source_dir git_command var_prefix)
4040
if (NOT TOMVIZ_GIT_DESCRIBE)
4141
if (EXISTS ${git_command})
4242
execute_process(
43-
COMMAND ${git_command} describe
43+
COMMAND ${git_command} describe --tags
4444
WORKING_DIRECTORY ${source_dir}
4545
RESULT_VARIABLE result
4646
OUTPUT_VARIABLE output

tests/cxx/CMakeLists.txt

Lines changed: 40 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ include_directories(SYSTEM
99
${PARAVIEW_INCLUDE_DIRS}
1010
${GTEST_INCLUDE_DIRS})
1111
include_directories(${PROJECT_SOURCE_DIR}/tomviz)
12-
include_directories(${PROJECT_SOURCE_DIR}/tomviz/modules)
13-
include_directories(${PROJECT_SOURCE_DIR}/tomviz/operators)
12+
include_directories(${PROJECT_SOURCE_DIR}/tomviz/pipeline)
1413
include_directories(${PROJECT_SOURCE_DIR}/tomviz/animations)
1514
include_directories(${PROJECT_SOURCE_DIR}/tomviz/loguru)
1615
include_directories(${PROJECT_SOURCE_DIR}/tomviz/acquisition)
@@ -51,20 +50,18 @@ set(_pythonpath "${_pythonpath}${_separator}${ITK_DIR}/Wrapping/Generators/Pytho
5150
set(_pythonpath "${_pythonpath}${_separator}$ENV{PYTHONPATH}")
5251

5352
# Add the test cases
54-
add_cxx_test(OperatorPython PYTHONPATH ${_pythonpath})
53+
# OperatorPython, ModulePlot, PipelineExecution, DockerUtilities test legacy
54+
# infrastructure (legacy::OperatorPython / legacy modules / legacy Pipeline)
55+
# that's being removed and are no longer kept in sync.
5556
add_cxx_test(Variant)
5657
add_cxx_test(ScanID)
5758
add_cxx_test(Utilities)
58-
add_cxx_qtest(ModulePlot)
59-
add_cxx_qtest(Tvh5Data)
6059
add_cxx_qtest(InterfaceBuilder)
61-
add_cxx_qtest(PipelineExecution PYTHONPATH ${_pythonpath})
62-
if(UNIX AND NOT APPLE)
63-
add_cxx_qtest(DockerUtilities)
64-
endif()
65-
if(NOT WIN32)
66-
add_cxx_qtest(AcquisitionClient PYTHONPATH "${CMAKE_SOURCE_DIR}/acquisition")
67-
endif()
60+
# AcquisitionClient needs the `bottle` Python package (acquisition/requirements-dev.txt)
61+
# to start its test server; not part of the conda build env, so disabled here.
62+
# if(NOT WIN32)
63+
# add_cxx_qtest(AcquisitionClient PYTHONPATH "${CMAKE_SOURCE_DIR}/acquisition")
64+
# endif()
6865
add_cxx_qtest(PtychoWorkflow PYTHONPATH ${_pythonpath})
6966
set_tests_properties(PtychoWorkflow PROPERTIES TIMEOUT 1800)
7067
add_cxx_qtest(PyXRFWorkflow PYTHONPATH ${_pythonpath})
@@ -74,3 +71,34 @@ set_tests_properties(PyXRFWorkflow PROPERTIES TIMEOUT 1800)
7471
create_test_executable(tomvizTests)
7572

7673
target_link_libraries(tomvizTests Qt6::Test)
74+
75+
# Pipeline library tests
76+
set(_pipeline_pythonpath
77+
"${PROJECT_SOURCE_DIR}/tomviz/python${_separator}${_pythonpath}")
78+
add_executable(pipelineLibTests PipelineLibTest.cxx)
79+
target_link_libraries(pipelineLibTests
80+
tomvizlib pybind11::embed GTest::gtest
81+
Qt6::Test ${EXTRA_LINK_LIB})
82+
target_compile_definitions(pipelineLibTests PRIVATE
83+
"TOMVIZ_PYTHON_DIR=\"${PROJECT_SOURCE_DIR}/tomviz/python\"")
84+
add_test(NAME "PipelineLib" COMMAND pipelineLibTests)
85+
set_tests_properties("PipelineLib" PROPERTIES
86+
ENVIRONMENT "PYTHONPATH=${_pipeline_pythonpath}")
87+
88+
# Pipeline icon resources (must be compiled into each executable, not the
89+
# static library, so Qt's resource system can initialise them).
90+
set(PIPELINE_ICONS_QRC "${PROJECT_SOURCE_DIR}/tomviz/pipeline/pipeline_icons.qrc")
91+
92+
# Manual demo app for visually testing PipelineStripWidget
93+
add_executable(pipelineStripDemo PipelineStripWidgetDemo.cxx ${PIPELINE_ICONS_QRC})
94+
target_link_libraries(pipelineStripDemo tomvizlib)
95+
96+
# Manual demo app for visually testing pipeline Sinks with ParaView views
97+
add_executable(pipelineSinkDemo PipelineSinkDemo.cxx ${PIPELINE_ICONS_QRC})
98+
target_link_libraries(pipelineSinkDemo tomvizlib)
99+
100+
# Manual demo app with full pipeline: source -> transform -> 3 sinks + properties
101+
add_executable(pipelineDemo PipelineDemo.cxx ${PIPELINE_ICONS_QRC})
102+
target_compile_definitions(pipelineDemo PRIVATE
103+
"TOMVIZ_PYTHON_DIR=\"${PROJECT_SOURCE_DIR}/tomviz/python\"")
104+
target_link_libraries(pipelineDemo tomvizlib)

tests/cxx/DockerUtilitiesTest.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include <QTemporaryDir>
99
#include <QTest>
1010

11-
#include "DockerUtilities.h"
11+
#include "legacy/DockerUtilities.h"
1212

1313
using namespace tomviz;
1414

tests/cxx/ModulePlotTest.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
#include <vtkNew.h>
2020
#include <vtkTable.h>
2121

22-
#include "modules/ModulePlot.h"
23-
#include "operators/OperatorResult.h"
22+
#include "legacy/modules/ModulePlot.h"
23+
#include "legacy/operators/OperatorResult.h"
2424

2525
using namespace tomviz;
2626

tests/cxx/OperatorPythonTest.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
#include <QSignalSpy>
2121
#include <QString>
2222

23-
#include "PipelineProxy.h"
23+
#include "legacy/PipelineProxy.h"
2424
#include "TomvizTest.h"
25-
#include "operators/OperatorProxy.h"
26-
#include "operators/OperatorPython.h"
25+
#include "legacy/operators/OperatorProxy.h"
26+
#include "legacy/operators/OperatorPython.h"
2727

2828
using namespace tomviz;
2929

0 commit comments

Comments
 (0)