tarpolyglot 0.2.0
New features
- New dynamic-branching pattern helpers mirror the
targetspatterns (map(),cross(),slice(), …). Used unquoted inpatternontar_target_rs()/tar_target_rs_raw(), they compile the Rust crate a single time in a companion<step name>_rust_libtarget and reuse that compiled library across every branch (each branch reloads it in milliseconds), instead of recompiling the crate in every branch as the plaintargetspatterns do. On the other constructors (tar_target_py(),tar_target_jl(), ortar_target()) each helper falls back to its plaintargetsequivalent, so the same pattern code branches every language.-
tarpolyglot_map(): equivalent tomap() -
tarpolyglot_cross(): equivalent tocross() -
tarpolyglot_slice(): equivalent toslice() -
tarpolyglot_head(): equivalent tohead() -
tarpolyglot_tail(): equivalent totail() -
tarpolyglot_sample(): equivalent tosample()
-
Bug fixes
- Inline Julia code supplied through
tar_code()now runs correctly when it spans multiple top-level statements (for example afunctiondefinition followed by a call). It is evaluated as a Julia script rather than as a single expression, so it no longer raisesParseError("extra token after end of expression"). Inline Python and Rust were unaffected.
tarpolyglot 0.1.0
First release. tarpolyglot adds targets constructors that run Python, Julia, and Rust as pipeline steps.
New features
-
tar_target_py(),tar_target_jl(), andtar_target_rs()(with matching_raw()variants) mirrortargets::tar_target()/targets::tar_target_raw(). Python and Julia steps run a script through a live interpreter (reticulate / JuliaCall) with optional R pre- and post-scripts; Rust steps compile#[extendr]functions with rextendr and call them from an R post-script. - Steps return either a converted R object or files written to disk (
output = "file"). -
tar_target_path()tracks a script file as a realtargetsdependency, so a step re-runs when its script changes. -
polyglot_controller()provides acrewcontroller preconfigured for per-step interpreter isolation (tasks_max = 1). - Python environment selection via
env/env_manager(system, virtualenv, venv, uv, poetry, conda),python_version, or an explicitpythonpath; Julia selection viajulia_version/julia_home/julia_project/julia_packages. - Full
targets::tar_target_raw()argument pass-through, including dynamic branching (pattern). -
tar_code()supplies inline code for thescript,pre_script, andpost_scriptarguments of the constructors, as an alternative to a file path or atar_target_path()reference. An R{...}block is captured as inline R and is valid in thepre_script/post_scriptslots; a character string is inline source for the foreignscript(Python, Julia, or Rust) or for an R pre/post-script. Multi-line strings are dedented, so code indented to line up with_targets.Rstill starts flush-left and Python’s own block indentation stays valid. Inline code is embedded in the target’s command, sotargetshashes it and re-runs the step when it changes.