Merge branch 'developer' into dev/refactor_caller_tests_master_attributes
Build on RHEL9 docker image / build (push) Successful in 3m50s
Build on RHEL8 docker image / build (push) Successful in 4m59s
Run Simulator Tests on local RHEL9 / build (push) Failing after 6m57s
Run Simulator Tests on local RHEL8 / build (push) Failing after 8m48s

This commit is contained in:
2026-05-28 23:24:01 +02:00
committed by GitHub
15 changed files with 68 additions and 61 deletions
+3 -3
View File
@@ -35,7 +35,7 @@ jobs:
shell: "bash -l {0}"
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
fetch-depth: 0 # Fetch all history for proper git operations
token: ${{ secrets.GITHUB_TOKEN }} # Use the default token
@@ -58,7 +58,7 @@ jobs:
version: 1.0
- name: Setup Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: 3.12
cache: 'pip'
@@ -84,7 +84,7 @@ jobs:
--date "$(date +'%d.%m.%Y')"
- name: Checkout gh-pages
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
ref: gh-pages
path: gh-pages
+5 -5
View File
@@ -20,12 +20,12 @@ jobs:
os: [ubuntu-latest,]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Build wheels
run: pipx run cibuildwheel==3.2.1
- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v7
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl
@@ -34,12 +34,12 @@ jobs:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Build sdist
run: pipx run build --sdist
- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v7
with:
name: cibw-sdist
path: dist/*.tar.gz
@@ -54,7 +54,7 @@ jobs:
# or, alternatively, upload to PyPI on every tag starting with 'v' (remove on: release above to use this)
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v7
with:
# unpacks all CIBW artifacts into dist/
pattern: cibw-*
+2 -2
View File
@@ -14,8 +14,8 @@ jobs:
runs-on: ubuntu-latest
name: Configure and build using cmake
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: 3.12
cache: 'pip'
+4 -4
View File
@@ -21,10 +21,10 @@ jobs:
shell: "bash -l {0}"
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Get conda
uses: conda-incubator/setup-miniconda@v3.0.4
uses: conda-incubator/setup-miniconda@v4
with:
python-version: ${{ matrix.python-version }}
channels: conda-forge
@@ -38,10 +38,10 @@ jobs:
- name: Build
env:
CONDA_TOKEN: ${{ secrets.CONDA_TOKEN }}
run: conda build conda-recipes/main-library --user slsdetectorgroup --token ${CONDA_TOKEN} --output-folder build_output
run: conda-build conda-recipes/main-library --user slsdetectorgroup --token ${CONDA_TOKEN} --output-folder build_output
- name: Upload all Conda to github as artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: conda-packages
path: build_output/** # Uploads all packages
+4 -4
View File
@@ -21,10 +21,10 @@ jobs:
shell: "bash -l {0}"
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Get conda
uses: conda-incubator/setup-miniconda@v3.0.4
uses: conda-incubator/setup-miniconda@v4
with:
python-version: ${{ matrix.python-version }}
channels: conda-forge
@@ -38,10 +38,10 @@ jobs:
- name: Build
env:
CONDA_TOKEN: ${{ secrets.CONDA_TOKEN }}
run: conda build conda-recipes/python-client --user slsdetectorgroup --token ${CONDA_TOKEN} --output-folder build_output
run: conda-build conda-recipes/python-client --user slsdetectorgroup --token ${CONDA_TOKEN} --output-folder build_output
- name: Upload all Conda packages
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: conda-packages
path: build_output/** # Uploads all packages
+4 -4
View File
@@ -18,10 +18,10 @@ jobs:
shell: "bash -l {0}"
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Get conda
uses: conda-incubator/setup-miniconda@v3.0.4
uses: conda-incubator/setup-miniconda@v4
with:
python-version: ${{ matrix.python-version }}
channels: conda-forge
@@ -33,10 +33,10 @@ jobs:
run: conda config --set anaconda_upload no
- name: Build
run: conda build conda-recipes/main-library --output-folder build_output
run: conda-build conda-recipes/main-library --output-folder build_output
- name: Upload all Conda packages
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: conda-packages
path: build_output/** # Uploads all packages
+4 -4
View File
@@ -18,10 +18,10 @@ jobs:
shell: "bash -l {0}"
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Get conda
uses: conda-incubator/setup-miniconda@v3.0.4
uses: conda-incubator/setup-miniconda@v4
with:
python-version: ${{ matrix.python-version }}
channels: conda-forge
@@ -33,10 +33,10 @@ jobs:
run: conda config --set anaconda_upload no
- name: Build
run: conda build conda-recipes/python-client --output-folder build_output
run: conda-build conda-recipes/python-client --output-folder build_output
- name: Upload all Conda packages
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: conda-packages
path: build_output/** # Uploads all packages
+1 -12
View File
@@ -209,22 +209,11 @@ else()
URL ${CMAKE_CURRENT_SOURCE_DIR}/libs/fmt/fmt-12.1.0.tar.gz
# Compute hash: md5sum fmt-12.1.0.tar.gz
URL_HASH MD5=92eb6f492e4838e5f024ce5207beafc7)
set(FMT_INSTALL ON CACHE BOOL "")
FetchContent_MakeAvailable(fmt)
set_property(TARGET fmt PROPERTY POSITION_INDEPENDENT_CODE ON)
endif()
# Export fmt
if(SLS_MASTER_PROJECT)
install(TARGETS fmt
EXPORT ${TARGETS_EXPORT_NAME}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)
endif()
option(SLS_USE_HDF5 "HDF5 File format" OFF)
option(SLS_BUILD_SHARED_LIBRARIES "Build shared libaries" OFF)
option(SLS_USE_TEXTCLIENT "Text Client" ON)
+1 -1
View File
@@ -6,7 +6,7 @@ mkdir -p $PREFIX/bin
mkdir -p $PREFIX/include/sls
#Shared and static libraries
cp build/install/lib/* $PREFIX/lib/
cp -r build/install/lib/* $PREFIX/lib/
#Binaries
cp build/install/bin/sls_detector_acquire $PREFIX/bin/.
+11 -6
View File
@@ -827,16 +827,21 @@ class Detector(CppDetectorApi):
@property
@element
def txdelay(self):
"""
r"""
[Eiger][Jungfrau][Moench][Mythen3] Set transmission delay for all modules in the detector using the step size provided.
Note
----
Sets up the following for every module:\n
\t\t[Eiger] txdelay_left to (2 \* mod_index \* n_delay), \n
\t\t[Eiger] txdelay_right to ((2 \* mod_index + 1) \* n_delay) and \n
\t\t[Eiger] txdelay_frame to (2 \* num_modules \* n_delay) \n
\t\t[Jungfrau][Moench][Mythen3] txdelay_frame to (num_modules \* n_delay)\n\n
Sets up the following for every module:
[Eiger] txdelay_left to (2 \* mod_index \* n_delay),
[Eiger] txdelay_right to ((2 \* mod_index + 1) \* n_delay) and
[Eiger] txdelay_frame to (2 \* num_modules \* n_delay)
[Jungfrau][Moench][Mythen3] txdelay_frame to (num_modules \* n_delay)
Please refer txdelay_left, txdelay_right and txdelay_frame for details.
"""
return self.getTransmissionDelay()
+12
View File
@@ -27,6 +27,12 @@ void init_enums(py::module &m) {
.value("GOTTHARD2", slsDetectorDefs::detectorType::GOTTHARD2)
.value("XILINX_CHIPTESTBOARD",
slsDetectorDefs::detectorType::XILINX_CHIPTESTBOARD)
.value("MATTERHORN", slsDetectorDefs::detectorType::MATTERHORN)
.export_values();
py::enum_<slsDetectorDefs::ReturnCode>(Defs, "ReturnCode")
.value("OK", slsDetectorDefs::ReturnCode::OK)
.value("FAIL", slsDetectorDefs::ReturnCode::FAIL)
.export_values();
py::enum_<slsDetectorDefs::boolFormat>(Defs, "boolFormat")
@@ -50,6 +56,12 @@ void init_enums(py::module &m) {
.value("Y", slsDetectorDefs::dimension::Y)
.export_values();
py::enum_<slsDetectorDefs::FrequencyUnit>(Defs, "FrequencyUnit")
.value("Hz", slsDetectorDefs::FrequencyUnit::Hz)
.value("kHz", slsDetectorDefs::FrequencyUnit::kHz)
.value("MHz", slsDetectorDefs::FrequencyUnit::MHz)
.export_values();
py::enum_<slsDetectorDefs::frameDiscardPolicy>(Defs, "frameDiscardPolicy")
.value("NO_DISCARD", slsDetectorDefs::frameDiscardPolicy::NO_DISCARD)
.value("DISCARD_EMPTY_FRAMES",
@@ -25,6 +25,8 @@ struct UDPInfo {
uint32_t dstip{};
};
using ReturnCode = slsDetectorDefs::ReturnCode;
template <typename DerivedDetectorServer> class DetectorServer {
public:
@@ -19,8 +19,8 @@ class TCPInterface {
public:
~TCPInterface();
TCPInterface(std::function<ReturnCode(const detFuncs &, ServerInterface &)>
&processFunction_,
TCPInterface(std::function<slsDetectorDefs::ReturnCode(
const detFuncs &, ServerInterface &)> &processFunction_,
const uint16_t portNumber = DEFAULT_TCP_CNTRL_PORTNO);
/// @brief creates tcp thread
@@ -40,11 +40,12 @@ class TCPInterface {
* @param function_id The ID of the function recived by the server and to
* be executed
*/
ReturnCode processReceivedData(const detFuncs function_id,
ServerInterface &socket);
slsDetectorDefs::ReturnCode processReceivedData(const detFuncs function_id,
ServerInterface &socket);
/// @brief map of function IDs and corresponding functions
std::function<ReturnCode(const detFuncs &, ServerInterface &)>
std::function<slsDetectorDefs::ReturnCode(const detFuncs &,
ServerInterface &)>
processFunction;
/// @brief TCP/IP port number for the detector server
@@ -8,8 +8,8 @@
namespace sls {
TCPInterface::TCPInterface(
std::function<ReturnCode(const detFuncs &, ServerInterface &)>
&processFunction_,
std::function<slsDetectorDefs::ReturnCode(
const detFuncs &, ServerInterface &)> &processFunction_,
const uint16_t portNumber_)
: processFunction(processFunction_), portNumber(portNumber_),
server(portNumber_) {
@@ -53,7 +53,7 @@ void TCPInterface::startTCPServerClientConnection() {
auto returncode = processReceivedData(
static_cast<detFuncs>(function_id), socket);
if (returncode == FAIL) {
if (returncode == slsDetectorDefs::ReturnCode::FAIL) {
throw RuntimeError(fmt::format(
"Error processing command with fnum: {}",
getFunctionNameFromEnum((enum detFuncs)function_id)));
@@ -76,14 +76,16 @@ void TCPInterface::startTCPServerClientConnection() {
LOG(logINFOBLUE) << "Exiting TCP Server";
}
ReturnCode TCPInterface::processReceivedData(const detFuncs function_id,
ServerInterface &socket) {
slsDetectorDefs::ReturnCode
TCPInterface::processReceivedData(const detFuncs function_id,
ServerInterface &socket) {
LOG(logDEBUG1) << "calling function fnum: " << function_id << " ("
<< getFunctionNameFromEnum((enum detFuncs)function_id)
<< ")";
ReturnCode returncode = processFunction(function_id, socket);
slsDetectorDefs::ReturnCode returncode =
processFunction(function_id, socket);
LOG(logDEBUG1) << "Function "
<< getFunctionNameFromEnum((enum detFuncs)function_id)
@@ -89,9 +89,6 @@
// NOLINTEND(cppcoreguidelines-macro-usage)
#ifdef __cplusplus
// TODO: why are all these defs inside a class? - why not static
enum ReturnCode { OK = 0, FAIL = 1 };
class slsDetectorDefs {
public:
#endif
@@ -111,8 +108,7 @@ class slsDetectorDefs {
// slsDetectorDefs instead of grouped in a class
};
/** return values */
enum { OK, FAIL };
enum ReturnCode { OK, FAIL };
enum boolFormat { TrueFalse, OnOff, OneZero };