IF Commons GitHub

logical/matrix

Written to: 1 requirement: 0 proved, 0 partly, 0 failing, 1 with no test recorded. 0003-planning-reconcile FR-013

The matrix of what each source can hold (0037-planning FR-015): each field of an item ends, for each source, expressed (the place holds it), carried (it travels in a form the place keeps) or unexpressed with a reason; a field with none is a finding that names the field and the source. A source declares its row; the fields are the one list here, so a field added to an item is a finding until each source says how it ends.

import { FIELDS, matrixFindings } from "./matrix.ts";
matrixFindings([{ source: "x", cells: {} }]).length === FIELDS.length; // true

Source: commons/planning/src/logical/matrix.ts

0 of 16 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.

logical.FIELDSconstno test imports it
const FIELDS: readonly ["id", "kind", "title", "body", "labels", "assignees", "severity", "origin", "external", "links", "state", "comments", "decisions", "events", "principal", "sourceSeverity", "motivation", "blocker", "target", "source", "priority", "size", "goals", "engines", "cites", "evidence", "raised"]

The fields of an item that a source holds or does not: the core and what a source carries.

logical.Fieldtypeno test imports it
type Field = (typeof FIELDS)[number];

One field.

logical.Celltypeno test imports it
type Cell = { readonly outcome: "expressed" } | { readonly outcome: "carried"; readonly how: string } | { readonly outcome: "unexpressed"; readonly reason: string };

How a field ends for a source.

logical.SourceRowtypeno test imports it
type SourceRow = { readonly source: string; readonly cells: { readonly [F in Field]?: Cell } };

The row of one source: its cells by field.

logical.DroppedFindingtypeno test imports it
type DroppedFinding = { readonly code: "planning/dropped"; readonly source: string; readonly field: Field };

A field that ends in none, for a source.

logical.describeCellfunctionno test imports it
function describeCell(c: Cell | undefined): string

A sentence for a cell.

logical.matrixFindingsfunctionno test imports it
function matrixFindings(rows: readonly SourceRow[]): readonly DroppedFinding[]

Every field a source gives no cell, or an unexpressed one with no reason: a finding for each.

logical.matrixMarkdownfunctionno test imports it
function matrixMarkdown(rows: readonly SourceRow[]): string

The matrix as a Markdown table: a row for each field, a column for each source.

FIELDSconstno test imports it
const FIELDS: readonly ["id", "kind", "title", "body", "labels", "assignees", "severity", "origin", "external", "links", "state", "comments", "decisions", "events", "principal", "sourceSeverity", "motivation", "blocker", "target", "source", "priority", "size", "goals", "engines", "cites", "evidence", "raised"]

The fields of an item that a source holds or does not: the core and what a source carries.

Fieldtypeno test imports it
type Field = (typeof FIELDS)[number];

One field.

Celltypeno test imports it
type Cell = { readonly outcome: "expressed" } | { readonly outcome: "carried"; readonly how: string } | { readonly outcome: "unexpressed"; readonly reason: string };

How a field ends for a source.

SourceRowtypeno test imports it
type SourceRow = { readonly source: string; readonly cells: { readonly [F in Field]?: Cell } };

The row of one source: its cells by field.

DroppedFindingtypeno test imports it
type DroppedFinding = { readonly code: "planning/dropped"; readonly source: string; readonly field: Field };

A field that ends in none, for a source.

describeCellfunctionno test imports it
function describeCell(c: Cell | undefined): string

A sentence for a cell.

matrixFindingsfunctionno test imports it
function matrixFindings(rows: readonly SourceRow[]): readonly DroppedFinding[]

Every field a source gives no cell, or an unexpressed one with no reason: a finding for each.

matrixMarkdownfunctionno test imports it
function matrixMarkdown(rows: readonly SourceRow[]): string

The matrix as a Markdown table: a row for each field, a column for each source.

Titles, headings, exports, tables, columns and requirements. Esc closes.