-
Notifications
You must be signed in to change notification settings - Fork 2
Refactor thunk to native async/await and fix brace expansion #46
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
base: main
Are you sure you want to change the base?
Refactor thunk to native async/await and fix brace expansion #46
Conversation
* Simplify load_scalar, implement Program handling, minimize widish changes - Added `hif.get_node_data` to `widip/hif.py`. - Simplified `load_scalar` in `widip/loader.py` to use `get_node_data` and delegate logic to `Scalar`. - Updated `Scalar` class in `widip/yaml.py` to handle domain/codomain calculation. - Updated `yaml_to_shell_box` in `widip/yaml.py` and `compile_ar` in `widip/compiler.py` to return `Program(...).uncurry()` for tagged scalars. - Updated `widip/computer.py` to set `Eval` name to empty string, allowing default execution logic in `widish.py` to handle it. - Minimal updates to `widip/widish.py`: added `run_program` (needed for `Program` boxes) and removed custom `run_eval` (relying on default `_deferred_exec_subprocess` handling of empty-named boxes). - Verified all tests pass. * Simplify load_scalar, unify compiler, implement Program handling - Added `hif.get_node_data` to `widip/hif.py`. - Simplified `load_scalar` in `widip/loader.py` to use `get_node_data` and delegate logic to `Scalar`. - Updated `Scalar` class in `widip/yaml.py` to handle domain/codomain calculation. - Unified compiler logic by removing `yaml_to_shell_box` and `YamlCompiler` from `widip/yaml.py` and moving logic to `compile_ar` in `widip/compiler.py`. - Updated `compile_ar` to handle `Sequence` (n=2) as `Pair` and tagged scalars as `Program`. - Updated `widip/interactive.py` and `widip/watch.py` to use `SHELL_COMPILER` directly. - Updated `widip/computer.py` to set `Eval` name to empty string. - Minimal updates to `widip/widish.py`: added `run_program` and support for `Program` execution. - Verified all tests pass. --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
…pansion.
Replaced `widip/thunk.py` with lightweight native async helpers (`unwrap`, `force_execution`).
Refactored `widip/widish.py` to use `_lazy` wrappers returning `partial`s for lazy execution, replacing custom Thunk objects.
Updated `widip/interactive.py` to drive async execution, including a `run_process` helper for parallel results.
Implemented generic brace expansion (e.g., `{a,b}`) in `deferred_exec` to support commands like `tr` without shell execution.
Cleaned up tests and removed unused binary artifact.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Removed custom
Thunkimplementation in favor of native Pythonasync/awaitandpartial. Updated execution engine inwidish.pyandinteractive.pyto handle lazy async tasks. Added generic manual brace expansion for command arguments to fixaoc2025test failure. Updated test suite.PR created automatically by Jules for task 5987463636692775611 started by @colltoaction