Skip to content

Commit c0853a5

Browse files
authored
Merge pull request #8 from psavery/pyxrf-workflow
Updates to PyXRF Workflow
2 parents 1231f3f + 2ac3122 commit c0853a5

105 files changed

Lines changed: 5932 additions & 613 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: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
test:
11-
name: ${{ matrix.config.name }} (Python ${{ matrix.python-version}})
11+
name: ${{ matrix.config.name }} (Python ${{ matrix.python-version }})
1212
runs-on: ${{ matrix.config.os }}
1313
strategy:
1414
fail-fast: false
@@ -67,13 +67,18 @@ jobs:
6767
pip install --no-build-isolation --no-deps -U tomviz/acquisition
6868
6969
- name: Run Tests
70+
env:
71+
# Make sure the Qt tests run offscreen
72+
QT_QPA_PLATFORM: offscreen
73+
TOMVIZ_REQUIRE_PYXRF: true
7074
run: |
7175
cd tomviz-build
72-
TOMVIZ_TEST_PYTHON_EXECUTABLE=$(which python3) ctest --output-on-failure
76+
export TOMVIZ_TEST_PYTHON_EXECUTABLE=$(which python3)
77+
ctest --output-on-failure
7378
7479
- name: Upload CTest Log (On Failure Only)
7580
if: ${{ failure() }}
7681
uses: actions/upload-artifact@v4
7782
with:
78-
name: TomvizCTestLog.log
83+
name: TomvizCTestLog_${{ matrix.config.name }}_Py${{ matrix.python-version }}.log
7984
path: tomviz-build/Testing/Temporary/LastTest.log

.github/workflows/runtime_requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ pygments
99
pystackreg
1010
# These are PyXRF workflow dependencies
1111
h5py
12+
hxntools
1213
pyxrf
1314
xrf-tomo
1415
xraylib

BUILDING.md

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Building Tomviz
22
===============
33

4-
Building Tomviz is an advanced process that requires compiling ParaView,
5-
as well as ensuring all necessary dependencies are in place. Most users
4+
Building Tomviz can be an advanced process that requires
5+
ensuring that all necessary dependencies are in place. Most users
66
ought to install Tomviz from the conda-forge packages rather than
77
building it. These instructions are primarily for developers who wish
88
to make contributions.
@@ -16,14 +16,10 @@ conda create -n tomviz -y
1616
conda activate tomviz
1717
```
1818

19-
First, we need to ensure that ParaView and tomviz are cloned into the
20-
current repository. Run the following bash code to do so:
19+
First, we need to ensure that tomviz is cloned into the current repository.
20+
Run the following bash code to do so:
2121

2222
```bash
23-
if ! [ -e "paraview" ]; then
24-
git clone -b v6.0.1 --recursive https://gitlab.kitware.com/paraview/paraview
25-
fi
26-
2723
if ! [ -e "tomviz" ]; then
2824
git clone --recursive https://github.com/NSLS2/tomviz
2925
fi
@@ -36,12 +32,6 @@ conda-forge. Thus we will use those lists for installation.
3632
conda install -y --override-channels -c conda-forge --file tomviz/.github/workflows/build_requirements.txt
3733
```
3834

39-
Next, build ParaView. This may take some time.
40-
41-
```bash
42-
bash tomviz/.github/workflows/scripts/build_paraview.sh
43-
```
44-
4535
Now, build Tomviz.
4636

4737
```bash
@@ -65,19 +55,14 @@ Tomviz may then be ran as follows:
6555
All of the build instructions above put into a single script are as follows:
6656

6757
```bash
68-
if ! [ -e "paraview" ]; then
69-
git clone -b v6.0.1 --recursive https://gitlab.kitware.com/paraview/paraview
70-
fi
71-
7258
if ! [ -e "tomviz" ]; then
7359
git clone --recursive https://github.com/NSLS2/tomviz
7460
fi
7561

7662
# Install build requirements
7763
conda install -y --override-channels -c conda-forge --file tomviz/.github/workflows/build_requirements.txt
7864

79-
# Build ParaView and Tomviz
80-
bash tomviz/.github/workflows/scripts/build_paraview.sh
65+
# Build Tomviz
8166
bash tomviz/.github/workflows/scripts/build_tomviz.sh
8267

8368
# Install runtime dependencies

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ file(RELATIVE_PATH
8989
set(CMAKE_MODULE_PATH "${tomviz_SOURCE_DIR}/cmake")
9090

9191
# Request C++11 standard, using new CMake variables.
92-
set(CMAKE_CXX_STANDARD 11)
92+
set(CMAKE_CXX_STANDARD 17)
9393
set(CMAKE_CXX_STANDARD_REQUIRED True)
9494
set(CMAKE_CXX_EXTENSIONS False)
9595

@@ -146,7 +146,7 @@ endif()
146146

147147
find_package(ITK 4.9)
148148

149-
set(PYBIND11_CPP_STANDARD "-std=c++11" CACHE STRING "")
149+
set(PYBIND11_CPP_STANDARD "-std=c++17" CACHE STRING "")
150150
add_subdirectory(${PROJECT_SOURCE_DIR}/thirdparty/pybind11)
151151

152152
option(tomviz_ENABLE_LOOKING_GLASS "Enable the looking glass plugin" OFF)

acquisition/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
},
3131
entry_points={
3232
'console_scripts': [
33-
'tomviz-acquisition = tomviz.acquisition.cli:main',
33+
'tomviz-acquisition = tomviz_acquisition.acquisition.cli:main',
3434
'tomviz-tiltseries-writer = tests.mock.tiltseries.writer:main'
3535
]
3636
}

acquisition/tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from threading import Thread
55
from bottle import default_app, WSGIRefServer
66

7-
from tomviz.acquisition import server
7+
from tomviz_acquisition.acquisition import server
88
from .mock.tiltseries import TIFFWriter, DM3Writer
99

1010

acquisition/tests/fei_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@
44
import sys
55
import os
66

7-
from tomviz.jsonrpc import jsonrpc_message
7+
from tomviz_acquisition.jsonrpc import jsonrpc_message
88

99
# Add mock modules to path
10-
mock_dir = os.path.join(os.path.dirname(__file__), '..', 'tomviz',
10+
mock_dir = os.path.join(os.path.dirname(__file__), '..', 'tomviz_acquisition',
1111
'acquisition', 'vendors', 'fei', 'mock')
1212
sys.path.append(mock_dir)
1313

1414

1515
@pytest.fixture(scope="module")
1616
def fei_acquisition_server(acquisition_server):
17-
acquisition_server.setup('tomviz.acquisition.vendors.fei.FeiAdapter')
17+
acquisition_server.setup('tomviz_acquisition.acquisition.vendors.fei.FeiAdapter')
1818
yield acquisition_server
1919

2020

acquisition/tests/fixtures/source1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import tempfile
22
import os
3-
from tomviz.acquisition import AbstractSource
3+
from tomviz_acquisition.acquisition import AbstractSource
44

55

66
class ApiAdapter1(AbstractSource):

acquisition/tests/fixtures/source2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import tempfile
22
import os
3-
from tomviz.acquisition import AbstractSource
3+
from tomviz_acquisition.acquisition import AbstractSource
44

55

66
class ApiAdapter2(AbstractSource):

acquisition/tests/jsonrpc_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import pytest
22

3-
from tomviz.jsonrpc import JsonRpcHandler, jsonrpc_message
3+
from tomviz_acquisition.jsonrpc import JsonRpcHandler, jsonrpc_message
44

55

66
@pytest.fixture

0 commit comments

Comments
 (0)