@finbheara/archive-client 0.48.0 → 0.50.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,8 @@ 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 |
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 |
100
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 |
101
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 |
102
104
  | `dancers.years.printed` | the `printed_regions` a dancer-year of `dancers.years` carries (every region the year printed, where `region` picks one); absent, never refused, without it | 341 |
@@ -635,6 +637,19 @@ competition beside its own fields: `competition`, `event`, `year`, `tier`, `comp
635
637
  `(file, line)` is one row, where an `address` may carry one row per section). Rows come in the
636
638
  release's own order, a competition's rows together.
637
639
 
640
+ THE PER-ROUND POINTS A PLATFORM SERVED, where the release carries them
641
+ (`rel.capability("results.round_points_printed")`): `round_points_printed`, FeisFWD's
642
+ served round points in its own slot order, each value a string as served and a slot it served
643
+ nothing in null (`[null, null, "275"]`). No slot is mapped onto a round and nothing is summed;
644
+ null where no slot serves a value and on every other source's row. `points_printed` stays the one
645
+ all-round figure a page prints.
646
+
647
+ THE MARKS TOTAL A PLATFORM SERVED, where the release carries it
648
+ (`rel.capability("results.marks_printed")`): `marks_printed`, iFeis's served `marks` beside its
649
+ `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.
652
+
638
653
  THE COMPETITION FIELDS, where the release carries them (`rel.capability("results.stream.competition")`,
639
654
  `"majors.stream.competition"` for scope `majors`), are on every row, null meaning no value:
640
655
 
