@finbheara/archive-client 0.50.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,7 +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 platform served, iFeis's, one string verbatim beside its `points`); 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 |
101
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 |
102
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 |
103
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 |
@@ -105,6 +105,7 @@ c.features; // [{ feature: "dancers", state: "full" | "missing", missing: [...
105
105
  | `majors.tabs` | `majors.tabulated` | 215 |
106
106
  | `teams` | `teams.results`, `teams.rosters`, `teams.resultRosters` | 260 |
107
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 |
108
109
  | `events` | `events.years` | 260 |
109
110
  | `upcoming.feises` | `upcoming.feises`, and the `next` of `feises.series` (null with the reason without it) | 285 |
110
111
  | `upcoming.fields`, `upcoming.entrants` | `upcoming.fields`, `upcoming.entrants` (285 and 290 carry the tables empty) | 291 |
@@ -647,8 +648,9 @@ all-round figure a page prints.
647
648
  THE MARKS TOTAL A PLATFORM SERVED, where the release carries it
648
649
  (`rel.capability("results.marks_printed")`): `marks_printed`, iFeis's served `marks` beside its
649
650
  `points`, one string verbatim (`"462.5"`). It names no round and no judge, so it is never split
650
- or summed, and the places follow the points, not the marks. Null where the row serves none and on
651
- every other source's row.
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.
652
654
 
653
655
  THE COMPETITION FIELDS, where the release carries them (`rel.capability("results.stream.competition")`,
654
656
  `"majors.stream.competition"` for scope `majors`), are on every row, null meaning no value:
