Expose jackhammer function to programmatic use - #514
Conversation
Refactor hammer_func into a standalone hammer() function with explicit keyword args, so it can be called without argparse or interactive prompts. The CLI entrypoint now delegates to hammer() after confirmation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add timeouts to per-slot operations (carrier ping, EPICS connection, pysmurf setup) so that a single failing slot no longer blocks or aborts the remaining slots. hammer() now returns a dict of succeeded/failed slots with error messages. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tests exercise the three failure isolation points (carrier ping, EPICS connection, pysmurf setup) with mocked external dependencies, verifying that individual slot failures are recorded while surviving slots complete successfully. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Ready for review, and unit tests suggest the changes work, but I can try to test on the LAT when there is downtime this week. |
|
I just ran the updated script on the LAT crate 1 and it behaved as expected. I didn't do an exhaustive test, but I was able to run the commands |
Great news! Can you link me to the SOCS partner PR I'd like to look at that one too but this looks good to merge to me. |
Ok, thanks! The other PR is simonsobs/socs#1092 and I just marked it ready for review, but that one probably still needs work / testing. |
Needed for the
socsjackhammer agent.Allows the script to complete even if individual slots fail.