feat: add Python library extensions for rickshaw Perl-to-Python port#110
Merged
Conversation
…block Extends the Python toolbox with reusable modules for the ongoing Perl to Python3 port: - logging.py: setup_logging() with level mapping (replaces toolbox::logging) - run.py: run_cmd() via invoke (replaces toolbox::run) - parallel.py: ThreadPoolExecutor wrapper (replaces Perl fork patterns) - roadblock.py: native roadblock wrapper for leader/follower roles All modules are stdlib + existing controller image dependencies (invoke, jsonschema). No new workshop.json requirements needed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add toolbox.fileio with open_read_text_file() and open_write_text_file() for transparent xz compression/decompression, matching the Perl open_read_text_file/open_write_text_file interface. Add save_json_file() to toolbox.json as the write counterpart to load_json_file. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Read followers file into a list and pass to set_followers() instead of calling non-existent set_followers_file(). Set user_messages to None explicitly since the roadblock constructor initializes it to [] which passes the 'is not None' check and causes a TypeError. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
atheurer
approved these changes
Apr 28, 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.
Summary
fileio.pywithopen_read_text_file()andopen_write_text_file()for transparent xz compression/decompression, matching the Perltoolbox::jsoninterfacesave_json_file()tojson.pyas the write counterpart toload_json_file(), with automatic xz compressionlogging.pywithsetup_logging()for standardized logger configurationrun.pywithrun_cmd()viainvoke.run()for shell command executionparallel.pywithrun_parallel_jobs()usingThreadPoolExecutorfor parallel job executionroadblock.pywith nativedo_roadblock()wrapper supporting leader/follower rolesset_followers(), initializeuser_messagestoNoneThese extensions support the rickshaw Perl-to-Python3 port but are generic enough for any subproject.
Test plan
crucible runusing fio and uperf+iperf benchmarks🤖 Generated with Claude Code