@finbheara/archive-client 0.16.2 → 0.17.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 +11 -3
- package/dist/chunks/{index-bpd2j026.js → index-598c5w9d.js} +22 -3
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/types/school-links.d.ts +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -228,9 +228,17 @@ unknown type, each dated where a year is known) read by `@finbheara/domain/schoo
|
|
|
228
228
|
simple path between two schools, each with its flags (`relatedHops`, `maxYearGap`, `datedAfter`,
|
|
229
229
|
`undated`, `provisional`, `redirected` and the rest), never a yes or a no. Pass a `policy`, your
|
|
230
230
|
reading over those flags, and the answer carries its verdict (`l.policy.passes`), exact however
|
|
231
|
-
many paths are listed. A retired id is followed to the live one.
|
|
232
|
-
|
|
233
|
-
|
|
231
|
+
many paths are listed. A retired id is followed to the live one.
|
|
232
|
+
|
|
233
|
+
A release that publishes the decision behind each edge (a lineage line's `decision` and
|
|
234
|
+
`confidence`) gives each step its `link.decision` and `link.confidence`. A path's `confidence` is
|
|
235
|
+
its weakest step's. Read it for what it is: the decision's probability that the two ids are
|
|
236
|
+
not one school. It is not the probability that the edge's shape or year is right, nor that the
|
|
237
|
+
two schools are linked at all: a decision whose alternative is two schools with no link counts
|
|
238
|
+
that alternative inside its confidence. An edge no recorded decision backs has a `null` `decision`: its step reads
|
|
239
|
+
`unbacked`, the path counts it in `flags.unbacked`, and the path's `confidence` is `null`. On a
|
|
240
|
+
release that publishes neither field, no step carries either, no path is `unbacked`, and every
|
|
241
|
+
path's `confidence` is `null`. A release that publishes no lineage refuses both calls by name.
|
|
234
242
|
|
|
235
243
|
## Dancers
|
|
236
244
|
|
|
@@ -650,12 +650,31 @@ function linksOfLineage2(lines) {
|
|
|
650
650
|
const k = `${from}\x00${to}\x00${r.shape}\x00${year}`;
|
|
651
651
|
const was = seen.get(k);
|
|
652
652
|
if (was === undefined)
|
|
653
|
-
seen.set(k, {
|
|
654
|
-
|
|
655
|
-
|
|
653
|
+
seen.set(k, {
|
|
654
|
+
from,
|
|
655
|
+
to,
|
|
656
|
+
shape: r.shape,
|
|
657
|
+
year,
|
|
658
|
+
provisional: r.provisional === true,
|
|
659
|
+
...backingOf(r)
|
|
660
|
+
});
|
|
661
|
+
else {
|
|
662
|
+
if (r.provisional === true)
|
|
663
|
+
was.provisional = true;
|
|
664
|
+
if (was.decision === undefined)
|
|
665
|
+
Object.assign(was, backingOf(r));
|
|
666
|
+
}
|
|
656
667
|
}
|
|
657
668
|
return [...seen.values()];
|
|
658
669
|
}
|
|
670
|
+
function backingOf(r) {
|
|
671
|
+
if (r.decision === undefined)
|
|
672
|
+
return {};
|
|
673
|
+
return {
|
|
674
|
+
decision: r.decision,
|
|
675
|
+
confidence: typeof r.confidence === "number" ? r.confidence : null
|
|
676
|
+
};
|
|
677
|
+
}
|
|
659
678
|
async function releaseSchoolGraph2(rel) {
|
|
660
679
|
await rel.require("schools.lineage");
|
|
661
680
|
await rel.fetch(LINEAGE_FILE2);
|
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -8,6 +8,8 @@ export interface LineageLine {
|
|
|
8
8
|
shape: string;
|
|
9
9
|
year?: number | null;
|
|
10
10
|
provisional?: boolean;
|
|
11
|
+
decision?: string | null;
|
|
12
|
+
confidence?: number | null;
|
|
11
13
|
}
|
|
12
14
|
export declare function linksOfLineage(lines: Iterable<LineageLine>): SchoolLink[];
|
|
13
15
|
export declare function releaseSchoolGraph(rel: Release): Promise<SchoolGraph>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finbheara/archive-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.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",
|