@finbheara/archive-client 0.47.0 → 0.48.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 +3 -0
- package/dist/chunks/{index-f9hvd661.js → index-yv5gx1xs.js} +15 -2
- 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
|
@@ -96,6 +96,7 @@ c.features; // [{ feature: "dancers", state: "full" | "missing", missing: [...
|
|
|
96
96
|
| `results.stream.competitors_printed`, `majors.stream.competitors_printed` | the `competitors_printed` a streamed row carries (the competed count the page printed); absent, never refused, without it | 345 |
|
|
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
|
+
| `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 |
|
|
99
100
|
| `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 |
|
|
100
101
|
| `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 |
|
|
101
102
|
| `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 |
|
|
@@ -654,6 +655,8 @@ A release without them streams every row with the six fields ABSENT, never null.
|
|
|
654
655
|
|
|
655
656
|
`major` (feature `results.major`, `majors.major` for scope `majors`) is 1 where the row's competition is a MAJOR'S MAIN EVENT: a solo championship (open or adult) or an either/or traditional set at a T1-T3 event, the competition a dancer came to the major for. A grade, a preliminary competition (a prelim-only one, or a prelim re-ranking of the open's field), a special, a traditional set co-entered with the championship, a mini championship beside its age group's full one and every feis row are 0. `majors.sqlite` holds exactly the 1s, so a reader of the full `results` set filters `rel.results.stream({ scope: "all", major: true })` to read what the majors stream reads. `tier` stays the event's. A release without the column returns the field absent and refuses the `major` filter by name (`needsRelease`).
|
|
656
657
|
|
|
658
|
+
`relative_place` is read over the LARGEST field the release admits for the competition, so first place is 100 over any field and a recalled dancer's value stays high on a recall list, and `relative_place_err` (feature `results.relative_place_err`, `majors.relative_place_err`) says how far below it the true value may sit: the true value lies in `[relative_place - relative_place_err, relative_place]`. It is 0 where the field is a counted or printed competed count (and on a first place, and over a registration count every entrant of which printed), larger over a registration count (its no-shows), a recall list (the field its cards admit) or a feis page printing no count (a field of up to 150). A consumer wanting only exact values filters `relative_place_err = 0`. A release without it returns the field absent.
|
|
659
|
+
|
|
657
660
|
THE COMPETITION'S KEY is `competition` (`<event-year>.<comp>` at a major, `<platform>:<host>.<comp>`
|
|
658
661
|
at a feis), which holds across releases. Inside one release `(file, competition_line)` is exact: a
|
|
659
662
|
competition captured twice (two files of one platform) carries one `competition` in both and two
|
|
@@ -570,6 +570,18 @@ var FEATURES2 = [
|
|
|
570
570
|
since: 345,
|
|
571
571
|
calls: "the same on a row of results.stream and results.entries (scope majors)"
|
|
572
572
|
},
|
|
573
|
+
{
|
|
574
|
+
feature: "results.relative_place_err",
|
|
575
|
+
needs: ["results:results.relative_place_err"],
|
|
576
|
+
since: 350,
|
|
577
|
+
calls: "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, on a release without it"
|
|
578
|
+
},
|
|
579
|
+
{
|
|
580
|
+
feature: "majors.relative_place_err",
|
|
581
|
+
needs: ["majors:results.relative_place_err"],
|
|
582
|
+
since: 350,
|
|
583
|
+
calls: "the same on a row of results.stream and results.entries (scope majors)"
|
|
584
|
+
},
|
|
573
585
|
{
|
|
574
586
|
feature: "majors.attach_basis",
|
|
575
587
|
needs: ["majors:results.attach_basis"],
|
|
@@ -1516,7 +1528,7 @@ function streamSql(q, shape = {}) {
|
|
|
1516
1528
|
if (q.major !== undefined)
|
|
1517
1529
|
where.push(q.major ? "r.major = 1" : "r.major = 0");
|
|
1518
1530
|
return {
|
|
1519
|
-
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" : ""} 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`,
|
|
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`,
|
|
1520
1532
|
args
|
|
1521
1533
|
};
|
|
1522
1534
|
}
|
|
@@ -1664,9 +1676,10 @@ class ResultFinder2 {
|
|
|
1664
1676
|
if (q.major !== undefined)
|
|
1665
1677
|
await this.rel.require(`${db}.major`);
|
|
1666
1678
|
const major = (await this.rel.capability(`${db}.major`)).state === "full";
|
|
1679
|
+
const relativePlaceErr = (await this.rel.capability(`${db}.relative_place_err`)).state === "full";
|
|
1667
1680
|
return {
|
|
1668
1681
|
db: this.rel.db(db),
|
|
1669
|
-
shape: { competition, competitorsPrinted, attachBasis, major }
|
|
1682
|
+
shape: { competition, competitorsPrinted, attachBasis, major, relativePlaceErr }
|
|
1670
1683
|
};
|
|
1671
1684
|
}
|
|
1672
1685
|
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-yv5gx1xs.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
|
@@ -48,6 +48,7 @@ export interface StreamRow extends Partial<StreamCompetition> {
|
|
|
48
48
|
place_printed: string;
|
|
49
49
|
tie: number;
|
|
50
50
|
relative_place: number | null;
|
|
51
|
+
relative_place_err?: number | null;
|
|
51
52
|
atts: string[];
|
|
52
53
|
withdrawn: string | null;
|
|
53
54
|
qualifier: string | null;
|
|
@@ -77,6 +78,7 @@ export interface StreamShape {
|
|
|
77
78
|
competitorsPrinted?: boolean;
|
|
78
79
|
attachBasis?: boolean;
|
|
79
80
|
major?: boolean;
|
|
81
|
+
relativePlaceErr?: boolean;
|
|
80
82
|
}
|
|
81
83
|
export declare const scopeDb: (s: StreamScope) => "majors" | "results";
|
|
82
84
|
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.48.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",
|