Skip to content

PowerBridge 0.10.0

Choose a tag to compare

@hudsonwa hudsonwa released this 24 Oct 03:10
· 37 commits to main since this release
ef3f4f7

Highlights:

  • pl_oracle --summary prints a performance summary of the closed trades.
  • --version says whether the native kernel is available, and why not.
  • A plain pytest run without the native kernel is short and quiet, and tools/dev_setup.sh sets up a full development environment (#186, #188).
  • The lexer runs in linear time and pl_run / pl_oracle parse a program once per run (#180, #182).

Added

  • pl_oracle --summary prints a performance summary of the closed trades to stderr: net, gross profit and loss, trades, winners, losers, win rate, closed-trade max drawdown and open contracts. P&L uses the big point value, before commission and slippage. The text is the same on both paths and the digest is unchanged.
  • --version on the command-line tools says whether the native kernel is available and, if not, why; native_status() gives the same check from Python (#173).
  • tools/dev_setup.sh sets up a development environment in the active venv: upgrades pip, installs .[dev] editable, builds the native kernel when cargo is available and prints the kernel status. CONTRIBUTING leads with it and CI runs it in a fresh venv (#188).

Changed

  • Sell / BuyToCover ... from entry("X") stops (exit 2) only when an entry with a different name is open on its side; with entry X alone open, even pyramided, it closes the position as before 0.9.0 (#24).
  • Without the native kernel, a plain pytest run leaves the kernel-only tests out and prints one line with their count and how to build the kernel, instead of about 600 skips; -m needs_native still collects them (#207). The remaining skips are grouped by category with a pointer to the setup docs (#186).
  • The lexer runs in linear time (a 3,200-line program lexes in about 0.04 s instead of 2 s), and pl_run / pl_oracle lex and parse a program once per run instead of up to ten times; output is identical (#180, #182).
  • Packaging is declared in pyproject.toml only; setup.py is gone and the pl_examples files live in pl_transpiler/_examples/. The wheel contents are unchanged (#192).
  • pl_transpiler/builtins.py imports its runtime functions by name, so mypy and ruff check the builtin table, and mypy runs with stricter flags (#198, #200).

Fixed

  • Contributor setup works on Python 3.9's bundled pip: CONTRIBUTING upgrades pip before the editable install, and CI runs that setup on 3.9 (#175).
  • A strict-mode stop (from entry ("X") with another named entry open, a missing bar column such as OpenInt, an unimplemented builtin) names the line of the statement that raised it, not the first line mentioning the word (#178).
  • With several front-end errors, each unknown keyword is labelled unimplemented EL keyword 'foo' at line N, as for a single error (#196).