Merge branch 'developer' into dev/release_notes_template

This commit is contained in:
Erik Fröjdh authored and GitHub committed 2026-11-24 17:30:13 +01:00
commit fd08daec66
13 files changed
+55 -17

No files matched your search

+1 -1
View File
@@ -10,7 +10,7 @@ env:
jobs:
build:
runs-on: ubuntu-24.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
+2 -2
View File
@@ -59,7 +59,7 @@ endif()
# Patch libzmq to set minimum cmake version to 3.15 to avoid warnings
# with newer cmake versions
# Patch is applied in the FetchContent_Declare
set(SLS_LIBZMQ_VERSION "4.3.4")
set(SLS_LIBZMQ_VERSION "4.3.5")
find_program(PATCH_EXECUTABLE patch)
if(NOT PATCH_EXECUTABLE)
@@ -141,7 +141,7 @@ else()
FetchContent_Declare(
libzmq
URL ${CMAKE_CURRENT_SOURCE_DIR}/libs/libzmq/libzmq-${SLS_LIBZMQ_VERSION}.tar.gz
URL_HASH MD5=cc20b769ac10afa352e5ed2769bb23b3
URL_HASH MD5=cfb80c6ad694cacc2f7c99bf44e8b686
PATCH_COMMAND ${CMAKE_COMMAND} -E chdir <SOURCE_DIR> patch -p1 < ${CMAKE_CURRENT_SOURCE_DIR}/libs/libzmq/libzmq_cmake_version.patch
UPDATE_DISCONNECTED 1
)
+3 -3
View File
@@ -87,7 +87,7 @@ To use the basic building blocks, meaning sls_detector_get/put and the shared li
Additionally the core requires the following dependencies:
* fmt 12.1.0 (packaged in libs) (since version 11.0.0)
* ZeroMQ 4.3.4 (packaged in libs)
* ZeroMQ 4.3.5 (packaged in libs)
* rapidjson (packaged in libs)
> **Note:** Both fmt, ZeroMQ and rapidjson are bundled in libs. One does not need to pre-install them on the system. Alternatively, one can fetch fmt and ZeroMQ from GitHub by passing the cmake options ``-DSLS_FETCH_FMT_FROM_GITHUB=ON`` and ``-DSLS_FETCH_ZEROMQ_FROM_GITHUB=ON`` respectively.
@@ -351,8 +351,8 @@ git submodule update --init
### Zeromq
**v8.0.0+**:
zeromq (v4.3.4) is built
* by default from tar file in repo (libs/libzmq/libzmq-4.3.4.tar.gz)
zeromq (v4.3.5) is built
* by default from tar file in repo (libs/libzmq/libzmq-4.3.5.tar.gz)
* or use advanced option SLS_FETCH_ZMQ_FROM_GITHUB [link].
**v7.x.x and older**:
+4
View File
@@ -9,6 +9,10 @@ package:
build:
number: 0
script:
# gcc_linux-64 16.2.0 build 3 passes bare tool names in CMAKE_ARGS
# (-DCMAKE_AR=x86_64-conda-linux-gnu-ar), which CMake resolves relative to
# SRC_DIR. Restore the full paths; no-op when they are already absolute.
- 'export CMAKE_ARGS="${CMAKE_ARGS//=${HOST}-/=${BUILD_PREFIX}/bin/${HOST}-}"' # [not win]
- unset CMAKE_GENERATOR && {{ PYTHON }} -m pip install . -vv --config-settings=cmake.define.SLS_USE_SYSTEM_ZMQ=ON # [not win]
requirements:
+1 -1
View File
@@ -24,7 +24,7 @@ the shared libraries these are needed:
Additionally the core requires the following dependencies:
* fmt 12.1.0 (packaged in libs)
* ZeroMQ 4.3.4 (packaged in libs)
* ZeroMQ 4.3.5 (packaged in libs)
* rapidjson 1.1.0 (packaged in libs)
.. note::
+2 -2
View File
@@ -425,8 +425,8 @@ is to use conda
| **Zeromq**
| v8.0.0+:
| zeromq (v4.3.4) is built
| * by default from tar file in repo (libs/libzmq/libzmq-4.3.4.tar.gz)
| zeromq (v4.3.5) is built
| * by default from tar file in repo (libs/libzmq/libzmq-4.3.5.tar.gz)
| * or use advanced option SLS_FETCH_ZMQ_FROM_GITHUB [`link <https://github.com/zeromq/libzmq.git>`__].
|
| v7.x.x and older:
Binary file not shown.
Binary file not shown.
+3 -2
View File
@@ -1,11 +1,12 @@
[tool.scikit-build.metadata.version]
[[tool.dynamic-metadata]]
provider = "scikit_build_core.metadata.regex"
field = "version"
input = "VERSION"
regex = '^(?P<version>\d+(?:\.\d+)*(?:[\.\+\w]+)?)$'
result = "{version}"
[build-system]
requires = [ "scikit-build-core>=0.10", "pybind11", "numpy",]
requires = [ "scikit-build-core>=1.1", "pybind11", "numpy",]
build-backend = "scikit_build_core.build"
[project]
+4 -4
View File
@@ -834,13 +834,13 @@ class Detector(CppDetectorApi):
----
Sets up the following for every module:
[Eiger] txdelay_left to (2 \* mod_index \* n_delay),
[Eiger] txdelay_left to (2 * mod_index * n_delay),
[Eiger] txdelay_right to ((2 \* mod_index + 1) \* n_delay) and
[Eiger] txdelay_right to ((2 * mod_index + 1) * n_delay) and
[Eiger] txdelay_frame to (2 \* num_modules \* n_delay)
[Eiger] txdelay_frame to (2 * num_modules * n_delay)
[Jungfrau][Moench][Mythen3] txdelay_frame to (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.
"""
+2
View File
@@ -960,6 +960,8 @@ void init_det(py::module &m) {
py::arg());
CppDetectorApi.def("clearRxROI",
(void(Detector::*)()) & Detector::clearRxROI);
CppDetectorApi.def("isCompleteRxRoi", (bool (Detector::*)() const) &
Detector::isCompleteRxRoi);
CppDetectorApi.def(
"getFileFormat",
(Result<defs::fileFormat>(Detector::*)(sls::Positions) const) &
@@ -8,11 +8,14 @@
#include "acquire/ExpectedState.h"
#include "acquire/FileState.h"
#include "checks/MasterFileChecks.h"
#include "tests/globals.h"
namespace sls {
namespace acq = sls::test::acquire;
namespace checks = sls::test::checks;
using test::GET;
using test::PUT;
void acquire_and_check_file_size(
Detector &det, std::optional<acq::CTBState> ctb_state = std::nullopt) {
@@ -270,4 +273,29 @@ TEST_CASE("acquire_check_binary_file_size",
REQUIRE_NOTHROW(acquire_and_check_file_size(det));
}
TEST_CASE("rx_start_fails_fpath_permissions", "[.detectorintegration]") {
Detector det;
Caller caller(&det);
auto det_type =
det.getDetectorType().tsquash("Inconsistent detector types to test");
// not needed to test for every detector type, just one is enough
if (det_type == defs::JUNGFRAU) {
std::vector<defs::fileFormat> formats{defs::BINARY};
#ifdef HDF5C
formats.push_back(defs::HDF5);
#endif
for (auto format : formats) {
INFO("File format: " << ToString(format));
auto file_state = acq::default_file_state();
file_state.file_format = format;
file_state.file_write = true;
// no write permission, rx_start fails later
file_state.file_path = "/";
acq::FileStateGuard file_guard(det, file_state);
REQUIRE_THROWS(caller.call("rx_start", {}, -1, PUT));
}
}
}
} // namespace sls
+5 -2
View File
@@ -136,7 +136,7 @@ void HDF5DataFile::CreateFile() {
'_' + std::to_string(fileIndex) + ".h5");
fileName = p.string();
std::lock_guard<std::mutex> lock(*hdf5Lib);
std::unique_lock<std::mutex> lock(*hdf5Lib);
uint64_t framestosave =
((maxFramesPerFile == 0) ? numImages : // infinite images
@@ -207,8 +207,11 @@ void HDF5DataFile::CreateFile() {
}
} catch (const H5::Exception &error) {
error.printErrorStack();
lock.unlock(); // CloseFile() also wants the mutex --> need to unlock
// here
CloseFile();
throw RuntimeError("Could not create HDF5 handles in object " + index);
throw RuntimeError("Could not create HDF5 handles in object " +
std::to_string(index));
}
if (!silentMode) {
LOG(logINFO) << "[" << udpPortNumber