Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 44 additions & 41 deletions .github/workflows/sync-from-wickra.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
name: Sync from wickra

# Two values here are decided in wickra-lib/wickra: the indicator count and the
# released version. Both used to arrive by push -- that repository's
# sync-about.yml cloned this one with a personal access token and committed
# them. The token carried write access to four repositories, administration
# rights on wickra and admin:org, and existed for no other reason.
# Two kinds of value here are decided elsewhere: the indicator counts and
# wickra's released version. Both used to arrive by push -- wickra's
# sync-about.yml cloned this repository with a personal access token and
# committed them. The token carried write access to four repositories,
# administration rights on wickra and admin:org, and existed for no other
# reason.
#
# This pulls instead. A schedule is also the only trigger that can work: both
# values change in the OTHER repository, so a push here is not the event that
# This pulls instead. A schedule is also the only trigger that can work: the
# values change in the OTHER repositories, so a push here is not the event that
# makes this site wrong. The delay is bounded by the hour and costs nothing --
# nobody reads documentation expecting a figure that moved in the last hour.
#
# The -site repositories run the same idea as a read-only check that fails when
# the numbers disagree. This one patches, because the push model it replaces
# existed precisely so these values would not have to be raised by hand; a
# checker would hand that work back with a louder error.
# The counts are set by the org's one rule set, wickra-lib/.github's
# scripts/sync-counts.mjs, checked out at a pinned commit. It reads them at the
# latest releases -- this site documents what can be installed, not what is
# merged -- and sets every count a page states by the rule that applies: the
# core's on the pages about the catalogue, the backtest registry's where a page
# describes a product that resolves through it (the screener, feature-store,
# genome and darwin rows of Ecosystem.md). A sed over four files used to catch
# one phrasing and miss the Quickstarts, Ecosystem.md and every other wording.
# The page-derived counts (per family, the sidebar, "N deep-dive pages") stay
# with scripts/sync-doc-counts.mjs, which CI checks against the pages.
on:
schedule:
- cron: "43 * * * *" # hourly at :43, clear of refresh-badges at :17
Expand All @@ -25,7 +32,7 @@ permissions:

jobs:
sync:
name: Pull the count and the released version
name: Pull the counts and the released version
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
Expand All @@ -35,29 +42,29 @@ jobs:
with:
persist-credentials: false

# Same derivation the source repository uses: parse the re-export block,
# drop the FAMILIES constant and the *Output companion structs, count what
# is left. Reading the source rather than a published number keeps this
# repository from restating a figure nobody checked.
- name: Read the count from wickra
id: count
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: '22'

# One file, read-only, at a pinned commit. It lands beside the site and is
# excluded from git, so the commit below cannot pick it up.
- name: Check out the count rules
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: wickra-lib/.github
ref: d683af6320d14973d311968842600b332b7d3e79
path: .wickra-org
sparse-checkout: scripts/sync-counts.mjs
sparse-checkout-cone-mode: false
persist-credentials: false

