Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow injecting Executor class to control how commands are made / ran #383

Open
tony opened this issue Jul 9, 2022 · 0 comments
Open

Allow injecting Executor class to control how commands are made / ran #383

tony opened this issue Jul 9, 2022 · 0 comments

Comments

@tony
Copy link
Member

tony commented Jul 9, 2022

Default behavior is the same

Executors:

  • Default: run() w/ a pass-through to show real time stderr of progress

  • subprocess.run pass-through

  • SubprocessCommand generates functions in dataclasses you can invoke later

    Rather than immediately running a SubprocessCommand, you can introspect, pickle it, adjust it, etc.

    Git(executor=SubprocessCommand)

  • Bring your own

    If you're not satisfied and don't think a PR will do, create your own executor class.

    If you do, you may want to either 1.) override the class's #run() or 2.) pass a run_fn to override it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant