From 24a9ff8244a4a354403599e4240fda1baed776f6 Mon Sep 17 00:00:00 2001 From: kingchenc Date: Thu, 21 May 2026 20:51:30 +0200 Subject: [PATCH] ci(release): three fixes after the first v0.1.0 attempt Three blockers surfaced when the first tag actually ran the pipeline: 1. PyPI sdist build refused the `readme = "../../README.md"` path in bindings/python/pyproject.toml. maturin sdist forbids `..` inside archive entries. Solution: add a Python-specific README at bindings/python/README.md (covers the Python install + pointers to the main repo) and point the project.readme key at the local file. 2. Node publish job hit ENOENT on npm//wickra.<...>.node because napi's per-platform scaffolding directories did not exist yet when `napi artifacts` ran. Insert `napi create-npm-dirs` as its own step before `napi artifacts` so the platform package layout is in place before binaries get moved into it. 3. and 4. (crates.io email + npm 2FA-bypass) are registry-side account settings that have to be done in the user's browser; no code change needed for those. They'll be sorted before the next tag push. --- .github/workflows/release.yml | 4 +++ bindings/python/README.md | 54 ++++++++++++++++++++++++++++++++++ bindings/python/pyproject.toml | 2 +- 3 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 bindings/python/README.md diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6082c71d..6aae0419 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -170,6 +170,10 @@ jobs: path: bindings/node/artifacts pattern: bindings-* + - name: Create npm// scaffolding + working-directory: bindings/node + run: npx napi create-npm-dirs + - name: Move binaries into platform package layout working-directory: bindings/node run: npx napi artifacts --dir artifacts diff --git a/bindings/python/README.md b/bindings/python/README.md new file mode 100644 index 00000000..8820a96f --- /dev/null +++ b/bindings/python/README.md @@ -0,0 +1,54 @@ +# Wickra — Python bindings + +Streaming-first technical indicators powered by a Rust core. + +```bash +pip install wickra +``` + +## Quick start + +```python +import numpy as np +import wickra as ta + +# Batch — TA-Lib-style usage +prices = np.linspace(100, 200, 1000) +rsi = ta.RSI(14).batch(prices) # NumPy array; NaN during warmup + +# Streaming — feed ticks one at a time +rsi = ta.RSI(14) +for price in live_prices: + v = rsi.update(price) # O(1) per tick + if v is not None and v > 70: + ... +``` + +## What's included + +25 streaming-first indicators across four families. Every one passes a +`batch == streaming` equivalence test and reference-value tests: + +- **Trend** — SMA, EMA, WMA, DEMA, TEMA, HMA, KAMA +- **Momentum** — RSI (Wilder), MACD, Stochastic, CCI, ROC, WilliamsR, ADX, + MFI, TRIX, AwesomeOscillator, Aroon +- **Volatility** — BollingerBands, ATR, Keltner, Donchian, PSAR +- **Volume** — OBV, VWAP + +## Why streaming-first matters + +Classic TA libraries are batch-only: every live tick triggers a full +recomputation over the entire history. Wickra updates indicator state in +O(1) per tick. On a 5K-bar history the streaming RSI gap is ~17× over the +nearest peer with a streaming API and 100×+ over batch-only libraries. + +## Full project + +See for benchmarks, the Rust core, +Node.js and WebAssembly bindings, examples, and CI. + +## License + +Licensed under the **PolyForm Noncommercial License 1.0.0**. Personal, +research, educational, and non-profit use are all permitted. Commercial +sale requires a separate license — contact via the GitHub repo. diff --git a/bindings/python/pyproject.toml b/bindings/python/pyproject.toml index df5bcc9b..31f86f8d 100644 --- a/bindings/python/pyproject.toml +++ b/bindings/python/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "maturin" name = "wickra" version = "0.1.0" description = "Streaming-first technical indicators: incremental, fast, install-free." -readme = "../../README.md" +readme = "README.md" license = { text = "PolyForm-Noncommercial-1.0.0" } requires-python = ">=3.9" keywords = ["finance", "trading", "indicators", "technical-analysis", "ta-lib"]