ba02f1bd

By: Tom Sydney Kerckhove <syd@cs-syd.eu>

Add the centjes-chart package

A 'centjes-chart' executable that renders an SVG chart of account balances
over time from a ledger.

The package is structured around a backend-agnostic, pure report so the data
pipeline is total and testable and rendering is isolated:

- Centjes.Chart.Report: the ChartReport/ChartSeries intermediate
  representation, a typed ChartError (unknown currency / no data / conversion
  failure) whose ToReport delegates to ConvertError, and a total
  produceChartReport. Accounts are selected by declared AccountType, balances
  are sampled onto a daily x-axis (sampleStepFunction) and re-valued at each
  day's rate. The days/series alignment is a checked Validity invariant.
- Centjes.Chart.Render: the only place precise money becomes Double. Renders a
  stacked area chart when all values are non-negative and overlaid lines
  otherwise, via Chart + Chart-diagrams (no cairo C dependency).
- Centjes.Chart.OptParse / Command.All: the 'all' command, with currency,
  account filter, output path and title as settings.
- centjes-chart-test: genValidSpec and an alignment-rejection test for the
  invariant, property tests for the sampling and stacking math, a golden for
  the report, and error goldens for every ChartError constructor.

Suite timing

Time to Start Worker time Duration Time to finish Idle
Config 0s 2s 2s 2s 0s
Eval 2s 51s 51s 53s 0s
Build 5s 8m01s 4m35s 4m41s 0s
Suite 0s 8m55s 4m41s 4m41s 0s

Timeline

0s20s40s1m1m20s1m40s2m2m20s2m40s3m3m20s3m40s4m4m20s4m40s