Repository navigation
fix: chipstream-cli --recursive stopped at the first failed file - #17
Merged
paulmueller merged 1 commit intoNov 23, 2026
Merged
Conversation
- catch errors per file, continue with the next file, and list the failed files at the end (the failure counter never counted anything, because `process_dataset` raises instead of returning 1) - skip files whose `_dcn.rtdc` output file already exists instead of aborting the batch, so an interrupted batch can be resumed (dcnum only creates the output file after the pipeline completed) - invalid command-line arguments (`click.UsageError`) still abort, since they apply to all files Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #17 +/- ##
==========================================
+ Coverage 76.00% 77.37% +1.37%
==========================================
Files 19 19
Lines 1350 1370 +20
==========================================
+ Hits 1026 1060 +34
+ Misses 324 310 -14 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
paulmueller
approved these changes
Nov 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
In recursive mode (
-r), the first file that fails aborts the whole batch:process_datasetraisesclick.ClickExceptionon errors instead of returning 1, so the exception leaves the loop, all later files are skipped, and thefailedcounter never counts anything.<name>_dcn.rtdcoutput makes dcnum raiseFileExistsError, which aborts the batch, so an interrupted batch cannot be resumed by running the same command again.Observed with a directory containing
a_bad.rtdc(not an HDF5 file) andb_good.rtdc:b_good.rtdcis never processed.Fix
tryblock.click.ClickExceptionand other exceptions are reported for that file, and the loop continues. At the end, the failed files are listed and the exit code is 1.click.UsageError(invalid command-line arguments) still aborts, since it applies to all files.Running again on a directory where
a_dcn.rtdcexists:Tests
test_cli_recursive_continue_after_failure(with and withoutPATH_OUT): the valid file is processed after the invalid one, exit code 1, failure listed.test_cli_recursive_skip_existing_output(with and withoutPATH_OUT): the existing output is not touched, the other file is processed, exit code 0.test_cli_recursive_invalid_kwargs: an invalid-ksvalue still aborts the batch with a usage error (guards theclick.UsageErrorre-raise; it also passes onmain).The first two fail on
mainand pass with the fix (run with--debug). flake8 is clean; ruff shows no new errors.🤖 Generated with Claude Code