Skip to content

feat: add Python library extensions for rickshaw Perl-to-Python port#110

Merged
k-rister merged 3 commits into
mainfrom
python-lib-extensions
Apr 28, 2026
Merged

feat: add Python library extensions for rickshaw Perl-to-Python port#110
k-rister merged 3 commits into
mainfrom
python-lib-extensions

Conversation

@k-rister
Copy link
Copy Markdown
Contributor

Summary

  • Add fileio.py with open_read_text_file() and open_write_text_file() for transparent xz compression/decompression, matching the Perl toolbox::json interface
  • Add save_json_file() to json.py as the write counterpart to load_json_file(), with automatic xz compression
  • Add logging.py with setup_logging() for standardized logger configuration
  • Add run.py with run_cmd() via invoke.run() for shell command execution
  • Add parallel.py with run_parallel_jobs() using ThreadPoolExecutor for parallel job execution
  • Add roadblock.py with native do_roadblock() wrapper supporting leader/follower roles
  • Fix roadblock API usage: read followers file into list for set_followers(), initialize user_messages to None

These extensions support the rickshaw Perl-to-Python3 port but are generic enough for any subproject.

Test plan

  • All modules tested via rickshaw Python ports (post-process-tools, post-process-bench, gen-docs, rickshaw-run)
  • End-to-end validated with crucible run using fio and uperf+iperf benchmarks

🤖 Generated with Claude Code

k-rister and others added 3 commits April 26, 2026 17:08
…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>
@k-rister k-rister self-assigned this Apr 28, 2026
@k-rister k-rister requested a review from a team April 28, 2026 12:59
@project-crucible-tracking project-crucible-tracking Bot moved this to In Progress in Crucible Tracking Apr 28, 2026
@k-rister k-rister merged commit 515934f into main Apr 28, 2026
174 checks passed
@k-rister k-rister deleted the python-lib-extensions branch April 28, 2026 14:29
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Crucible Tracking Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants