Story: Currencies end-to-end

Table of Contents

This page documents a story in Sprint 01. It captures the goal, current status, acceptance criteria, and the tasks that compose it.

Goal

Use currencies as the pathfinder data type that exercises every tier the project will need: XML import, JSON serialisation, database persistence, and Qt UI display. The shape of this story dictates the shape of every later reference-data story.

Status

Field Value
State DONE
Parent sprint Sprint 01
Now Story closed; currency data flows through XML → DB → Qt UI.
Waiting on None.
Next None.
Last touched 2024-07-28

Acceptance

  • Currency data can be parsed from the ORE XML input format.
  • Currency data round-trips through JSON serialisation.
  • Currency data persists to the project database.
  • The Qt UI displays currencies in a list/tree widget.

Tasks

Task State Start End Description
Add database support for currency DONE 2024-07-11 2024-07-12 Create the first project database table and write currency reference data to it.
Add XML parsing support for currency DONE 2024-06-23 2024-07-11 Read and write currencies from ORE's XML format, using the ORE examples as the import corpus.
Add basic widgets to display currencies DONE 2024-06-26 2024-07-13 Display currency reference data in the Qt UI via a model/view tree + list widget.

Decisions

Currencies first
chosen as the simplest reference-data type with enough variation to exercise the full stack.
Custom XML parser, not ORE's own
keeps the project independent of ORE's internal types and lets the schema evolve in v2 codegen later.
Manual JSON serialisation replaced with a serialiser library
initial hand-written JSON was thrown away in favour of generated code; established the pattern for later types.
Tree + list view
chose Qt model/view over a custom widget to inherit selection, sorting, and filtering for free.

Out of scope

  • Validation of currency codes against ISO 4217 (deferred).
  • Multi-language localisation (deferred).
  • Currency conversion or rate-based calculation (a different concern, belongs in pricing).
  • Temporal versioning — picked up in sprint 02's Currencies temporal and export once sqlgen and reflect-cpp are in place.
  • Full Postgres persistence — completed in sprint 03's Postgres-backed currency persistence.

See also

  • ores.refdata — the reference-data component currencies seed.
  • ores.qt — the model/view widgets the display task uses.
  • ores.sql — the Postgres setup the database task targets.
  • Currency (domain note) — what currency means in the project's domain.

Emacs 29.1 (Org mode 9.6.6)