@lde/pipeline-shacl-sampler 0.4.2 → 0.4.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.
@@ -34,11 +34,6 @@ export interface ShaclSampleStagesOptions {
34
34
  * @default 50
35
35
  */
36
36
  samplesPerClass?: number;
37
- /**
38
- * SPARQL query timeout in milliseconds.
39
- * @default 60000
40
- */
41
- timeout?: number;
42
37
  /**
43
38
  * Maximum number of sampled subjects per executor call. Defaults to
44
39
  * {@link samplesPerClass} so the whole sample fits in one CONSTRUCT
@@ -1 +1 @@
1
- {"version":3,"file":"sampleStages.d.ts","sourceRoot":"","sources":["../src/sampleStages.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EAIL,KAAK,YAAY,EAGjB,KAAK,SAAS,EACf,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EAAE,SAAS,EAAQ,MAAM,cAAc,CAAC;AAEpD,OAAO,EAAuB,KAAK,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAI3E,KAAK,SAAS,GAAG,WAAW,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;AAEtE;;;;;;;;;;GAUG;AACH,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED,6CAA6C;AAC7C,MAAM,WAAW,wBAAwB;IACvC,kDAAkD;IAClD,UAAU,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;OAIG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;;;OAIG;IACH,SAAS,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;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED,6CAA6C;AAC7C,MAAM,WAAW,wBAAwB;IACvC,kDAAkD;IAClD,UAAU,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;OAIG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;;;OAIG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;;;;;;;;;;OAWG;IACH,gBAAgB,CAAC,EAAE,cAAc,EAAE,CAAC;CACrC;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,KAAK,EAAE,CAAC,CAiClB;AA2BD,qDAAqD;AACrD,MAAM,WAAW,2BAA2B;IAC1C,uCAAuC;IACvC,WAAW,EAAE,SAAS,CAAC;IACvB,kFAAkF;IAClF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,uDAAuD;IACvD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,0EAA0E;IAC1E,gBAAgB,CAAC,EAAE,cAAc,EAAE,CAAC;CACrC;AAED,wBAAgB,yBAAyB,CAAC,EACxC,WAAW,EACX,aAAa,EACb,UAAU,EACV,gBAAqB,GACtB,EAAE,2BAA2B,GAAG,MAAM,CAYtC;AA+BD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAuB3D;AAED;;;;;;GAMG;AACH,wBAAgB,mCAAmC,CACjD,KAAK,EAAE,SAAS,EAChB,gBAAgB,EAAE,cAAc,EAAE,GACjC,SAAS,CAeX"}
@@ -20,7 +20,6 @@ const { namedNode, quad } = DataFactory;
20
20
  */
21
21
  export async function shaclSampleStages(options) {
22
22
  const samplesPerClass = options.samplesPerClass ?? 50;
23
- const timeout = options.timeout ?? 60_000;
24
23
  const batchSize = options.batchSize ?? samplesPerClass;
25
24
  const maxConcurrency = options.maxConcurrency;
26
25
  const namespaceAliases = options.namespaceAliases ?? [];
@@ -36,7 +35,6 @@ export async function shaclSampleStages(options) {
36
35
  itemSelector: subjectSelector(shape.targetClass, samplesPerClass, namespaceAliases),
37
36
  executors: new SparqlConstructExecutor({
38
37
  query: buildSampleQuery(shape),
39
- timeout,
40
38
  }),
41
39
  batchSize,
42
40
  maxConcurrency,
@@ -46,7 +44,10 @@ export async function shaclSampleStages(options) {
46
44
  function subjectSelector(targetClass, limit, namespaceAliases) {
47
45
  assertSafeIri(targetClass.value);
48
46
  return {
49
- select(distribution, batchSize) {
47
+ // Forward `options` so the Pipeline’s per-dataset TimeoutPolicy
48
+ // reaches the inner SparqlItemSelector — without this the adaptive
49
+ // budget is silently bypassed for subject selection.
50
+ select(distribution, batchSize, options) {
50
51
  const query = buildSubjectSelectorQuery({
51
52
  targetClass,
52
53
  subjectFilter: distribution.subjectFilter,
@@ -56,7 +57,7 @@ function subjectSelector(targetClass, limit, namespaceAliases) {
56
57
  return new SparqlItemSelector({
57
58
  query,
58
59
  maxResults: limit,
59
- }).select(distribution, batchSize);
60
+ }).select(distribution, batchSize, options);
60
61
  },
61
62
  };
62
63
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lde/pipeline-shacl-sampler",
3
- "version": "0.4.2",
3
+ "version": "0.4.3",
4
4
  "description": "Per-class sampling stages for @lde/pipeline, derived from SHACL shapes",
5
5
  "repository": {
6
6
  "url": "git+https://github.com/ldelements/lde.git",
@@ -32,6 +32,6 @@
32
32
  },
33
33
  "peerDependencies": {
34
34
  "@lde/dataset": "0.7.4",
35
- "@lde/pipeline": "0.30.2"
35
+ "@lde/pipeline": "0.30.3"
36
36
  }
37
37
  }