From c916cf8b2d7fb546a17a5d747bec0e99c157f0cb Mon Sep 17 00:00:00 2001 From: leonarski_f Date: Sun, 21 Jun 2026 16:46:56 +0200 Subject: [PATCH] tests: drop the serial [large] test (serial dataset not shipped) Only the ~1800-image rotation dataset is kept in LFS; a separate ~5000-image serial set is too large to ship, and the serial path can be exercised by running the rotation series in serial mode if needed. Removes JFJochProcess_LysoSerial and the serial entry from the start-up listener and README. The rotation [large] test now runs against the committed data and passes. Co-Authored-By: Claude Opus 4.8 --- tests/JFJochProcessLargeTest.cpp | 40 +------------------------------- tests/data/README.md | 25 ++++++++------------ 2 files changed, 11 insertions(+), 54 deletions(-) diff --git a/tests/JFJochProcessLargeTest.cpp b/tests/JFJochProcessLargeTest.cpp index e20fe7de..064d06ef 100644 --- a/tests/JFJochProcessLargeTest.cpp +++ b/tests/JFJochProcessLargeTest.cpp @@ -26,10 +26,8 @@ namespace { using Catch::EventListenerBase::EventListenerBase; void testRunStarting(Catch::TestRunInfo const &) override { const bool rot = jfjoch_test::LargeDataFile("lyso_rotation_master.h5").has_value(); - const bool ser = jfjoch_test::LargeDataFile("lyso_serial_master.h5").has_value(); - std::cout << "[jfjoch_test] large datasets in " << jfjoch_test::LargeDataDir() + std::cout << "[jfjoch_test] large dataset in " << jfjoch_test::LargeDataDir() << ": rotation=" << (rot ? "yes" : "no") - << " serial=" << (ser ? "yes" : "no") << " ([large] tests skip when absent)" << std::endl; } }; @@ -82,39 +80,3 @@ TEST_CASE("JFJochProcess_LysoRotation", "[large]") { reader.Close(); REQUIRE(H5Fget_obj_count(H5F_OBJ_ALL, H5F_OBJ_ALL) == 0); } - -TEST_CASE("JFJochProcess_LysoSerial", "[large]") { - const auto master = jfjoch_test::LargeDataFile("lyso_serial_master.h5"); - if (!master) - SKIP("lyso_serial_master.h5 not available (git-lfs data not pulled)"); - - RegisterHDF5Filter(); - JFJochHDF5Reader reader; - REQUIRE_NOTHROW(reader.ReadFile(*master)); - auto dataset = reader.GetDataset(); - REQUIRE(dataset); - - DiffractionExperiment experiment(dataset->experiment); - IndexingSettings indexing; - indexing.Algorithm(IndexingAlgorithmEnum::Auto); - indexing.GeomRefinementAlgorithm(GeomRefinementAlgorithmEnum::BeamCenter); - experiment.ImportIndexingSettings(indexing); - - ProcessConfig config; - config.mode = ProcessMode::FullAnalysis; - config.nthreads = default_threads(); - config.spot_finding = DiffractionExperiment::DefaultDataProcessingSettings(); - config.spot_finding.indexing = true; - - JFJochProcess process(reader, experiment, dataset->pixel_mask, config); - ProcessResult result; - REQUIRE_NOTHROW(result = process.Run()); - - CHECK_FALSE(result.cancelled); - CHECK(result.images_processed == reader.GetNumberOfImages()); - REQUIRE(result.indexing_rate.has_value()); - CHECK(result.indexing_rate.value() > 0.0f); // serial stills: at least some hits index - - reader.Close(); - REQUIRE(H5Fget_obj_count(H5F_OBJ_ALL, H5F_OBJ_ALL) == 0); -} diff --git a/tests/data/README.md b/tests/data/README.md index 9a711c5d..ccf842d5 100644 --- a/tests/data/README.md +++ b/tests/data/README.md @@ -16,20 +16,15 @@ git lfs install git lfs pull # or: git lfs pull --include "tests/data/*.h5" ``` -## Expected files +## Datasets -Place each dataset's master **and its `_data_NNNNNN.h5` files** in this directory: +| File | Dataset | Shipped | +|----------------------------|-----------------------------------------|-----------| +| `lyso_rotation_master.h5` | lysozyme rotation series (~1800 images) | yes (LFS) | -| File | Dataset | -|-------------------------------|------------------------------------------| -| `lyso_rotation_master.h5` | lysozyme rotation series (~1800 images) | -| `lyso_serial_master.h5` | lysozyme serial / jet stills (~5000 images) | - -To point the tests at an existing local dataset without copying, symlink it: - -``` -ln -s /path/to/your_master.h5 tests/data/lyso_rotation_master.h5 -ln -s /path/to/your_data_000001.h5 tests/data/... -``` - -(The master references its data files by relative name, so keep them side by side.) +`lyso_rotation_master.h5` (plus its `_data_NNNNNN.h5` files) is fetched by `git lfs pull` and +drives `JFJochProcess_LysoRotation`. A separate serial dataset is intentionally **not** shipped +to keep the repository small — the rotation series can be run in serial mode (full analysis +without rotation indexing) to exercise that path. To add your own dataset, drop the master + its +data files here as real files (not symlinks, if you intend to commit them via LFS); the master +references its data files by relative name, so keep them side by side.