Commit Graph
5 Commits
Author SHA1 Message Date
cnmcdee 3b67cbf9de Ind* indicators: CSV/series support on all 250 kinds
Transpile the C component ind_* function for every kind into
lightgui/xframe/indicators.py (tools/transpile_indicators.py), verified
250/250 against the C++ reference dump (<=1e-9, NaN patterns included).
IndicatorWidget gains the StockWidget series API (set_series, populate,
get_series, add_point, clear, load_csv, item_count, get_lines) and draws
the computed lines (14-colour palette, NaN gaps, dots for isolated
marker points) with the demo series as fallback. Docs in
docs/indicators-data.md; tests/test_indicators_csv.py (17 tests, golden
spot values vs the C++ reference); Xvfb shots via
tools/ind_csv_shots.py.
2026-12-02 11:04:35 +00:00
cnmcdee 11493b5f22 Stock charts: CSV data loading (load_csv/set_series/clear/populate)
Every chart widget rendered only the baked-in 250-bar demo series:
no set_series existed in Python despite the docstring naming it, so
there was no way to plot real data at all. Now StockWidget holds up
to three series slots (primary + two extra for the multi-symbol
charts) via set_series (the C API), get_series, add_point, clear /
populate, item_count, and load_csv; all 37 draw paths read the
widget series through _bars(widget) instead of module DEMO_SERIES,
so derived series (Heikin-Ashi, Renko, VWAP, OBV, ...) rebuild from
the loaded data and the drawing tools inherit it as background.

load_csv reads date,open,high,low,close,volume with the stdlib csv
module: header optional (matched by name, any order, extra columns
ignored), dates YYYY-MM-DD / YYYY/MM/DD / DD-MM-YYYY / ISO datetime
/ epoch seconds (validated, not stored -- the x-axis is bar index),
ValueError naming the row on bad data. A cleared series draws a
no-data placeholder; a one-bar series draws (Price: flat change).

Tests: tests/test_stock_csv.py, 27 tests (parsing, API, headless
renders of all 24 chart kinds incl. CSV-vs-template pixel diff).
Fixture tests/data/ohlcv_30.csv (30 weekday bars). Full suite 311
tests pass; visreg 24/24 stock charts pixel-identical to template
goldens. Docs: docs/stock-charts-data.md. Screenshots:
tools/stock_csv_shots.py (Xvfb, RMSE 9-35% vs template goldens).
2026-12-02 09:55:14 +00:00
cnmcdee 9bc3e96a93 Phase 7 docs: record final Phase 7 commit SHAs in architecture.md 2026-12-01 04:12:07 +00:00
cnmcdee 751367396f Phase 7 docs: README + architecture brought up to date
README: all 7 phases complete, requirements (python3-gi,
python3-cairo, python3-gi-cairo, GTK 3.24), how to run, what works,
actual final module layout (no theme.py/preferences.py/archetypes.py
— those never existed), test command, honest known limits (Install
Libraries root prompt unverified, no logpoint UI, def-line
breakpoint fires at definition time, generated scripts need
lightgui on PYTHONPATH unless installed system-wide).

architecture.md: phase plan actually used (Phases 0-7 with commit
SHAs), final module layout, final state.
2026-12-01 04:09:24 +00:00
cnmcdee e2ee6f8bc3 Phase 0 skeleton: PyGObject/GTK IDE chrome, XFrame-native canvas (Python port) 2026-12-01 02:16:44 +00:00