@lde/distribution-health 0.1.1
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 +34 -0
- package/package.json +34 -0
package/README.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Distribution Health
|
|
2
|
+
|
|
3
|
+
Derives a distribution’s **usability** from two separately-produced signals:
|
|
4
|
+
|
|
5
|
+
- **reachability** – can the distribution be fetched? (HTTP/SPARQL level, produced continuously by the crawler’s probe)
|
|
6
|
+
- **validity** – does the fetched content actually parse as RDF? (a by-product of parsing: shallow by the crawler, deep by the knowledge-graph pipeline)
|
|
7
|
+
|
|
8
|
+
This is a pure leaf: it _interprets_ the raw results of `@lde/distribution-probe`
|
|
9
|
+
and `@lde/sparql-importer` rather than producing them. It contains no I/O and
|
|
10
|
+
returns plain TypeScript – converting a verdict to RDF is the consumer’s job (see
|
|
11
|
+
below), so the package stays vocabulary-agnostic.
|
|
12
|
+
|
|
13
|
+
## What it provides
|
|
14
|
+
|
|
15
|
+
- A `ValidityVerdict` type with a typed failure reason (`parse-error` / `empty`),
|
|
16
|
+
a best-effort parser message, the `validatedFingerprint` it was judged against,
|
|
17
|
+
and its producer depth (`shallow` / `deep`).
|
|
18
|
+
- Mappers from a probe result (shallow) and an import outcome (deep) to a verdict.
|
|
19
|
+
- The **usability rollup**: `(reachability, validity verdicts) → { usable | unusable | unknown, cause }`,
|
|
20
|
+
the one canonical rule consumers share. Reachability dominates; a stale verdict
|
|
21
|
+
(one whose fingerprint no longer matches the currently-observed one) decays to
|
|
22
|
+
`unknown`; a deep verdict beats a shallow one.
|
|
23
|
+
|
|
24
|
+
## RDF is the consumer’s responsibility
|
|
25
|
+
|
|
26
|
+
This package emits no RDF and coins no vocabulary, mirroring `@lde/iiif-validator`
|
|
27
|
+
(which returns a TS verdict that the NDE knowledge-graph pipeline maps to RDF).
|
|
28
|
+
A consumer turns a `ValidityVerdict` into its own DQV/PROV quads under its own
|
|
29
|
+
namespace – e.g. NDE writes a `dqv:QualityMeasurement` on the distribution under
|
|
30
|
+
`def.nde.nl`. The `ValidityFailureReason` local names are chosen to drop straight
|
|
31
|
+
into a SKOS failure scheme (`<scheme>#${reason}`) with no lookup table.
|
|
32
|
+
|
|
33
|
+
The normative usability rule and the rejected alternatives are recorded in the
|
|
34
|
+
PRD: netwerk-digitaal-erfgoed/dataset-register#2103.
|
package/package.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@lde/distribution-health",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"repository": {
|
|
5
|
+
"url": "git+https://github.com/ldelements/lde.git",
|
|
6
|
+
"directory": "packages/distribution-health"
|
|
7
|
+
},
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"type": "module",
|
|
10
|
+
"exports": {
|
|
11
|
+
"./package.json": "./package.json",
|
|
12
|
+
".": {
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"import": "./dist/index.js",
|
|
15
|
+
"development": "./src/index.ts",
|
|
16
|
+
"default": "./dist/index.js"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"main": "./dist/index.js",
|
|
20
|
+
"module": "./dist/index.js",
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
22
|
+
"files": [
|
|
23
|
+
"dist",
|
|
24
|
+
"!**/*.tsbuildinfo"
|
|
25
|
+
],
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"@lde/distribution-probe": "0.1.10",
|
|
28
|
+
"@lde/sparql-importer": "0.6.5",
|
|
29
|
+
"tslib": "^2.3.0"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"@lde/dataset": "0.7.7"
|
|
33
|
+
}
|
|
34
|
+
}
|