@@ -744,7 +746,7 @@ reason it is linked to neither (`TabRow`, `PanelSeat` and `FeisPanelSeat` name t
744
746
  const r = await rel.teams.results({ event: "<event>", year: 2024 });
745
747
  r.results; // [{ address, competition, event, year, comp_no, title, category, hands, age, gender,
746
748
  // letter, label, school_printed, school_id, place, place_printed, printed_status, tie,
747
- // competitors, atts, ... }]
749
+ // competitors, competitors_printed, recalled_only, atts, ... }]
748
750
  const t = await rel.teams.rosters({ event: "<event>", year: 2024 });
749
751
  t.teams; // [{ team, kind, event, year, comp_no, title, team_index, seq, school_id, school_printed,
750
752
  // school_printed_as_of, dance, members: [{ seq, name_printed, name, yob, gender, dancer_id, dancer_scope }] }]
@@ -763,7 +765,10 @@ roster team met the results (`exact`, `card`, `branch`) or why it did not (`no-r
763
765
  An event-year's dates are a window (`date_lo`, `date_hi`) with how fine it is (`resolution`:
764
766
  `day`, `month`, `calendar`) and what it is read from (`source`), and `place` is a place-tree node
765
767
  where the release knows one. A team result's `age` and `gender` are the competition's band and sex
766
- 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
767
772
  team's `school_id` is its members' own school that year. Its `school_printed` is the school a
768
773
  registration system held for it on `school_printed_as_of`, often years later, so a rename or a move
769
774
  since shows there and it says nothing about the school that year. Its `dance` is the dance it was
@@ -776,7 +781,8 @@ THOSE NEWER FIELDS ARE ABSENT, NEVER NULL, ON A RELEASE THAT DOES NOT CARRY THEM
776
781
  `gender` (feature `teams.fields`, see the table above). Absent means "this release does not carry it", null
777
782
  means the release carries the field and has no value. `teams.results` and `teams.rosters` answer on
778
783
  every release the `teams` feature names, and `(await rel.capability("teams.fields")).state` says which shape
779
- 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
780
786
  release into the `teams` and `events` indexes.
781
787
 
782
788
  ## Upcoming feiseanna and their competitor lists
@@ -598,7 +598,7 @@ var FEATURES2 = [
598
598
  feature: "results.marks_printed",
599
599
  needs: ["results:results.marks_printed"],
600
600
  since: 350,
601
- calls: "the `marks_printed` a row of results.stream and results.entries carries (the marks total a platform served, iFeis's, one string verbatim): absent, never refused, on a release without it"
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
602
  },
603
603
  {
604
604
  feature: "majors.marks_printed",
@@ -760,6 +760,12 @@ var FEATURES2 = [
760
760
  since: 266,
761
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"
762
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
+ },
763
769
  {
764
770
  feature: "events",
765
771
  needs: [
@@ -3789,7 +3795,7 @@ CREATE TABLE result(address TEXT PRIMARY KEY, competition TEXT, event TEXT, year
3789
3795
  card TEXT, comp_no TEXT, title TEXT, category TEXT, hands INTEGER, letter TEXT, label TEXT,
3790
3796
  name_printed TEXT, school_printed TEXT, school_loc TEXT, school_id TEXT, place INTEGER,
3791
3797
  place_printed TEXT, tie INTEGER, competitors INTEGER, atts TEXT, age TEXT, gender TEXT,
3792
- printed_status TEXT, ord INTEGER);
3798
+ printed_status TEXT, competitors_printed INTEGER, recalled_only INTEGER, ord INTEGER);
3793
3799
  CREATE TABLE roster_team(team TEXT PRIMARY KEY, kind TEXT, event TEXT, year INTEGER,
3794
3800
  comp_no TEXT, title TEXT, team_index TEXT, seq INTEGER, school_id TEXT, school_printed TEXT,
3795
3801
  dance TEXT, school_printed_as_of TEXT, ord INTEGER);
@@ -3818,7 +3824,7 @@ async function readTables(rel, tables) {
3818
3824
  }
3819
3825
  var teamsIndex = {
3820
3826
  name: "teams",
3821
- version: "2",
3827
+ version: "3",
3822
3828
  inputs: TEAM_TABLES.map(tableAsset),
3823
3829
  says: "the team results, the roster teams with their members, and how they join, by event-year",
3824
3830
  load: (rel) => readTables(rel, TEAM_TABLES),
@@ -3836,10 +3842,10 @@ var teamsIndex = {
3836
3842
  ey.set(k, { event, year });
3837
3843
  putEy.run(k, event, year);
3838
3844
  }
3839
- const putR = out.prepare("INSERT OR IGNORE INTO result VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
3845
+ const putR = out.prepare("INSERT OR IGNORE INTO result VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
3840
3846
  let ord = 0;
3841
3847
  for (const r of t.team_results)
3842
- 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++);
3843
3849
  const putT = out.prepare("INSERT OR IGNORE INTO roster_team VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
3844
3850
  for (const r of t.roster_teams) {
3845
3851
  const e = ey.get(str2(r.event_year) ?? "");
@@ -3902,24 +3908,29 @@ class TeamFinder2 {
3902
3908
  db() {
3903
3909
  return this.rel.indexDb("teams");
3904
3910
  }
3911
+ async hasRecall() {
3912
+ return (await this.rel.capability("teams.recall")).state === "full";
3913
+ }
3905
3914
  async hasFields() {
3906
3915
  return (await this.rel.capability("teams.fields")).state === "full";
3907
3916
  }
3908
3917
  async results(q = {}) {
3909
3918
  const db = await this.db();
3910
3919
  const fields = await this.hasFields();
3920
+ const recall = await this.hasRecall();
3911
3921
  const w = whereOf(q);
3912
3922
  const rows = db.query(`SELECT address, competition, event, year, card, comp_no, title, category, hands, letter,
3913
3923
  label, name_printed, school_printed, school_loc, school_id, place, place_printed, tie,
3914
- competitors, atts${fields ? ", age, gender, printed_status" : ""}
3924
+ competitors, atts${fields ? ", age, gender, printed_status" : ""}${recall ? ", competitors_printed, recalled_only" : ""}
3915
3925
  FROM result${w.sql} ORDER BY year, event, competition, place IS NULL, place, ord`).all(...w.args);
3916
3926
  return {
3917
3927
  tag: this.rel.tag,
3918
3928
  asked: q,
3919
- results: rows.map(({ printed_status, ...r }) => ({
3929
+ results: rows.map(({ printed_status, recalled_only, ...r }) => ({
3920
3930
  ...r,
3921
3931
  atts: JSON.parse(r.atts),
3922
- ...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 }
3923
3934
  }))
3924
3935
  };
3925
3936
  }
package/dist/cli.js CHANGED
@@ -23,7 +23,7 @@ import {
23
23
  staleWarning2,
24
24
  progressMode2,
25
25
  progressRenderer2
26
- } from "./chunks/index-4f6jpd5e.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-4f6jpd5e.js";
88
+ } from "./chunks/index-kbg0a5pp.js";
89
89
  import {
90
90
  cacheRoot2,
91
91
  repoOf2
@@ -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.50.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",