@lde/pipeline-void 0.28.2 → 0.28.3
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/dist/stage.d.ts +5 -2
- package/dist/stage.d.ts.map +1 -1
- package/dist/stage.js +8 -15
- package/package.json +2 -2
package/dist/stage.d.ts
CHANGED
|
@@ -2,10 +2,13 @@ import { Stage } from '@lde/pipeline';
|
|
|
2
2
|
import type { Quad } from '@rdfjs/types';
|
|
3
3
|
/**
|
|
4
4
|
* Options for configuring VoID stage execution.
|
|
5
|
+
*
|
|
6
|
+
* Per-request timeouts are configured at the {@link Pipeline} level via
|
|
7
|
+
* `PipelineOptions.timeout`; VoID stages no longer expose their own timeout
|
|
8
|
+
* knob. Kept as a named type so per-class / per-stages option types can
|
|
9
|
+
* extend it as more knobs are added.
|
|
5
10
|
*/
|
|
6
11
|
export interface VoidStageOptions {
|
|
7
|
-
/** SPARQL query timeout in milliseconds. @default 60000 */
|
|
8
|
-
timeout?: number;
|
|
9
12
|
}
|
|
10
13
|
/**
|
|
11
14
|
* Options for per-class VoID stages that iterate over classes.
|
package/dist/stage.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stage.d.ts","sourceRoot":"","sources":["../src/stage.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EAMN,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAezC
|
|
1
|
+
{"version":3,"file":"stage.d.ts","sourceRoot":"","sources":["../src/stage.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EAMN,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAezC;;;;;;;GAOG;AAEH,MAAM,WAAW,gBAAgB;CAAG;AAEpC;;;;;GAKG;AACH,MAAM,WAAW,wBAAyB,SAAQ,gBAAgB;IAChE,sEAAsE;IACt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AAC,KAAK,CAAC,CAEzE;AAED,wBAAgB,cAAc,CAAC,OAAO,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,KAAK,CAAC,CAEzE;AAID,wBAAgB,qBAAqB,CACnC,OAAO,CAAC,EAAE,wBAAwB,GACjC,OAAO,CAAC,KAAK,CAAC,CAKhB;AAED,wBAAgB,iBAAiB,CAC/B,OAAO,CAAC,EAAE,wBAAwB,GACjC,OAAO,CAAC,KAAK,CAAC,CAKhB;AAED,wBAAgB,iBAAiB,CAC/B,OAAO,CAAC,EAAE,wBAAwB,GACjC,OAAO,CAAC,KAAK,CAAC,CAKhB;AAID,wBAAgB,SAAS,CACvB,WAAW,EAAE,WAAW,CAAC,MAAM,EAAE,SAAS,IAAI,EAAE,CAAC,EACjD,OAAO,CAAC,EAAE,gBAAgB,GACzB,OAAO,CAAC,KAAK,CAAC,CAMhB;AAED,MAAM,WAAW,yBAA0B,SAAQ,gBAAgB;IACjE,mFAAmF;IACnF,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAClC;AAED,wBAAgB,kBAAkB,CAChC,OAAO,CAAC,EAAE,yBAAyB,GAClC,OAAO,CAAC,KAAK,CAAC,CAWhB;AAED;;;;;;;GAOG;AACH,wBAAsB,UAAU,CAC9B,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,KAAK,EAAE,CAAC,CAgClB"}
|
package/dist/stage.js
CHANGED
|
@@ -7,11 +7,7 @@ import { UriSpaceExecutor } from './uriSpaceExecutor.js';
|
|
|
7
7
|
const queriesDir = resolve(dirname(fileURLToPath(import.meta.url)), '..', 'queries');
|
|
8
8
|
async function createVoidStage(filename, options) {
|
|
9
9
|
const query = await readQueryFile(resolve(queriesDir, filename));
|
|
10
|
-
const executor = options?.executor?.(query) ??
|
|
11
|
-
new SparqlConstructExecutor({
|
|
12
|
-
query,
|
|
13
|
-
timeout: options?.timeout ?? 60_000,
|
|
14
|
-
});
|
|
10
|
+
const executor = options?.executor?.(query) ?? new SparqlConstructExecutor({ query });
|
|
15
11
|
if (options?.perClass) {
|
|
16
12
|
return new Stage({
|
|
17
13
|
name: filename,
|
|
@@ -28,7 +24,10 @@ async function createVoidStage(filename, options) {
|
|
|
28
24
|
}
|
|
29
25
|
function classSelector() {
|
|
30
26
|
return {
|
|
31
|
-
|
|
27
|
+
// Forward `options` so the Pipeline’s per-dataset TimeoutPolicy
|
|
28
|
+
// reaches the inner SparqlItemSelector — without this the adaptive
|
|
29
|
+
// budget is silently bypassed for class selection.
|
|
30
|
+
select: (distribution, batchSize, options) => {
|
|
32
31
|
const subjectFilter = distribution.subjectFilter ?? '';
|
|
33
32
|
let fromClause = '';
|
|
34
33
|
if (distribution.namedGraph) {
|
|
@@ -43,7 +42,7 @@ function classSelector() {
|
|
|
43
42
|
].join('\n');
|
|
44
43
|
return new SparqlItemSelector({
|
|
45
44
|
query: selectorQuery,
|
|
46
|
-
}).select(distribution, batchSize);
|
|
45
|
+
}).select(distribution, batchSize, options);
|
|
47
46
|
},
|
|
48
47
|
};
|
|
49
48
|
}
|
|
@@ -110,19 +109,13 @@ export function perClassLanguages(options) {
|
|
|
110
109
|
export function uriSpaces(uriSpaceMap, options) {
|
|
111
110
|
return createVoidStage('object-uri-space.rq', {
|
|
112
111
|
...options,
|
|
113
|
-
executor: (query) => new UriSpaceExecutor(new SparqlConstructExecutor({
|
|
114
|
-
query,
|
|
115
|
-
timeout: options?.timeout ?? 60_000,
|
|
116
|
-
}), uriSpaceMap),
|
|
112
|
+
executor: (query) => new UriSpaceExecutor(new SparqlConstructExecutor({ query }), uriSpaceMap),
|
|
117
113
|
});
|
|
118
114
|
}
|
|
119
115
|
export function detectVocabularies(options) {
|
|
120
116
|
return createVoidStage('entity-properties.rq', {
|
|
121
117
|
...options,
|
|
122
|
-
executor: (query) => new VocabularyExecutor(new SparqlConstructExecutor({
|
|
123
|
-
query,
|
|
124
|
-
timeout: options?.timeout ?? 60_000,
|
|
125
|
-
}), options?.vocabularies
|
|
118
|
+
executor: (query) => new VocabularyExecutor(new SparqlConstructExecutor({ query }), options?.vocabularies
|
|
126
119
|
? [...defaultVocabularies, ...options.vocabularies]
|
|
127
120
|
: undefined),
|
|
128
121
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lde/pipeline-void",
|
|
3
|
-
"version": "0.28.
|
|
3
|
+
"version": "0.28.3",
|
|
4
4
|
"description": "VOiD (Vocabulary of Interlinked Datasets) statistical analysis for RDF datasets",
|
|
5
5
|
"repository": {
|
|
6
6
|
"url": "git+https://github.com/ldelements/lde.git",
|
|
@@ -33,6 +33,6 @@
|
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"@lde/dataset": "0.7.4",
|
|
36
|
-
"@lde/pipeline": "0.30.
|
|
36
|
+
"@lde/pipeline": "0.30.3"
|
|
37
37
|
}
|
|
38
38
|
}
|