@@ -645,7 +660,7 @@ THE COMPETITION FIELDS, where the release carries them (`rel.capability("results
645
660
  | `dance` | the competition's one dance as the release reads it (`reel`), null where it reads none |
646
661
  | `recalled_only` | true where the page printed the recalled dancers only |
647
662
  | `comp_flags` | what the page printed about itself, int-packed, one bit a flag (bit 10: recalled only). The release's `DATA-DICTIONARY.md` carries the register of every bit, and a published bit never moves |
648
- | `competitors_basis` | what `competitors` stands on: `printed` (the page printed a competed count), `counted` (the page printed the whole field, its cards counted), `net-entered` (FeisWeb: the entered count less the withdrawn one, who danced), `awards` (FeisWeb: the fewest dancers its `Awards To Top N Finishers ( p% )` line is a share of, who danced), `entered` or `registered` (only the top was printed: the page's entered or registered count, a REGISTRATION figure holding the no-shows), `estimated` (a majors sheet with no count that does not show its whole field: the recall rule over a recall-only sheet (twice the recalled, plus or minus 1, or the recalled where fewer than 10), else the dancers it printed, a FLOOR; never a count, so leave it out where a real count is needed), null where there is no number |
663
+ | `competitors_basis` | what `competitors` stands on: `printed` (the page printed a competed count), `counted` (the page printed the whole field, its cards counted), `net-entered` (FeisWeb: the entered count less the withdrawn one, who danced), `awards` (FeisWeb: the fewest dancers its `Awards To Top N Finishers ( p% )` line is a share of, who danced), `entered` or `registered` (only the top was printed: the page's entered or registered count, a REGISTRATION figure holding the no-shows), `estimated` (a majors sheet with no count that does not show its whole field: the recall rule over a recall-only sheet (twice the recalled, plus or minus 1, or the recalled where fewer than 10), else the dancers it printed, a FLOOR; never a count, so leave it out where a real count is needed), `placed` (the page's count fell below the last place of its placed run, so the field is that place: a dancer placed N-th proves N danced; a competed count), null where there is no number |
649
664
 
650
665
  A release without them streams every row with the six fields ABSENT, never null.
651
666
 
@@ -582,6 +582,30 @@ var FEATURES2 = [
582
582
  since: 350,
583
583
  calls: "the same on a row of results.stream and results.entries (scope majors)"
584
584
  },
585
+ {
586
+ feature: "results.round_points_printed",
587
+ needs: ["results:results.round_points_printed"],
588
+ since: 350,
589
+ calls: "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, on a release without it"
590
+ },
591
+ {
592
+ feature: "majors.round_points_printed",
593
+ needs: ["majors:results.round_points_printed"],
594
+ since: 350,
595
+ calls: "the same on a row of results.stream and results.entries (scope majors)"
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 platform served, iFeis'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
+ },
585
609
  {
586
610
  feature: "majors.attach_basis",
587
611
  needs: ["majors:results.attach_basis"],
@@ -1528,7 +1552,7 @@ function streamSql(q, shape = {}) {
1528
1552
  if (q.major !== undefined)
1529
1553
  where.push(q.major ? "r.major = 1" : "r.major = 0");
1530
1554
  return {
1531
- 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" : ""} 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`,
1555
+ 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`,
1532
1556
  args
1533
1557
  };
1534
1558
  }
@@ -1540,7 +1564,7 @@ function feisDates(db) {
1540
1564
  }
1541
1565
  var text = (v) => v === null || v === "" ? null : v;
1542
1566
  function rowOf(r, dates) {
1543
- const { atts, withdrawn, recalled_only, ...rest } = r;
1567
+ const { atts, withdrawn, recalled_only, round_points_printed, ...rest } = r;
1544
1568
  const d = dates.get(r.event);
1545
1569
  return {
1546
1570
  ...rest,
@@ -1554,6 +1578,9 @@ function rowOf(r, dates) {
1554
1578
  feis_date_lo: d?.lo ?? null,
1555
1579
  feis_date_hi: d?.hi ?? null,
1556
1580
  atts: atts === "" ? [] : atts.split(","),
1581
+ ...round_points_printed === undefined ? {} : {
1582
+ round_points_printed: round_points_printed === null ? null : JSON.parse(round_points_printed)
1583
+ },
1557
1584
  withdrawn: text(withdrawn),
1558
1585
  qualifier: text(rest.qualifier),
1559
1586
  primary_source: text(rest.primary_source),
@@ -1677,9 +1704,19 @@ class ResultFinder2 {
1677
1704
  await this.rel.require(`${db}.major`);
1678
1705
  const major = (await this.rel.capability(`${db}.major`)).state === "full";
1679
1706
  const relativePlaceErr = (await this.rel.capability(`${db}.relative_place_err`)).state === "full";
1707
+ const roundPoints = (await this.rel.capability(`${db}.round_points_printed`)).state === "full";
1708
+ const marks = (await this.rel.capability(`${db}.marks_printed`)).state === "full";
1680
1709
  return {
1681
1710
  db: this.rel.db(db),
1682
- shape: { competition, competitorsPrinted, attachBasis, major, relativePlaceErr }
1711
+ shape: {
1712
+ competition,
1713
+ competitorsPrinted,
1714
+ attachBasis,
1715
+ major,
1716
+ relativePlaceErr,
1717
+ roundPoints,
1718
+ marks
1719
+ }
1683
1720
  };
1684
1721
  }
1685
1722
  async* stream(q) {
package/dist/cli.js CHANGED
@@ -23,7 +23,7 @@ import {
23
23
  staleWarning2,
24
24
  progressMode2,
25
25
  progressRenderer2
26
- } from "./chunks/index-yv5gx1xs.js";
26
+ } from "./chunks/index-4f6jpd5e.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-yv5gx1xs.js";
88
+ } from "./chunks/index-4f6jpd5e.js";
89
89
  import {
90
90
  cacheRoot2,
91
91
  repoOf2
@@ -64,6 +64,8 @@ export interface StreamRow extends Partial<StreamCompetition> {
64
64
  yob: number | null;
65
65
  yob_printed: string | null;
66
66
  points_printed: string | null;
67
+ round_points_printed?: (string | null)[] | null;
68
+ marks_printed?: string | null;
67
69
  platform_dancer_id: string | null;
68
70
  primary_source: string | null;
69
71
  file: string;
@@ -79,6 +81,8 @@ export interface StreamShape {
79
81
  attachBasis?: boolean;
80
82
  major?: boolean;
81
83
  relativePlaceErr?: boolean;
84
+ roundPoints?: boolean;
85
+ marks?: boolean;
82
86
  }
83
87
  export declare const scopeDb: (s: StreamScope) => "majors" | "results";
84
88
  export declare function streamSql(q: StreamQuery, shape?: StreamShape): {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finbheara/archive-client",
3
- "version": "0.48.0",
3
+ "version": "0.50.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",