Skip to content

PowerBridge 0.6.0

Choose a tag to compare

@hudsonwa hudsonwa released this 22 Oct 07:26
· 122 commits to main since this release
efec456

Originally released on 2026-10-21. This release page was re-created, with its original assets, when the repository was recreated on 2026-10-22, so its timestamp shows that date. See the CHANGELOG.

Added

  • --max-entries-per-direction N for pl_run and pl_oracle
    (max_entries_per_direction=N in run_el / run_oracle): a Buy or
    SellShort in the open position's direction is refused while N entries are
    open; reversals still fill. N=1 follows MultiCharts' documented default
    (not verified against a capture). The default stays unlimited, so existing
    digests do not change. The native kernel supports it; an older kernel build
    falls back to Python with a note.

Changed

  • transpile(src) now returns the runnable dialect by default, the same
    code pl_transpile writes and pl_run executes. Before, the library default
    was the clean mirror dialect, which keeps no cross-bar _state: EL Variables
    reset every bar, so a stateful strategy run from it silently produced zero or
    wrong orders. The mirror dialect (input for el_emit) now needs
    transpile(src, dialect="mirror"); persist=False still works. The bar loop
    refuses mirror-dialect strategies with a one-line error naming the fix.
    The pl_transpile CLI is unchanged (--no-persist still emits the mirror).
  • Tests: the public tier is also a set of pytest tests marked public_tier, so
    pytest runs everything and pytest -m public_tier runs exactly the tier.
    python tests/run_public_tier.py still works (stdlib only) and shares the
    same member list.
  • run_el, load_bars_csv and get_config can be imported from
    pl_transpiler directly; the old module paths keep working.
  • The runtime finds its loud stubs from a generated static list
    (tools/gen_loud_stubs.py, checked by a test) instead of parsing its own
    source at import time, so it works from .pyc-only or zipped installs. The
    installed stubs are unchanged.
  • README: tools/build_accel.sh needs an editable install (pip install -e .)
    for the console commands to see the built module.
  • The public API (transpile, run_el, run_oracle, load_bars_csv,
    load_bars, get_config, load_config_file and the catalog accessors)
    has type annotations, and the package ships py.typed. CI runs mypy on
    those modules. Runtime behaviour and digests do not change.
  • CI: every action in ci.yml and accel.yml is pinned to a commit SHA, the
    workflows run with a read-only token, Dependabot watches actions, cargo and
    pip, Python 3.14 joins the test matrix, and one pytest job uploads a
    coverage report.
  • ruff also checks pycodestyle E4/E7 and W rules.
  • Dependabot runs monthly with one grouped PR per ecosystem (at most two
    open) and skips major versions, which are upgraded deliberately.

Fixes

  • A strategy that declares arrays but no Variables or Inputs no longer fails
    with NameError: _state in the trace and runnable dialects.

Re-published on 2026-10-22, when the repository was recreated. The tag, notes and files are the originals.