@finbheara/archive-client 0.48.0 → 0.49.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 +9 -1
- package/dist/chunks/{index-yv5gx1xs.js → index-9wetmb53.js} +19 -3
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/types/stream.d.ts +2 -0
- package/package.json +1 -1
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.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
101
|
| `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
102
|
| `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
103
|
| `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 +636,13 @@ competition beside its own fields: `competition`, `event`, `year`, `tier`, `comp
|
|
|
635
636
|
`(file, line)` is one row, where an `address` may carry one row per section). Rows come in the
|
|
636
637
|
release's own order, a competition's rows together.
|
|
637
638
|
|
|
639
|
+
THE PER-ROUND POINTS A PLATFORM SERVED, where the release carries them
|
|
640
|
+
(`rel.capability("results.round_points_printed")`): `round_points_printed`, FeisFWD's
|
|
641
|
+
served round points in its own slot order, each value a string as served and a slot it served
|
|
642
|
+
nothing in null (`[null, null, "275"]`). No slot is mapped onto a round and nothing is summed;
|
|
643
|
+
null where no slot serves a value and on every other source's row. `points_printed` stays the one
|
|
644
|
+
all-round figure a page prints.
|
|
645
|
+
|
|
638
646
|
THE COMPETITION FIELDS, where the release carries them (`rel.capability("results.stream.competition")`,
|
|
639
647
|
`"majors.stream.competition"` for scope `majors`), are on every row, null meaning no value:
|
|
640
648
|
|
|
@@ -645,7 +653,7 @@ THE COMPETITION FIELDS, where the release carries them (`rel.capability("results
|
|
|
645
653
|
| `dance` | the competition's one dance as the release reads it (`reel`), null where it reads none |
|
|
646
654
|
| `recalled_only` | true where the page printed the recalled dancers only |
|
|
647
655
|
| `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 |
|
|
656
|
+
| `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
657
|
|
|
650
658
|
A release without them streams every row with the six fields ABSENT, never null.
|
|
651
659
|
|
|
@@ -582,6 +582,18 @@ 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
|
+
},
|
|
585
597
|
{
|
|
586
598
|
feature: "majors.attach_basis",
|
|
587
599
|
needs: ["majors:results.attach_basis"],
|
|
@@ -1528,7 +1540,7 @@ function streamSql(q, shape = {}) {
|
|
|
1528
1540
|
if (q.major !== undefined)
|
|
1529
1541
|
where.push(q.major ? "r.major = 1" : "r.major = 0");
|
|
1530
1542
|
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`,
|
|
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`,
|
|
1532
1544
|
args
|
|
1533
1545
|
};
|
|
1534
1546
|
}
|
|
@@ -1540,7 +1552,7 @@ function feisDates(db) {
|
|
|
1540
1552
|
}
|
|
1541
1553
|
var text = (v) => v === null || v === "" ? null : v;
|
|
1542
1554
|
function rowOf(r, dates) {
|
|
1543
|
-
const { atts, withdrawn, recalled_only, ...rest } = r;
|
|
1555
|
+
const { atts, withdrawn, recalled_only, round_points_printed, ...rest } = r;
|
|
1544
1556
|
const d = dates.get(r.event);
|
|
1545
1557
|
return {
|
|
1546
1558
|
...rest,
|
|
@@ -1554,6 +1566,9 @@ function rowOf(r, dates) {
|
|
|
1554
1566
|
feis_date_lo: d?.lo ?? null,
|
|
1555
1567
|
feis_date_hi: d?.hi ?? null,
|
|
1556
1568
|
atts: atts === "" ? [] : atts.split(","),
|
|
1569
|
+
...round_points_printed === undefined ? {} : {
|
|
1570
|
+
round_points_printed: round_points_printed === null ? null : JSON.parse(round_points_printed)
|
|
1571
|
+
},
|
|
1557
1572
|
withdrawn: text(withdrawn),
|
|
1558
1573
|
qualifier: text(rest.qualifier),
|
|
1559
1574
|
primary_source: text(rest.primary_source),
|
|
@@ -1677,9 +1692,10 @@ class ResultFinder2 {
|
|
|
1677
1692
|
await this.rel.require(`${db}.major`);
|
|
1678
1693
|
const major = (await this.rel.capability(`${db}.major`)).state === "full";
|
|
1679
1694
|
const relativePlaceErr = (await this.rel.capability(`${db}.relative_place_err`)).state === "full";
|
|
1695
|
+
const roundPoints = (await this.rel.capability(`${db}.round_points_printed`)).state === "full";
|
|
1680
1696
|
return {
|
|
1681
1697
|
db: this.rel.db(db),
|
|
1682
|
-
shape: { competition, competitorsPrinted, attachBasis, major, relativePlaceErr }
|
|
1698
|
+
shape: { competition, competitorsPrinted, attachBasis, major, relativePlaceErr, roundPoints }
|
|
1683
1699
|
};
|
|
1684
1700
|
}
|
|
1685
1701
|
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-
|
|
26
|
+
} from "./chunks/index-9wetmb53.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
package/dist/types/stream.d.ts
CHANGED
|
@@ -64,6 +64,7 @@ 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;
|
|
67
68
|
platform_dancer_id: string | null;
|
|
68
69
|
primary_source: string | null;
|
|
69
70
|
file: string;
|
|
@@ -79,6 +80,7 @@ export interface StreamShape {
|
|
|
79
80
|
attachBasis?: boolean;
|
|
80
81
|
major?: boolean;
|
|
81
82
|
relativePlaceErr?: boolean;
|
|
83
|
+
roundPoints?: boolean;
|
|
82
84
|
}
|
|
83
85
|
export declare const scopeDb: (s: StreamScope) => "majors" | "results";
|
|
84
86
|
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.
|
|
3
|
+
"version": "0.49.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",
|