@finbheara/archive-client 0.49.0 → 0.51.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -97,6 +97,7 @@ c.features; // [{ feature: "dancers", state: "full" | "missing", missing: [...
97
97
  | `results.attach_basis`, `majors.attach_basis` | the `attach_basis` a row of `results.query`, `majors.results`, `results.stream` and `results.entries` carries (how its `dancer_id` was answered, or why not); absent, never refused, without it | 345 |
98
98
  | `results.major`, `majors.major` | the `major` a row of `results.stream` and `results.entries` carries (1 where its competition is a main event of a T1-T3 event, exactly the rows `majors.sqlite` holds); absent without it, and the stream filter `major` is refused by name without it | 345 |
99
99
  | `results.relative_place_err`, `majors.relative_place_err` | the `relative_place_err` a row of `results.stream` and `results.entries` carries (how far below `relative_place` the true value may sit, 0 over an exact field); absent, never refused, without it | 350 |
100
+ | `results.marks_printed`, `majors.marks_printed` | the `marks_printed` a row of `results.stream` and `results.entries` carries (the marks total a row served or printed, iFeis's beside its `points` and a Bucharest transcript row's, one string verbatim); absent, never refused, without it | 350 |
100
101
  | `results.round_points_printed`, `majors.round_points_printed` | the `round_points_printed` a row of `results.stream` and `results.entries` carries (the per-round points a platform served, FeisFWD's, in its slot order, a slot served nothing in null); absent, never refused, without it | 350 |
101
102
  | `dancers.records.birth_consistency`, `dancers.years.birth_consistency` | the `birth_consistency` (0-100, floored: the percent of the dancer's, or the dancer-year's, readable rows that fit the birth window) and its denominator `birth_consistency_rows` a record of `dancers.records` and a dancer-year of `dancers.years` carry; absent, never refused, without it | 345 |
102
103
  | `dancers.records.birth_deadband`, `dancers.years.birth_deadband` | the `birth_deadband_rows` a record of `dancers.records` and a dancer-year of `dancers.years` carry (the readable rows a one-year dance-up alone keeps off the birth window, outside `birth_consistency` and its denominator); absent, never refused, without it | 345 |
@@ -104,6 +105,7 @@ c.features; // [{ feature: "dancers", state: "full" | "missing", missing: [...
104
105
  | `majors.tabs` | `majors.tabulated` | 215 |
105
106
  | `teams` | `teams.results`, `teams.rosters`, `teams.resultRosters` | 260 |
106
107
  | `teams.fields` | the fields `teams.results` (`age`, `gender`, `printed_status`) and `teams.rosters` (`dance`, `school_printed_as_of`, a member's `gender`) carry; absent, never refused, without it | 266 |
108
+ | `teams.recall` | the `competitors_printed` and `recalled_only` a row of `teams.results` carries; absent, never refused, without it | 350 |
107
109
  | `events` | `events.years` | 260 |
108
110
  | `upcoming.feises` | `upcoming.feises`, and the `next` of `feises.series` (null with the reason without it) | 285 |
109
111
  | `upcoming.fields`, `upcoming.entrants` | `upcoming.fields`, `upcoming.entrants` (285 and 290 carry the tables empty) | 291 |
@@ -643,6 +645,13 @@ nothing in null (`[null, null, "275"]`). No slot is mapped onto a round and noth
643
645
  null where no slot serves a value and on every other source's row. `points_printed` stays the one
644
646
  all-round figure a page prints.
645
647
 
648
+ THE MARKS TOTAL A PLATFORM SERVED, where the release carries it
649
+ (`rel.capability("results.marks_printed")`): `marks_printed`, iFeis's served `marks` beside its
650
+ `points`, one string verbatim (`"462.5"`). It names no round and no judge, so it is never split
651
+ or summed, and the places follow the points, not the marks. A Bucharest transcript row (2016-2019)
652
+ carries its printed mark the same way, one adjudicator's mark and no `points` (`"80"`). Null where
653
+ the row carries none and on every other source's row.
654
+
646
655
  THE COMPETITION FIELDS, where the release carries them (`rel.capability("results.stream.competition")`,
647
656
  `"majors.stream.competition"` for scope `majors`), are on every row, null meaning no value:
648
657
 
@@ -737,7 +746,7 @@ reason it is linked to neither (`TabRow`, `PanelSeat` and `FeisPanelSeat` name t
737
746
  const r = await rel.teams.results({ event: "<event>", year: 2024 });
738
747
  r.results; // [{ address, competition, event, year, comp_no, title, category, hands, age, gender,
739
748
  // letter, label, school_printed, school_id, place, place_printed, printed_status, tie,
740
- // competitors, atts, ... }]
749
+ // competitors, competitors_printed, recalled_only, atts, ... }]
741
750
  const t = await rel.teams.rosters({ event: "<event>", year: 2024 });
742
751
  t.teams; // [{ team, kind, event, year, comp_no, title, team_index, seq, school_id, school_printed,
743
752
  // school_printed_as_of, dance, members: [{ seq, name_printed, name, yob, gender, dancer_id, dancer_scope }] }]
@@ -756,7 +765,10 @@ roster team met the results (`exact`, `card`, `branch`) or why it did not (`no-r
756
765
  An event-year's dates are a window (`date_lo`, `date_hi`) with how fine it is (`resolution`:
757
766
  `day`, `month`, `calendar`) and what it is read from (`source`), and `place` is a place-tree node
758
767
  where the release knows one. A team result's `age` and `gender` are the competition's band and sex
759
- as the release reads them, `printed_status` the row's printed status cell verbatim. A roster
768
+ as the release reads them, `printed_status` the row's printed status cell verbatim. Its
769
+ `competitors` is the field: the printed count, except on a sheet that printed the recalled teams
770
+ only (`recalled_only`), where it is the entries the event-year's programme lists, never fewer than
771
+ the rows, and null with no list; `competitors_printed` is the printed count as printed. A roster
760
772
  team's `school_id` is its members' own school that year. Its `school_printed` is the school a
761
773
  registration system held for it on `school_printed_as_of`, often years later, so a rename or a move
762
774
  since shows there and it says nothing about the school that year. Its `dance` is the dance it was
@@ -769,7 +781,8 @@ THOSE NEWER FIELDS ARE ABSENT, NEVER NULL, ON A RELEASE THAT DOES NOT CARRY THEM
769
781
  `gender` (feature `teams.fields`, see the table above). Absent means "this release does not carry it", null
770
782
  means the release carries the field and has no value. `teams.results` and `teams.rosters` answer on
771
783
  every release the `teams` feature names, and `(await rel.capability("teams.fields")).state` says which shape
772
- a release has. The rows are read once per
784
+ a release has. A team result's `competitors_printed` and `recalled_only` are feature `teams.recall`,
785
+ absent the same way. The rows are read once per
773
786
  release into the `teams` and `events` indexes.
774
787
 
775
788
  ## Upcoming feiseanna and their competitor lists
@@ -594,6 +594,18 @@ var FEATURES2 = [
594
594
  since: 350,
595
595
  calls: "the same on a row of results.stream and results.entries (scope majors)"
596
596
  },
597
+ {
598
+ feature: "results.marks_printed",
599
+ needs: ["results:results.marks_printed"],
600
+ since: 350,
601
+ calls: "the `marks_printed` a row of results.stream and results.entries carries (the marks total a row served or printed, iFeis's and a Bucharest transcript row's, one string verbatim): absent, never refused, on a release without it"
602
+ },
603
+ {
604
+ feature: "majors.marks_printed",
605
+ needs: ["majors:results.marks_printed"],
606
+ since: 350,
607
+ calls: "the same on a row of results.stream and results.entries (scope majors)"
608
+ },
597
609
  {
598
610
  feature: "majors.attach_basis",
599
611
  needs: ["majors:results.attach_basis"],
@@ -748,6 +760,12 @@ var FEATURES2 = [
748
760
  since: 266,
749
761
  calls: "the fields teams.results (age, gender, printed_status) and teams.rosters (dance, school_printed_as_of, a member's gender) carry where present: absent, never refused, on a release without them"
750
762
  },
763
+ {
764
+ feature: "teams.recall",
765
+ needs: ["table:team_results.competitors_printed", "table:team_results.recalled_only"],
766
+ since: 350,
767
+ calls: "the competitors_printed and recalled_only a row of teams.results carries (competitors is the field, on a recall-only sheet the entries its programme lists): absent, never refused, on a release without them"
768
+ },
751
769
  {
752
770
  feature: "events",
753
771
  needs: [
@@ -1540,7 +1558,7 @@ function streamSql(q, shape = {}) {
1540
1558
  if (q.major !== undefined)
1541
1559
  where.push(q.major ? "r.major = 1" : "r.major = 0");
1542
1560
  return {
1543
- sql: `SELECT ${COLUMNS}${shape.competition === true ? COMPETITION_COLUMNS : ""}${shape.competitorsPrinted === true ? ", c.competitors_printed AS competitors_printed" : ""}${shape.attachBasis === true ? ", r.attach_basis AS attach_basis" : ""}${shape.major === true ? ", r.major AS major" : ""}${shape.relativePlaceErr === true ? ", r.relative_place_err AS relative_place_err" : ""}${shape.roundPoints === true ? ", r.round_points_printed AS round_points_printed" : ""} FROM results r JOIN competitions c ON c.file = r.file AND c.line = r.competition_line${where.length === 0 ? "" : ` WHERE ${where.join(" AND ")}`} ORDER BY r.file, r.line`,
1561
+ sql: `SELECT ${COLUMNS}${shape.competition === true ? COMPETITION_COLUMNS : ""}${shape.competitorsPrinted === true ? ", c.competitors_printed AS competitors_printed" : ""}${shape.attachBasis === true ? ", r.attach_basis AS attach_basis" : ""}${shape.major === true ? ", r.major AS major" : ""}${shape.relativePlaceErr === true ? ", r.relative_place_err AS relative_place_err" : ""}${shape.roundPoints === true ? ", r.round_points_printed AS round_points_printed" : ""}${shape.marks === true ? ", r.marks_printed AS marks_printed" : ""} FROM results r JOIN competitions c ON c.file = r.file AND c.line = r.competition_line${where.length === 0 ? "" : ` WHERE ${where.join(" AND ")}`} ORDER BY r.file, r.line`,
1544
1562
  args
1545
1563
  };
1546
1564
  }
@@ -1693,9 +1711,18 @@ class ResultFinder2 {
1693
1711
  const major = (await this.rel.capability(`${db}.major`)).state === "full";
1694
1712
  const relativePlaceErr = (await this.rel.capability(`${db}.relative_place_err`)).state === "full";
1695
1713
  const roundPoints = (await this.rel.capability(`${db}.round_points_printed`)).state === "full";
1714
+ const marks = (await this.rel.capability(`${db}.marks_printed`)).state === "full";
1696
1715
  return {
1697
1716
  db: this.rel.db(db),
1698
- shape: { competition, competitorsPrinted, attachBasis, major, relativePlaceErr, roundPoints }
1717
+ shape: {
1718
+ competition,
1719
+ competitorsPrinted,
1720
+ attachBasis,
1721
+ major,
1722
+ relativePlaceErr,
1723
+ roundPoints,
1724
+ marks
1725
+ }
1699
1726
  };
1700
1727
  }
1701
1728
  async* stream(q) {
@@ -3768,7 +3795,7 @@ CREATE TABLE result(address TEXT PRIMARY KEY, competition TEXT, event TEXT, year
3768
3795
  card TEXT, comp_no TEXT, title TEXT, category TEXT, hands INTEGER, letter TEXT, label TEXT,
3769
3796
  name_printed TEXT, school_printed TEXT, school_loc TEXT, school_id TEXT, place INTEGER,
3770
3797
  place_printed TEXT, tie INTEGER, competitors INTEGER, atts TEXT, age TEXT, gender TEXT,
3771
- printed_status TEXT, ord INTEGER);
3798
+ printed_status TEXT, competitors_printed INTEGER, recalled_only INTEGER, ord INTEGER);
3772
3799
  CREATE TABLE roster_team(team TEXT PRIMARY KEY, kind TEXT, event TEXT, year INTEGER,
3773
3800
  comp_no TEXT, title TEXT, team_index TEXT, seq INTEGER, school_id TEXT, school_printed TEXT,
3774
3801
  dance TEXT, school_printed_as_of TEXT, ord INTEGER);
@@ -3797,7 +3824,7 @@ async function readTables(rel, tables) {
3797
3824
  }
3798
3825
  var teamsIndex = {
3799
3826
  name: "teams",
3800
- version: "2",
3827
+ version: "3",
3801
3828
  inputs: TEAM_TABLES.map(tableAsset),
3802
3829
  says: "the team results, the roster teams with their members, and how they join, by event-year",
3803
3830
  load: (rel) => readTables(rel, TEAM_TABLES),
@@ -3815,10 +3842,10 @@ var teamsIndex = {
3815
3842
  ey.set(k, { event, year });
3816
3843
  putEy.run(k, event, year);
3817
3844
  }
3818
- const putR = out.prepare("INSERT OR IGNORE INTO result VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
3845
+ const putR = out.prepare("INSERT OR IGNORE INTO result VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
3819
3846
  let ord = 0;
3820
3847
  for (const r of t.team_results)
3821
- putR.run(str2(r.address), str2(r.slug), str2(r.event), num2(r.year), str2(r.card), str2(r.comp_no), str2(r.title), str2(r.category), num2(r.hands), str2(r.letter), str2(r.label), str2(r.name_printed), str2(r.school_printed), str2(r.school_loc), str2(r.school_id), num2(r.place), str2(r.place_printed), num2(r.tie), num2(r.competitors), JSON.stringify(strs(r.atts)), str2(r.age), str2(r.gender), JSON.stringify(strs(r.printed_status)), ord++);
3848
+ putR.run(str2(r.address), str2(r.slug), str2(r.event), num2(r.year), str2(r.card), str2(r.comp_no), str2(r.title), str2(r.category), num2(r.hands), str2(r.letter), str2(r.label), str2(r.name_printed), str2(r.school_printed), str2(r.school_loc), str2(r.school_id), num2(r.place), str2(r.place_printed), num2(r.tie), num2(r.competitors), JSON.stringify(strs(r.atts)), str2(r.age), str2(r.gender), JSON.stringify(strs(r.printed_status)), num2(r.competitors_printed), num2(r.recalled_only), ord++);
3822
3849
  const putT = out.prepare("INSERT OR IGNORE INTO roster_team VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
3823
3850
  for (const r of t.roster_teams) {
3824
3851
  const e = ey.get(str2(r.event_year) ?? "");
@@ -3881,24 +3908,29 @@ class TeamFinder2 {
3881
3908
  db() {
3882
3909
  return this.rel.indexDb("teams");
3883
3910
  }
3911
+ async hasRecall() {
3912
+ return (await this.rel.capability("teams.recall")).state === "full";
3913
+ }
3884
3914
  async hasFields() {
3885
3915
  return (await this.rel.capability("teams.fields")).state === "full";
3886
3916
  }
3887
3917
  async results(q = {}) {
3888
3918
  const db = await this.db();
3889
3919
  const fields = await this.hasFields();
3920
+ const recall = await this.hasRecall();
3890
3921
  const w = whereOf(q);
3891
3922
  const rows = db.query(`SELECT address, competition, event, year, card, comp_no, title, category, hands, letter,
3892
3923
  label, name_printed, school_printed, school_loc, school_id, place, place_printed, tie,
3893
- competitors, atts${fields ? ", age, gender, printed_status" : ""}
3924
+ competitors, atts${fields ? ", age, gender, printed_status" : ""}${recall ? ", competitors_printed, recalled_only" : ""}
3894
3925
  FROM result${w.sql} ORDER BY year, event, competition, place IS NULL, place, ord`).all(...w.args);
3895
3926
  return {
3896
3927
  tag: this.rel.tag,
3897
3928
  asked: q,
3898
- results: rows.map(({ printed_status, ...r }) => ({
3929
+ results: rows.map(({ printed_status, recalled_only, ...r }) => ({
3899
3930
  ...r,
3900
3931
  atts: JSON.parse(r.atts),
3901
- ...printed_status === undefined ? {} : { printed_status: JSON.parse(printed_status ?? "[]") }
3932
+ ...printed_status === undefined ? {} : { printed_status: JSON.parse(printed_status ?? "[]") },
3933
+ ...recalled_only === undefined ? {} : { recalled_only: recalled_only === 1 }
3902
3934
  }))
3903
3935
  };
3904
3936
  }
package/dist/cli.js CHANGED
@@ -23,7 +23,7 @@ import {
23
23
  staleWarning2,
24
24
  progressMode2,
25
25
  progressRenderer2
26
- } from "./chunks/index-9wetmb53.js";
26
+ } from "./chunks/index-kbg0a5pp.js";
27
27
  import"./chunks/index-hghdy980.js";
28
28
 
29
29
  var USAGE_HEADER = "usage: idq <verb> [--cache <dir>] [--repo <owner/name>] [--json] [--live] [--progress tty|plain|none]";
package/dist/index.js CHANGED
@@ -85,7 +85,7 @@ import {
85
85
  PROGRESS_MODES2,
86
86
  progressMode2,
87
87
  progressRenderer2
88
- } from "./chunks/index-9wetmb53.js";
88
+ } from "./chunks/index-kbg0a5pp.js";
89
89
  import {
90
90
  cacheRoot2,
91
91
  repoOf2
@@ -65,6 +65,7 @@ export interface StreamRow extends Partial<StreamCompetition> {
65
65
  yob_printed: string | null;
66
66
  points_printed: string | null;
67
67
  round_points_printed?: (string | null)[] | null;
68
+ marks_printed?: string | null;
68
69
  platform_dancer_id: string | null;
69
70
  primary_source: string | null;
70
71
  file: string;
@@ -81,6 +82,7 @@ export interface StreamShape {
81
82
  major?: boolean;
82
83
  relativePlaceErr?: boolean;
83
84
  roundPoints?: boolean;
85
+ marks?: boolean;
84
86
  }
85
87
  export declare const scopeDb: (s: StreamScope) => "majors" | "results";
86
88
  export declare function streamSql(q: StreamQuery, shape?: StreamShape): {
@@ -28,6 +28,8 @@ export interface TeamResult {
28
28
  age?: string | null;
29
29
  gender?: string | null;
30
30
  printed_status?: string[];
31
+ competitors_printed?: number | null;
32
+ recalled_only?: boolean;
31
33
  }
32
34
  export interface RosterMember {
33
35
  seq: number;
@@ -84,6 +86,7 @@ export declare class TeamFinder {
84
86
  private readonly rel;
85
87
  constructor(rel: Release);
86
88
  private db;
89
+ private hasRecall;
87
90
  private hasFields;
88
91
  results(q?: EventYearQuery): Promise<{
89
92
  tag: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finbheara/archive-client",
3
- "version": "0.49.0",
3
+ "version": "0.51.0",
4
4
  "description": "Open a versioned release of an Irish dance results archive: download, verify, decompress and cache it by tag, keep the cache, and resolve feises and schools against it",
5
5
  "keywords": ["irish-dance", "results", "release", "cache", "sqlite"],
6
6
  "license": "MIT",