- name: Set the indicator counts
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -euo pipefail
src=$(curl -fsSL --retry 5 --retry-all-errors \
https://raw.githubusercontent.com/wickra-lib/wickra/main/crates/wickra-core/src/lib.rs)
n=$(printf '%s' "$src" \
| sed -n '/^pub use indicators::{/,/^};/p' \
| tr ',{}' '\n' \
| sed 's/[[:space:]]//g' \
| grep -E '^[A-Z][A-Za-z0-9_]*$' \
| grep -vE '^FAMILIES$|Output$' \
| sort -u | wc -l)
if [ "$n" -lt 100 ]; then
echo "::error::parsed only ${n} indicators -- the re-export block moved or the fetch was truncated; refusing to write a wrong number"
exit 1
fi
echo "count=$n" >> "$GITHUB_OUTPUT"
echo "wickra exports ${n} indicators"
echo ".wickra-org/" >> .git/info/exclude
node .wickra-org/scripts/sync-counts.mjs --repo wickra-docs

# The released version, not the one on main: between a bump merging and its
# tag being pushed, Cargo.toml is ahead of anything a reader can install.
Expand All @@ -76,14 +83,11 @@ jobs:
echo "version=$version" >> "$GITHUB_OUTPUT"
echo "wickra's latest release is ${version}"

- name: Apply both
- name: Apply the version
env:
N: ${{ steps.count.outputs.count }}
V: ${{ steps.version.outputs.version }}
run: |
set -euo pipefail
sed -i -E "s/[0-9]+ (streaming-first )?indicators/${N} \1indicators/g" \
index.md overview.md Indicators-Overview.md .vitepress/config.ts
sed -i -E "s/^(\| \[?(crates\.io|PyPI|npm|NuGet|Maven Central|Go|r-universe)\]?.*\| )[0-9]+\.[0-9]+\.[0-9]+/\1${V}/" overview.md
sed -i -E "s/(published crate is at version .)[0-9]+\.[0-9]+\.[0-9]+/\1${V}/" Quickstart-Rust.md
sed -i -E "s|<version>[0-9]+\.[0-9]+\.[0-9]+</version>|<version>${V}</version>|" Quickstart-Java.md
Expand All @@ -92,12 +96,11 @@ jobs:
- name: Commit if changed
id: commitcheck
env:
N: ${{ steps.count.outputs.count }}
V: ${{ steps.version.outputs.version }}
run: |
set -euo pipefail
if [ -z "$(git status --porcelain)" ]; then
echo "already at ${N} indicators and version ${V}; nothing to commit"
echo "counts current and version ${V}; nothing to commit"
echo "commit=false" >> "$GITHUB_OUTPUT"
exit 0
fi
Expand All @@ -108,5 +111,5 @@ jobs:
uses: wickra-lib/.github/actions/signed-commit@da1bd395c27f33dbed632c8e4e48e12f85394858 # v1.1.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
message: "chore: sync indicator count to ${{ steps.count.outputs.count }} and version to ${{ steps.version.outputs.version }}"
paths: index.md overview.md Indicators-Overview.md .vitepress/config.ts Quickstart-Rust.md Quickstart-Java.md
message: "chore: sync the indicator counts and the released version (${{ steps.version.outputs.version }})"
paths: .
8 changes: 4 additions & 4 deletions Ecosystem.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@ the install line and quick start for each language.
| [**wickra-exchange**](https://github.com/wickra-lib/wickra-exchange) | unified market-data + execution across ten crypto exchanges | [![release](https://raw.githubusercontent.com/wickra-lib/.github/main/profile/badges/wickra-exchange/release.svg)](https://github.com/wickra-lib/wickra-exchange/releases/latest) | [exchange.wickra.org](https://exchange.wickra.org) |
| [**wickra-synth**](https://github.com/wickra-lib/wickra-synth) | deterministic synthetic market microstructure: OHLCV, order book, trades and funding from a single seed | [![release](https://raw.githubusercontent.com/wickra-lib/.github/main/profile/badges/wickra-synth/release.svg)](https://github.com/wickra-lib/wickra-synth/releases/latest) | [synth.wickra.org](https://synth.wickra.org) |
| [**wickra-timemachine**](https://github.com/wickra-lib/wickra-timemachine) | scrub the whole market like a video — every symbol, full order book, rewound to any moment via deterministic re-fold | [![release](https://raw.githubusercontent.com/wickra-lib/.github/main/profile/badges/wickra-timemachine/release.svg)](https://github.com/wickra-lib/wickra-timemachine/releases/latest) | [timemachine.wickra.org](https://timemachine.wickra.org) |
| [**wickra-genome**](https://github.com/wickra-lib/wickra-genome) | a vector database of the whole market: every asset a 514-dim live vector, for similarity search, clustering and anomaly detection | [![release](https://raw.githubusercontent.com/wickra-lib/.github/main/profile/badges/wickra-genome/release.svg)](https://github.com/wickra-lib/wickra-genome/releases/latest) | [genome.wickra.org](https://genome.wickra.org) |
| [**wickra-feature-store**](https://github.com/wickra-lib/wickra-feature-store) | OHLCV and microstructure streams into ML-ready feature matrices over 514 O(1) streaming indicators | [![release](https://raw.githubusercontent.com/wickra-lib/.github/main/profile/badges/wickra-feature-store/release.svg)](https://github.com/wickra-lib/wickra-feature-store/releases/latest) | [feature-store.wickra.org](https://feature-store.wickra.org) |
| [**wickra-genome**](https://github.com/wickra-lib/wickra-genome) | a vector database of the whole market: every asset a 495-dim live vector, for similarity search, clustering and anomaly detection | [![release](https://raw.githubusercontent.com/wickra-lib/.github/main/profile/badges/wickra-genome/release.svg)](https://github.com/wickra-lib/wickra-genome/releases/latest) | [genome.wickra.org](https://genome.wickra.org) |
| [**wickra-feature-store**](https://github.com/wickra-lib/wickra-feature-store) | OHLCV and microstructure streams into ML-ready feature matrices over 495 O(1) streaming indicators | [![release](https://raw.githubusercontent.com/wickra-lib/.github/main/profile/badges/wickra-feature-store/release.svg)](https://github.com/wickra-lib/wickra-feature-store/releases/latest) | [feature-store.wickra.org](https://feature-store.wickra.org) |

## Research — backtest, screen, search, train

| Repository | What it does | Release | Docs |
|---|---|---|---|
| [**wickra-backtest**](https://github.com/wickra-lib/wickra-backtest) | event-driven backtester over the Wickra core | [![release](https://raw.githubusercontent.com/wickra-lib/.github/main/profile/badges/wickra-backtest/release.svg)](https://github.com/wickra-lib/wickra-backtest/releases/latest) | [backtest.wickra.org](https://backtest.wickra.org) |
| [**wickra-screener**](https://github.com/wickra-lib/wickra-screener) | parallel multi-symbol screening over 514 streaming indicators | [![release](https://raw.githubusercontent.com/wickra-lib/.github/main/profile/badges/wickra-screener/release.svg)](https://github.com/wickra-lib/wickra-screener/releases/latest) | [screener.wickra.org](https://screener.wickra.org) |
| [**wickra-darwin**](https://github.com/wickra-lib/wickra-darwin) | evolutionary strategy search at millions of backtests per second, mutating and crossing JSON specs across the 514-indicator space | [![release](https://raw.githubusercontent.com/wickra-lib/.github/main/profile/badges/wickra-darwin/release.svg)](https://github.com/wickra-lib/wickra-darwin/releases/latest) | [darwin.wickra.org](https://darwin.wickra.org) |
| [**wickra-screener**](https://github.com/wickra-lib/wickra-screener) | parallel multi-symbol screening over 495 streaming indicators | [![release](https://raw.githubusercontent.com/wickra-lib/.github/main/profile/badges/wickra-screener/release.svg)](https://github.com/wickra-lib/wickra-screener/releases/latest) | [screener.wickra.org](https://screener.wickra.org) |
| [**wickra-darwin**](https://github.com/wickra-lib/wickra-darwin) | evolutionary strategy search at millions of backtests per second, mutating and crossing JSON specs across the 495-indicator space | [![release](https://raw.githubusercontent.com/wickra-lib/.github/main/profile/badges/wickra-darwin/release.svg)](https://github.com/wickra-lib/wickra-darwin/releases/latest) | [darwin.wickra.org](https://darwin.wickra.org) |
| [**wickra-gym**](https://github.com/wickra-lib/wickra-gym) | a Gymnasium-compatible, microstructure-aware backtest environment with O(1) steps for deterministic RL rollouts | [![release](https://raw.githubusercontent.com/wickra-lib/.github/main/profile/badges/wickra-gym/release.svg)](https://github.com/wickra-lib/wickra-gym/releases/latest) | [gym.wickra.org](https://gym.wickra.org) |
| [**wickra-impact**](https://github.com/wickra-lib/wickra-impact) | the backtester that knows you would have moved the market: agent-based fills on the real historical L2 order book | [![release](https://raw.githubusercontent.com/wickra-lib/.github/main/profile/badges/wickra-impact/release.svg)](https://github.com/wickra-lib/wickra-impact/releases/latest) | [impact.wickra.org](https://impact.wickra.org) |

Expand Down
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,16 @@ Requires Node 22 (see `.nvmrc`).

## What is kept current by workflow

- **The indicator count and the released version** — the headline count on the
landing page and in `overview.md`, the version table, the crate version in
- **The indicator counts and the released version** — every count a page states
(the core's, and the backtest registry's where `Ecosystem.md` describes the
products that resolve through it), the version table, the crate version in
`Quickstart-Rust.md` and the Maven snippet in `Quickstart-Java.md` — are pulled
hourly from [wickra](https://github.com/wickra-lib/wickra) by
`sync-from-wickra.yml` (the count is derived from the core's re-export block,
the version from its latest release).
hourly by `sync-from-wickra.yml`, from the latest releases of
[wickra](https://github.com/wickra-lib/wickra) and
[wickra-backtest](https://github.com/wickra-lib/wickra-backtest). The counts
are set by the org's one rule set,
[`scripts/sync-counts.mjs`](https://github.com/wickra-lib/.github/blob/main/scripts/sync-counts.mjs)
in wickra-lib/.github.
- **The page-derived counts** — per-family indicator counts, the sidebar groups
and "N deep-dive pages" — are owned by `scripts/sync-doc-counts.mjs`; CI fails
when they disagree with the pages, and `node scripts/sync-doc-counts.mjs`
Expand Down
7 changes: 4 additions & 3 deletions scripts/gen-og-banner.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Generate public/og-banner.webp from scripts/og-banner.svg, with the indicator
* count taken from this site's own content (overview.md, which sync-about.yml
* keeps current). Runs as a prebuild step, so the social-card banner is
* count taken from this site's own content (overview.md, which
* sync-from-wickra.yml keeps current). Runs as a prebuild step, so the social-card banner is
* regenerated on every deploy and can never drift from the count — no committed
* image, no manual step. The generated file is git-ignored.
*
Expand All @@ -18,7 +18,8 @@ import sharp from 'sharp'
const here = dirname(fileURLToPath(import.meta.url))
const root = resolve(here, '..')

// Count from the site's own content (kept in sync by sync-about.yml).
// Count from the site's own content (overview.md: its first "N indicators" is the
// core's, kept current by sync-from-wickra.yml).
const content = readFileSync(resolve(root, 'overview.md'), 'utf-8')
const m = content.match(/(\d+)\s+indicators/i)
if (!m) {
Expand Down
Loading