@finbheara/archive-client 0.42.0 → 0.44.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 +10 -2
- package/dist/chunks/{index-0xdcttqf.js → index-kfc7hz90.js} +33 -2
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/types/dancers.d.ts +6 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -95,6 +95,8 @@ c.features; // [{ feature: "dancers", state: "full" | "missing", missing: [...
|
|
|
95
95
|
| `dancers.years` | `dancers.years` | 245 |
|
|
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
|
+
| `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 |
|
|
99
|
+
| `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 |
|
|
98
100
|
| `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 |
|
|
99
101
|
| `majors.tabs` | `majors.tabulated` | 215 |
|
|
100
102
|
| `teams` | `teams.results`, `teams.rosters`, `teams.resultRosters` | 260 |
|
|
@@ -668,10 +670,16 @@ the place the address's recall row carries.
|
|
|
668
670
|
```ts
|
|
669
671
|
await rel.dancers.records(); // every dancer: display, appearances, birth_lo, birth_hi,
|
|
670
672
|
// birth_source, birth_conflict, genders, scope,
|
|
671
|
-
// names_printed (dancers.records.names)
|
|
673
|
+
// names_printed (dancers.records.names),
|
|
674
|
+
// birth_consistency, birth_consistency_rows
|
|
675
|
+
// (dancers.records.birth_consistency),
|
|
676
|
+
// birth_deadband_rows (dancers.records.birth_deadband)
|
|
672
677
|
await rel.dancers.records({ ids: [1001] });
|
|
673
678
|
await rel.dancers.years({ ids: [1001], year: 2025 }); // region, region_source, nationals, geohash
|
|
674
|
-
// printed_regions (dancers.years.printed)
|
|
679
|
+
// printed_regions (dancers.years.printed),
|
|
680
|
+
// birth_consistency, birth_consistency_rows
|
|
681
|
+
// (dancers.years.birth_consistency),
|
|
682
|
+
// birth_deadband_rows (dancers.years.birth_deadband)
|
|
675
683
|
await rel.feises.dates(); // every feis id with its first and last day
|
|
676
684
|
await rel.majors.tabulated({ min_true_round: 3 }); // the majors addresses marked to round 3 or later
|
|
677
685
|
```
|
|
@@ -608,6 +608,33 @@ var FEATURES2 = [
|
|
|
608
608
|
since: 245,
|
|
609
609
|
calls: "dancers.years"
|
|
610
610
|
},
|
|
611
|
+
{
|
|
612
|
+
feature: "dancers.records.birth_consistency",
|
|
613
|
+
needs: ["results:dancers.birth_consistency", "results:dancers.birth_consistency_rows"],
|
|
614
|
+
since: 345,
|
|
615
|
+
calls: "the `birth_consistency` and `birth_consistency_rows` a record of dancers.records carries (the percent of its readable rows that fit its birth window, and how many were readable): absent, never refused, on a release without them"
|
|
616
|
+
},
|
|
617
|
+
{
|
|
618
|
+
feature: "dancers.years.birth_consistency",
|
|
619
|
+
needs: [
|
|
620
|
+
"results:dancer_years.birth_consistency",
|
|
621
|
+
"results:dancer_years.birth_consistency_rows"
|
|
622
|
+
],
|
|
623
|
+
since: 345,
|
|
624
|
+
calls: "the `birth_consistency` and `birth_consistency_rows` a dancer-year of dancers.years carries: absent, never refused, on a release without them"
|
|
625
|
+
},
|
|
626
|
+
{
|
|
627
|
+
feature: "dancers.records.birth_deadband",
|
|
628
|
+
needs: ["results:dancers.birth_deadband_rows"],
|
|
629
|
+
since: 345,
|
|
630
|
+
calls: "the `birth_deadband_rows` a record of dancers.records carries (its readable rows a one-year dance-up alone keeps off its birth window, outside `birth_consistency` and its denominator): absent, never refused, on a release without it"
|
|
631
|
+
},
|
|
632
|
+
{
|
|
633
|
+
feature: "dancers.years.birth_deadband",
|
|
634
|
+
needs: ["results:dancer_years.birth_deadband_rows"],
|
|
635
|
+
since: 345,
|
|
636
|
+
calls: "the `birth_deadband_rows` a dancer-year of dancers.years carries: absent, never refused, on a release without it"
|
|
637
|
+
},
|
|
611
638
|
{
|
|
612
639
|
feature: "dancers.years.printed",
|
|
613
640
|
needs: ["results:dancer_years.printed_regions"],
|
|
@@ -2286,7 +2313,9 @@ class DancerResolver2 {
|
|
|
2286
2313
|
await this.rel.require("dancers.records");
|
|
2287
2314
|
const db = this.rel.db("results");
|
|
2288
2315
|
const names = (await this.rel.capability("dancers.records.names")).state === "full";
|
|
2289
|
-
const
|
|
2316
|
+
const fit = (await this.rel.capability("dancers.records.birth_consistency")).state === "full";
|
|
2317
|
+
const dead = (await this.rel.capability("dancers.records.birth_deadband")).state === "full";
|
|
2318
|
+
const sql = `SELECT dancer_id, display, appearances, birth_lo, birth_hi, birth_source, birth_conflict, genders${names ? ", names_printed" : ""}${fit ? ", birth_consistency, birth_consistency_rows" : ""}${dead ? ", birth_deadband_rows" : ""} FROM dancers`;
|
|
2290
2319
|
const rows = q.ids === undefined ? db.query(`${sql} ORDER BY dancer_id`).all() : idChunks(q.ids).flatMap((c) => db.query(`${sql} WHERE dancer_id IN (${c.map(() => "?").join(",")})`).all(...c));
|
|
2291
2320
|
rows.sort((a, b) => a.dancer_id - b.dancer_id);
|
|
2292
2321
|
return {
|
|
@@ -2305,7 +2334,9 @@ class DancerResolver2 {
|
|
|
2305
2334
|
await this.rel.require("dancers.years");
|
|
2306
2335
|
const db = this.rel.db("results");
|
|
2307
2336
|
const printed = (await this.rel.capability("dancers.years.printed")).state === "full";
|
|
2308
|
-
const
|
|
2337
|
+
const fit = (await this.rel.capability("dancers.years.birth_consistency")).state === "full";
|
|
2338
|
+
const dead = (await this.rel.capability("dancers.years.birth_deadband")).state === "full";
|
|
2339
|
+
const sql = `SELECT dancer_id, year, region, region_source, nationals, nationals_source, geohash${printed ? ", printed_regions" : ""}${fit ? ", birth_consistency, birth_consistency_rows" : ""}${dead ? ", birth_deadband_rows" : ""} FROM dancer_years`;
|
|
2309
2340
|
const yearSql = q.year === undefined ? "" : " AND year = ?";
|
|
2310
2341
|
const yearArgs = q.year === undefined ? [] : [q.year];
|
|
2311
2342
|
const rows = q.ids === undefined ? db.query(`${sql} WHERE 1${yearSql} ORDER BY dancer_id, year`).all(...yearArgs) : idChunks(q.ids).flatMap((c) => db.query(`${sql} WHERE dancer_id IN (${c.map(() => "?").join(",")})${yearSql}`).all(...c, ...yearArgs));
|
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-kfc7hz90.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/dancers.d.ts
CHANGED
|
@@ -193,6 +193,9 @@ export interface DancerBulkRecord {
|
|
|
193
193
|
birth_hi: number | null;
|
|
194
194
|
birth_source: string;
|
|
195
195
|
birth_conflict: boolean;
|
|
196
|
+
birth_consistency?: number | null;
|
|
197
|
+
birth_consistency_rows?: number;
|
|
198
|
+
birth_deadband_rows?: number;
|
|
196
199
|
genders: string[];
|
|
197
200
|
names_printed?: string[];
|
|
198
201
|
}
|
|
@@ -205,6 +208,9 @@ export interface DancerYear {
|
|
|
205
208
|
nationals_source: string | null;
|
|
206
209
|
geohash: string | null;
|
|
207
210
|
printed_regions?: string[];
|
|
211
|
+
birth_consistency?: number | null;
|
|
212
|
+
birth_consistency_rows?: number;
|
|
213
|
+
birth_deadband_rows?: number;
|
|
208
214
|
}
|
|
209
215
|
export declare class DancerResolver {
|
|
210
216
|
private readonly rel;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finbheara/archive-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.44.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",
|