Skip to content

Updated BaseRunner.run API - #238

Merged
timmyte merged 30 commits into
faccts:mainfrom
MattBurn:baserunner-run
Aug 20, 2026
Merged

timmyte merged 30 commits into
faccts:mainfrom
MattBurn:baserunner-run

Conversation

@MattBurn

@MattBurn MattBurn commented May 1, 2026

Copy link
Copy Markdown
Contributor

Closes Issues

Closes #235

Description

  • Replaces the competing capture, silent, stdout, and stderr controls in BaseRunner.run with explicit stdout/stderr stream targets.
  • Adds subprocess stream fanout support for Path, string paths, open text streams, callbacks, subprocess.PIPE capture, and multiple destinations using opi.execution.text_stream.TextStreamFanout.
  • Adds immutable run result objects opi.execution.base.RunResult and opi.execution.run.SubprocessRunResult with captured output, return-code helpers.
  • Deprecates stdin_str, capture, and silent in favor of stdin and stdout/stderr stream targets.
  • Adds focused unit tests for capture, fanout, live callbacks, stdin, timeout handling, and invalid stream targets.

Release Notes

Added

Changed

Deprecated

@MattBurn
MattBurn requested a review from a team as a code owner May 1, 2026 13:09
@MattBurn

MattBurn commented May 1, 2026

Copy link
Copy Markdown
Contributor Author

Apologies for the number of CI runs, finally figured out how nox works to check locally in the future

@timmyte

timmyte commented May 6, 2026

Copy link
Copy Markdown
Contributor

Apologies for the number of CI runs, finally figured out how nox works to check locally in the future

Anything that could be improved in the docs to make this clearer?

@MattBurn

MattBurn commented May 7, 2026

Copy link
Copy Markdown
Contributor Author

I am new to nox so I did not grasp what nox was going to run in CI before pushing. I ended up using uv tool run nox which was a nice and simple way to run everything at once locally. Possibly worth adding to the development guide.

@MattBurn

Copy link
Copy Markdown
Contributor Author

Are there any blockers for getting this merged?

@timmyte timmyte left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MattBurn

Very sorry for the long waiting time. I was quite busy.

Looks good. Could you please make the little corrections I remarked before merging. Thanks!!

Comment thread src/opi/execution/base.py Outdated
Comment thread src/opi/execution/base.py Outdated
timmyte added 2 commits July 14, 2026 16:01
Co-authored-by: Tim Tetenberg <123412573+timmyte@users.noreply.github.com>
@timmyte
timmyte requested a review from haneug July 14, 2026 14:04
@timmyte

timmyte commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

@haneug
As I made tiny changes, would you quickly going over this as well

@timmyte

  • Run testsuite before merge.

@timmyte
timmyte requested a review from haneug August 13, 2026 12:20
@timmyte

timmyte commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

@haneug
Please review again, as made significant changes and additions.

@MattBurn
If you like to also review, by my guest. I would love to hear your opinion.
I'm very sorry again, for the long delay. It's very nicely structured and documented code.
I enjoyed working with it.

@MattBurn

Copy link
Copy Markdown
Contributor Author

Changes look good to me, I originally started this to improve the ergonomics of creating the orca_mm binary in PR #224. With so many changes to how the runner works, do you think it would be best to restart this PR?

@timmyte

timmyte commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Changes look good to me, I originally started this to improve the ergonomics of creating the orca_mm binary in PR #224. With so many changes to how the runner works, do you think it would be best to restart this PR?

Thanks for your feedback.
From our side there's no need to restart the PR — but feel free to if you'd prefer. I can imagine merging the changes into #224 would be a lot of work, so under the circumstances a rebase and force-push is fine too.

@timmyte

timmyte commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Had to make some changes. Units test pass fine now.
@MattBurn thanks for adding them so rigorously.

@timmyte
timmyte merged commit cd59670 into faccts:main Aug 20, 2026
6 checks passed
@MattBurn MattBurn mentioned this pull request Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Simplify BaseRunner.run method

3 participants