@platforma-sdk/workflow-tengo 5.9.0 → 5.10.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/dist/index.cjs +7 -6
- package/dist/index.d.ts +1 -1
- package/dist/index.js +7 -6
- package/dist/tengo/lib/feats.lib.tengo +4 -1
- package/dist/tengo/lib/pframes.lib.tengo +3 -0
- package/dist/tengo/lib/pframes.spec.lib.tengo +61 -22
- package/dist/tengo/lib/pframes.util.lib.tengo +6 -0
- package/dist/tengo/lib/pframes.xsv-builder.lib.tengo +10 -1
- package/dist/tengo/lib/pt.expression.lib.tengo +15 -0
- package/dist/tengo/lib/pt.util.lib.tengo +8 -1
- package/dist/tengo/lib/workflow.bobject.lib.tengo +3 -0
- package/dist/tengo/lib/workflow.model.lib.tengo +4 -1
- package/dist/tengo/tpl/annotations.compute.plj.gz +0 -0
- package/dist/tengo/tpl/anonymize.deanonymize.plj.gz +0 -0
- package/dist/tengo/tpl/anonymize.impl.plj.gz +0 -0
- package/dist/tengo/tpl/check_network.create_workdir_from_storage.plj.gz +0 -0
- package/dist/tengo/tpl/check_network.download_blob.plj.gz +0 -0
- package/dist/tengo/tpl/check_network.run_hello_world.plj.gz +0 -0
- package/dist/tengo/tpl/check_network.run_hello_world_py.plj.gz +0 -0
- package/dist/tengo/tpl/check_network.upload_blob.plj.gz +0 -0
- package/dist/tengo/tpl/check_network.upload_template.plj.gz +0 -0
- package/dist/tengo/tpl/check_network.workdir_type_name_extractor.plj.gz +0 -0
- package/dist/tengo/tpl/exec.conda.create-env.plj.gz +0 -0
- package/dist/tengo/tpl/exec.delayed-compute-allocation.impl.plj.gz +0 -0
- package/dist/tengo/tpl/exec.exec-impl.plj.gz +0 -0
- package/dist/tengo/tpl/exec.exec.plj.gz +0 -0
- package/dist/tengo/tpl/exec.load-software.impl.plj.gz +0 -0
- package/dist/tengo/tpl/exec.monetization_info.plj.gz +0 -0
- package/dist/tengo/tpl/exec.monetization_to_json.plj.gz +0 -0
- package/dist/tengo/tpl/exec.python.create-venv.plj.gz +0 -0
- package/dist/tengo/tpl/exec.python.install-deps.plj.gz +0 -0
- package/dist/tengo/tpl/exec.python.venv-bin-path.plj.gz +0 -0
- package/dist/tengo/tpl/ll.get-field.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.export-multiple-pcolumns.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.export-parquet-pcolumn-chunk.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.export-pframe-for-ui.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.export-pframe.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.export-single-pcolumn.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.import-dir.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.parse-to-json.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.process-pcolumn-data.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.remove-nulls.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.slice-data.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.xsv-export-pframe.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.xsv-import-if-not-null.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.xsv-import-map.plj.gz +0 -0
- package/dist/tengo/tpl/pt.import-dir.plj.gz +0 -0
- package/dist/tengo/tpl/pt.workflow-run.plj.gz +0 -0
- package/dist/tengo/tpl/waiter.waiter.plj.gz +0 -0
- package/dist/tengo/tpl/workdir.save.plj.gz +0 -0
- package/dist/tengo/tpl/workflow.build-ctx.plj.gz +0 -0
- package/dist/tengo/tpl/workflow.query-anchored.plj.gz +0 -0
- package/dist/tengo/tpl/workflow.query-context-filter.plj.gz +0 -0
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -8,7 +8,7 @@ module.exports = { Templates: {
|
|
|
8
8
|
'waiter.waiter': { type: 'from-file', path: require.resolve('./tengo/tpl/waiter.waiter.plj.gz') },
|
|
9
9
|
'workdir.save': { type: 'from-file', path: require.resolve('./tengo/tpl/workdir.save.plj.gz') },
|
|
10
10
|
'workflow.build-ctx': { type: 'from-file', path: require.resolve('./tengo/tpl/workflow.build-ctx.plj.gz') },
|
|
11
|
-
'workflow.query-
|
|
11
|
+
'workflow.query-context-filter': { type: 'from-file', path: require.resolve('./tengo/tpl/workflow.query-context-filter.plj.gz') },
|
|
12
12
|
'anonymize.deanonymize': { type: 'from-file', path: require.resolve('./tengo/tpl/anonymize.deanonymize.plj.gz') },
|
|
13
13
|
'anonymize.impl': { type: 'from-file', path: require.resolve('./tengo/tpl/anonymize.impl.plj.gz') },
|
|
14
14
|
'check_network.workdir_type_name_extractor': { type: 'from-file', path: require.resolve('./tengo/tpl/check_network.workdir_type_name_extractor.plj.gz') },
|
|
@@ -17,17 +17,18 @@ module.exports = { Templates: {
|
|
|
17
17
|
'exec.python.install-deps': { type: 'from-file', path: require.resolve('./tengo/tpl/exec.python.install-deps.plj.gz') },
|
|
18
18
|
'exec.python.venv-bin-path': { type: 'from-file', path: require.resolve('./tengo/tpl/exec.python.venv-bin-path.plj.gz') },
|
|
19
19
|
'pframes.export-multiple-pcolumns': { type: 'from-file', path: require.resolve('./tengo/tpl/pframes.export-multiple-pcolumns.plj.gz') },
|
|
20
|
-
'
|
|
20
|
+
'workflow.query-anchored': { type: 'from-file', path: require.resolve('./tengo/tpl/workflow.query-anchored.plj.gz') },
|
|
21
21
|
'check_network.create_workdir_from_storage': { type: 'from-file', path: require.resolve('./tengo/tpl/check_network.create_workdir_from_storage.plj.gz') },
|
|
22
|
-
'check_network.download_blob': { type: 'from-file', path: require.resolve('./tengo/tpl/check_network.download_blob.plj.gz') },
|
|
23
|
-
'check_network.upload_blob': { type: 'from-file', path: require.resolve('./tengo/tpl/check_network.upload_blob.plj.gz') },
|
|
24
|
-
'check_network.upload_template': { type: 'from-file', path: require.resolve('./tengo/tpl/check_network.upload_template.plj.gz') },
|
|
25
22
|
'exec.conda.create-env': { type: 'from-file', path: require.resolve('./tengo/tpl/exec.conda.create-env.plj.gz') },
|
|
26
23
|
'exec.exec-impl': { type: 'from-file', path: require.resolve('./tengo/tpl/exec.exec-impl.plj.gz') },
|
|
27
24
|
'exec.monetization_info': { type: 'from-file', path: require.resolve('./tengo/tpl/exec.monetization_info.plj.gz') },
|
|
28
25
|
'exec.python.create-venv': { type: 'from-file', path: require.resolve('./tengo/tpl/exec.python.create-venv.plj.gz') },
|
|
29
|
-
'pframes.
|
|
26
|
+
'pframes.slice-data': { type: 'from-file', path: require.resolve('./tengo/tpl/pframes.slice-data.plj.gz') },
|
|
27
|
+
'check_network.download_blob': { type: 'from-file', path: require.resolve('./tengo/tpl/check_network.download_blob.plj.gz') },
|
|
28
|
+
'check_network.upload_blob': { type: 'from-file', path: require.resolve('./tengo/tpl/check_network.upload_blob.plj.gz') },
|
|
29
|
+
'check_network.upload_template': { type: 'from-file', path: require.resolve('./tengo/tpl/check_network.upload_template.plj.gz') },
|
|
30
30
|
'exec.load-software.impl': { type: 'from-file', path: require.resolve('./tengo/tpl/exec.load-software.impl.plj.gz') },
|
|
31
|
+
'pframes.parse-to-json': { type: 'from-file', path: require.resolve('./tengo/tpl/pframes.parse-to-json.plj.gz') },
|
|
31
32
|
'exec.exec': { type: 'from-file', path: require.resolve('./tengo/tpl/exec.exec.plj.gz') },
|
|
32
33
|
'pt.workflow-run': { type: 'from-file', path: require.resolve('./tengo/tpl/pt.workflow-run.plj.gz') },
|
|
33
34
|
'annotations.compute': { type: 'from-file', path: require.resolve('./tengo/tpl/annotations.compute.plj.gz') },
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
declare type TemplateFromFile = { readonly type: "from-file"; readonly path: string; };
|
|
2
|
-
declare type TplName = "ll.get-field" | "pframes.export-parquet-pcolumn-chunk" | "pframes.export-single-pcolumn" | "pframes.import-dir" | "pframes.remove-nulls" | "pt.import-dir" | "waiter.waiter" | "workdir.save" | "workflow.build-ctx" | "workflow.query-
|
|
2
|
+
declare type TplName = "ll.get-field" | "pframes.export-parquet-pcolumn-chunk" | "pframes.export-single-pcolumn" | "pframes.import-dir" | "pframes.remove-nulls" | "pt.import-dir" | "waiter.waiter" | "workdir.save" | "workflow.build-ctx" | "workflow.query-context-filter" | "anonymize.deanonymize" | "anonymize.impl" | "check_network.workdir_type_name_extractor" | "exec.delayed-compute-allocation.impl" | "exec.monetization_to_json" | "exec.python.install-deps" | "exec.python.venv-bin-path" | "pframes.export-multiple-pcolumns" | "workflow.query-anchored" | "check_network.create_workdir_from_storage" | "exec.conda.create-env" | "exec.exec-impl" | "exec.monetization_info" | "exec.python.create-venv" | "pframes.slice-data" | "check_network.download_blob" | "check_network.upload_blob" | "check_network.upload_template" | "exec.load-software.impl" | "pframes.parse-to-json" | "exec.exec" | "pt.workflow-run" | "annotations.compute" | "check_network.run_hello_world" | "check_network.run_hello_world_py" | "pframes.xsv-export-pframe" | "pframes.xsv-import-if-not-null" | "pframes.xsv-import-map" | "pframes.process-pcolumn-data" | "pframes.export-pframe" | "pframes.export-pframe-for-ui";
|
|
3
3
|
declare const Templates: Record<TplName, TemplateFromFile>;
|
|
4
4
|
export { Templates };
|
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@ export const Templates = {
|
|
|
9
9
|
'waiter.waiter': { type: 'from-file', path: resolve(import.meta.dirname, './tengo/tpl/waiter.waiter.plj.gz') },
|
|
10
10
|
'workdir.save': { type: 'from-file', path: resolve(import.meta.dirname, './tengo/tpl/workdir.save.plj.gz') },
|
|
11
11
|
'workflow.build-ctx': { type: 'from-file', path: resolve(import.meta.dirname, './tengo/tpl/workflow.build-ctx.plj.gz') },
|
|
12
|
-
'workflow.query-
|
|
12
|
+
'workflow.query-context-filter': { type: 'from-file', path: resolve(import.meta.dirname, './tengo/tpl/workflow.query-context-filter.plj.gz') },
|
|
13
13
|
'anonymize.deanonymize': { type: 'from-file', path: resolve(import.meta.dirname, './tengo/tpl/anonymize.deanonymize.plj.gz') },
|
|
14
14
|
'anonymize.impl': { type: 'from-file', path: resolve(import.meta.dirname, './tengo/tpl/anonymize.impl.plj.gz') },
|
|
15
15
|
'check_network.workdir_type_name_extractor': { type: 'from-file', path: resolve(import.meta.dirname, './tengo/tpl/check_network.workdir_type_name_extractor.plj.gz') },
|
|
@@ -18,17 +18,18 @@ export const Templates = {
|
|
|
18
18
|
'exec.python.install-deps': { type: 'from-file', path: resolve(import.meta.dirname, './tengo/tpl/exec.python.install-deps.plj.gz') },
|
|
19
19
|
'exec.python.venv-bin-path': { type: 'from-file', path: resolve(import.meta.dirname, './tengo/tpl/exec.python.venv-bin-path.plj.gz') },
|
|
20
20
|
'pframes.export-multiple-pcolumns': { type: 'from-file', path: resolve(import.meta.dirname, './tengo/tpl/pframes.export-multiple-pcolumns.plj.gz') },
|
|
21
|
-
'
|
|
21
|
+
'workflow.query-anchored': { type: 'from-file', path: resolve(import.meta.dirname, './tengo/tpl/workflow.query-anchored.plj.gz') },
|
|
22
22
|
'check_network.create_workdir_from_storage': { type: 'from-file', path: resolve(import.meta.dirname, './tengo/tpl/check_network.create_workdir_from_storage.plj.gz') },
|
|
23
|
-
'check_network.download_blob': { type: 'from-file', path: resolve(import.meta.dirname, './tengo/tpl/check_network.download_blob.plj.gz') },
|
|
24
|
-
'check_network.upload_blob': { type: 'from-file', path: resolve(import.meta.dirname, './tengo/tpl/check_network.upload_blob.plj.gz') },
|
|
25
|
-
'check_network.upload_template': { type: 'from-file', path: resolve(import.meta.dirname, './tengo/tpl/check_network.upload_template.plj.gz') },
|
|
26
23
|
'exec.conda.create-env': { type: 'from-file', path: resolve(import.meta.dirname, './tengo/tpl/exec.conda.create-env.plj.gz') },
|
|
27
24
|
'exec.exec-impl': { type: 'from-file', path: resolve(import.meta.dirname, './tengo/tpl/exec.exec-impl.plj.gz') },
|
|
28
25
|
'exec.monetization_info': { type: 'from-file', path: resolve(import.meta.dirname, './tengo/tpl/exec.monetization_info.plj.gz') },
|
|
29
26
|
'exec.python.create-venv': { type: 'from-file', path: resolve(import.meta.dirname, './tengo/tpl/exec.python.create-venv.plj.gz') },
|
|
30
|
-
'pframes.
|
|
27
|
+
'pframes.slice-data': { type: 'from-file', path: resolve(import.meta.dirname, './tengo/tpl/pframes.slice-data.plj.gz') },
|
|
28
|
+
'check_network.download_blob': { type: 'from-file', path: resolve(import.meta.dirname, './tengo/tpl/check_network.download_blob.plj.gz') },
|
|
29
|
+
'check_network.upload_blob': { type: 'from-file', path: resolve(import.meta.dirname, './tengo/tpl/check_network.upload_blob.plj.gz') },
|
|
30
|
+
'check_network.upload_template': { type: 'from-file', path: resolve(import.meta.dirname, './tengo/tpl/check_network.upload_template.plj.gz') },
|
|
31
31
|
'exec.load-software.impl': { type: 'from-file', path: resolve(import.meta.dirname, './tengo/tpl/exec.load-software.impl.plj.gz') },
|
|
32
|
+
'pframes.parse-to-json': { type: 'from-file', path: resolve(import.meta.dirname, './tengo/tpl/pframes.parse-to-json.plj.gz') },
|
|
32
33
|
'exec.exec': { type: 'from-file', path: resolve(import.meta.dirname, './tengo/tpl/exec.exec.plj.gz') },
|
|
33
34
|
'pt.workflow-run': { type: 'from-file', path: resolve(import.meta.dirname, './tengo/tpl/pt.workflow-run.plj.gz') },
|
|
34
35
|
'annotations.compute': { type: 'from-file', path: resolve(import.meta.dirname, './tengo/tpl/annotations.compute.plj.gz') },
|
|
@@ -24,6 +24,7 @@ BASIC_TSV_COLUMN_SPEC_SCHEMA := {
|
|
|
24
24
|
"valueType": "string,regex=Int|Long|Float|Double|String",
|
|
25
25
|
"name,?": "string",
|
|
26
26
|
"domain,?": { "any": "string" },
|
|
27
|
+
"contextDomain,?": { "any": "string" },
|
|
27
28
|
"annotations,?": { "any": "string" }
|
|
28
29
|
}
|
|
29
30
|
|
|
@@ -32,6 +33,7 @@ BASIC_TSV_COLUMN_SPEC_SCHEMA_STRING := {
|
|
|
32
33
|
"valueType": "string,regex=String",
|
|
33
34
|
"name,?": "string",
|
|
34
35
|
"domain,?": { "any": "string" },
|
|
36
|
+
"contextDomain,?": { "any": "string" },
|
|
35
37
|
"annotations,?": { "any": "string" }
|
|
36
38
|
}
|
|
37
39
|
|
|
@@ -54,6 +56,7 @@ TSV_CONTENT_SETTINGS_SCHEMA := {
|
|
|
54
56
|
"type": "string,regex=Int|Long|Float|Double|String",
|
|
55
57
|
"name,?": "string",
|
|
56
58
|
"domain,?": { "any": "string" },
|
|
59
|
+
"contextDomain,?": { "any": "string" },
|
|
57
60
|
"annotations,?": { "any": "string" }
|
|
58
61
|
}
|
|
59
62
|
}],
|
|
@@ -19,6 +19,7 @@ canonical := import("@platforma-sdk/workflow-tengo:canonical")
|
|
|
19
19
|
P_UNTYPED_SPEC_SCHEMA := {
|
|
20
20
|
`name`: `string`,
|
|
21
21
|
`domain,?`: { any: `string` },
|
|
22
|
+
`contextDomain,?`: { any: `string` },
|
|
22
23
|
`annotations,?`: { any: `string` },
|
|
23
24
|
`parentAxes,?`: [ `number` ]
|
|
24
25
|
}
|
|
@@ -102,6 +103,7 @@ _P_MATCHER_SCHEMA := {
|
|
|
102
103
|
`type,?`: `string,regex=Int|Long|Float|Double|String`,
|
|
103
104
|
`name`: `string`,
|
|
104
105
|
`domain,?`: { any: `string` },
|
|
106
|
+
`contextDomain,?`: { any: `string` },
|
|
105
107
|
`optional,?`: `boolean`
|
|
106
108
|
}
|
|
107
109
|
|
|
@@ -130,6 +132,13 @@ _checkAxisMatch := func(axisSpec, matcher) {
|
|
|
130
132
|
}
|
|
131
133
|
}
|
|
132
134
|
}
|
|
135
|
+
if !is_undefined(matcher.contextDomain) {
|
|
136
|
+
for key, value in matcher.contextDomain {
|
|
137
|
+
if is_undefined(axisSpec.contextDomain) || axisSpec.contextDomain[key] != value {
|
|
138
|
+
return false
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
133
142
|
return true
|
|
134
143
|
}
|
|
135
144
|
|
|
@@ -323,17 +332,18 @@ createSpecDistiller := func(specs) {
|
|
|
323
332
|
|
|
324
333
|
|
|
325
334
|
domainsValues := {}
|
|
335
|
+
contextDomainsValues := {}
|
|
326
336
|
|
|
327
|
-
addDomainValue := func(name, domainName, domainValue) {
|
|
328
|
-
if is_undefined(
|
|
329
|
-
|
|
337
|
+
addDomainValue := func(valuesMap, name, domainName, domainValue) {
|
|
338
|
+
if is_undefined(valuesMap[name]) {
|
|
339
|
+
valuesMap[name] = {}
|
|
330
340
|
}
|
|
331
341
|
|
|
332
|
-
if is_undefined(
|
|
333
|
-
|
|
342
|
+
if is_undefined(valuesMap[name][domainName]) {
|
|
343
|
+
valuesMap[name][domainName] = {}
|
|
334
344
|
}
|
|
335
345
|
|
|
336
|
-
|
|
346
|
+
valuesMap[name][domainName][domainValue] = true
|
|
337
347
|
}
|
|
338
348
|
|
|
339
349
|
|
|
@@ -342,7 +352,12 @@ createSpecDistiller := func(specs) {
|
|
|
342
352
|
columnName := spec.name
|
|
343
353
|
if !is_undefined(spec.domain) {
|
|
344
354
|
for domainName, domainValue in spec.domain {
|
|
345
|
-
addDomainValue(columnName, domainName, domainValue)
|
|
355
|
+
addDomainValue(domainsValues, columnName, domainName, domainValue)
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
if !is_undefined(spec.contextDomain) {
|
|
359
|
+
for domainName, domainValue in spec.contextDomain {
|
|
360
|
+
addDomainValue(contextDomainsValues, columnName, domainName, domainValue)
|
|
346
361
|
}
|
|
347
362
|
}
|
|
348
363
|
|
|
@@ -352,7 +367,12 @@ createSpecDistiller := func(specs) {
|
|
|
352
367
|
axisName := axis.name
|
|
353
368
|
if !is_undefined(axis.domain) {
|
|
354
369
|
for domainName, domainValue in axis.domain {
|
|
355
|
-
addDomainValue(axisName, domainName, domainValue)
|
|
370
|
+
addDomainValue(domainsValues, axisName, domainName, domainValue)
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
if !is_undefined(axis.contextDomain) {
|
|
374
|
+
for domainName, domainValue in axis.contextDomain {
|
|
375
|
+
addDomainValue(contextDomainsValues, axisName, domainName, domainValue)
|
|
356
376
|
}
|
|
357
377
|
}
|
|
358
378
|
}
|
|
@@ -360,29 +380,35 @@ createSpecDistiller := func(specs) {
|
|
|
360
380
|
}
|
|
361
381
|
|
|
362
382
|
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
for
|
|
366
|
-
|
|
367
|
-
if
|
|
368
|
-
|
|
383
|
+
computeDiscriminative := func(valuesMap) {
|
|
384
|
+
result := {}
|
|
385
|
+
for name, domains in valuesMap {
|
|
386
|
+
for domainName, valueSet in domains {
|
|
387
|
+
if len(valueSet) > 1 {
|
|
388
|
+
if is_undefined(result[name]) {
|
|
389
|
+
result[name] = {}
|
|
390
|
+
}
|
|
391
|
+
result[name][domainName] = true
|
|
369
392
|
}
|
|
370
|
-
discriminativeDomains[name][domainName] = true
|
|
371
393
|
}
|
|
372
394
|
}
|
|
395
|
+
return result
|
|
373
396
|
}
|
|
374
397
|
|
|
398
|
+
discriminativeDomains := computeDiscriminative(domainsValues)
|
|
399
|
+
discriminativeContextDomains := computeDiscriminative(contextDomainsValues)
|
|
400
|
+
|
|
375
401
|
|
|
376
|
-
filterDomain := func(domain, entityName) {
|
|
402
|
+
filterDomain := func(domain, entityName, discriminativeMap) {
|
|
377
403
|
if is_undefined(domain) {
|
|
378
404
|
return undefined
|
|
379
405
|
}
|
|
380
406
|
|
|
381
407
|
filteredDomain := undefined
|
|
382
408
|
|
|
383
|
-
if !is_undefined(
|
|
409
|
+
if !is_undefined(discriminativeMap[entityName]) {
|
|
384
410
|
for domainName, domainValue in domain {
|
|
385
|
-
if sets.hasElement(
|
|
411
|
+
if sets.hasElement(discriminativeMap[entityName], domainName) {
|
|
386
412
|
if is_undefined(filteredDomain) {
|
|
387
413
|
filteredDomain = {}
|
|
388
414
|
}
|
|
@@ -403,13 +429,21 @@ createSpecDistiller := func(specs) {
|
|
|
403
429
|
}
|
|
404
430
|
|
|
405
431
|
|
|
406
|
-
filteredDomain := filterDomain(result.domain, entityName)
|
|
432
|
+
filteredDomain := filterDomain(result.domain, entityName, discriminativeDomains)
|
|
407
433
|
if !is_undefined(filteredDomain) {
|
|
408
434
|
result.domain = filteredDomain
|
|
409
435
|
} else if !is_undefined(result.domain) {
|
|
410
436
|
delete(result, "domain")
|
|
411
437
|
}
|
|
412
438
|
|
|
439
|
+
|
|
440
|
+
filteredContextDomain := filterDomain(result.contextDomain, entityName, discriminativeContextDomains)
|
|
441
|
+
if !is_undefined(filteredContextDomain) {
|
|
442
|
+
result.contextDomain = filteredContextDomain
|
|
443
|
+
} else if !is_undefined(result.contextDomain) {
|
|
444
|
+
delete(result, "contextDomain")
|
|
445
|
+
}
|
|
446
|
+
|
|
413
447
|
return result
|
|
414
448
|
}
|
|
415
449
|
|
|
@@ -537,16 +571,21 @@ axisSpecToMatcher := func(axisSpec) {
|
|
|
537
571
|
if !is_undefined(axisSpec.domain) {
|
|
538
572
|
matcher.domain = maps.clone(axisSpec.domain) // Clone to avoid modifying original spec's domain
|
|
539
573
|
}
|
|
574
|
+
if !is_undefined(axisSpec.contextDomain) {
|
|
575
|
+
matcher.contextDomain = maps.clone(axisSpec.contextDomain) // Clone to avoid modifying original spec's contextDomain
|
|
576
|
+
}
|
|
540
577
|
return matcher
|
|
541
578
|
}
|
|
542
579
|
|
|
543
580
|
getAxisId := func(axisSpec) {
|
|
544
581
|
validation.assertType(axisSpec, P_AXIS_SPEC_SCHEMA)
|
|
545
|
-
|
|
582
|
+
id := {
|
|
546
583
|
name: axisSpec.name,
|
|
547
584
|
type: axisSpec.type,
|
|
548
|
-
domain: axisSpec.domain
|
|
549
|
-
|
|
585
|
+
domain: axisSpec.domain,
|
|
586
|
+
contextDomain: axisSpec.contextDomain
|
|
587
|
+
}
|
|
588
|
+
return canonical.encode(id)
|
|
550
589
|
}
|
|
551
590
|
|
|
552
591
|
export ll.toStrict({
|
|
@@ -85,6 +85,8 @@ _SPEC_AXES_SCHEMA := {
|
|
|
85
85
|
|
|
86
86
|
`domain,?`: { any: `string` },
|
|
87
87
|
|
|
88
|
+
`contextDomain,?`: { any: `string` },
|
|
89
|
+
|
|
88
90
|
|
|
89
91
|
`annotations,?`: { any: `string` },
|
|
90
92
|
|
|
@@ -125,6 +127,8 @@ _SPEC_COLUMN_SCHEMA := {
|
|
|
125
127
|
|
|
126
128
|
`domain,?`: { any: `string` },
|
|
127
129
|
|
|
130
|
+
`contextDomain,?`: { any: `string` },
|
|
131
|
+
|
|
128
132
|
|
|
129
133
|
`annotations,?`: { any: `string` },
|
|
130
134
|
|
|
@@ -140,6 +144,8 @@ _SPEC_INDEX_SCHEMA := {
|
|
|
140
144
|
|
|
141
145
|
`domain,?`: { any: `string` },
|
|
142
146
|
|
|
147
|
+
`contextDomain,?`: { any: `string` },
|
|
148
|
+
|
|
143
149
|
|
|
144
150
|
`annotations,?`: { any: `string` },
|
|
145
151
|
|
|
@@ -98,7 +98,15 @@ xsvFileBuilder := func(xsvType) {
|
|
|
98
98
|
|
|
99
99
|
domainCanonicalStr = canonical.encode({})
|
|
100
100
|
}
|
|
101
|
-
|
|
101
|
+
|
|
102
|
+
contextDomainCanonicalStr := ""
|
|
103
|
+
if is_map(axisSpec.contextDomain) {
|
|
104
|
+
contextDomainCanonicalStr = canonical.encode(axisSpec.contextDomain)
|
|
105
|
+
} else {
|
|
106
|
+
|
|
107
|
+
contextDomainCanonicalStr = canonical.encode({})
|
|
108
|
+
}
|
|
109
|
+
return nameStr + "|" + typeStr + "|" + domainCanonicalStr + "|" + contextDomainCanonicalStr
|
|
102
110
|
}
|
|
103
111
|
|
|
104
112
|
findAxisHeaderOverride := func(axisSpec) {
|
|
@@ -177,6 +185,7 @@ xsvFileBuilder := func(xsvType) {
|
|
|
177
185
|
name: labelledAxis.name,
|
|
178
186
|
type: labelledAxis.type,
|
|
179
187
|
domain: labelledAxis.domain, // Store original domain from the labelled (effectively distilled) axis
|
|
188
|
+
contextDomain: labelledAxis.contextDomain,
|
|
180
189
|
label: labelledAxis.annotations["pl7.app/label"]
|
|
181
190
|
}
|
|
182
191
|
}
|
|
@@ -1156,6 +1156,21 @@ _matcherToAxisSpec := func(ctx, processedMatcher) {
|
|
|
1156
1156
|
continue
|
|
1157
1157
|
}
|
|
1158
1158
|
}
|
|
1159
|
+
if !is_undefined(distilledMatcher.contextDomain) && len(distilledMatcher.contextDomain) > 0 {
|
|
1160
|
+
if is_undefined(spec.contextDomain) || len(spec.contextDomain) < len(distilledMatcher.contextDomain) {
|
|
1161
|
+
continue
|
|
1162
|
+
}
|
|
1163
|
+
contextDomainMatches := true
|
|
1164
|
+
for domainKey, domainValue in distilledMatcher.contextDomain {
|
|
1165
|
+
if spec.contextDomain[domainKey] != domainValue {
|
|
1166
|
+
contextDomainMatches = false
|
|
1167
|
+
break
|
|
1168
|
+
}
|
|
1169
|
+
}
|
|
1170
|
+
if !contextDomainMatches {
|
|
1171
|
+
continue
|
|
1172
|
+
}
|
|
1173
|
+
}
|
|
1159
1174
|
axisSpec = spec
|
|
1160
1175
|
break
|
|
1161
1176
|
}
|
|
@@ -103,6 +103,9 @@ makeFrameColumnInfo := func(params, translation) {
|
|
|
103
103
|
if !is_undefined(entry.spec.domain) && len(entry.spec.domain) > 0 {
|
|
104
104
|
spec.domain = entry.spec.domain
|
|
105
105
|
}
|
|
106
|
+
if !is_undefined(entry.spec.contextDomain) && len(entry.spec.contextDomain) > 0 {
|
|
107
|
+
spec.contextDomain = entry.spec.contextDomain
|
|
108
|
+
}
|
|
106
109
|
if !is_undefined(entry.spec.annotations) && len(entry.spec.annotations) > 0 {
|
|
107
110
|
spec.annotations = entry.spec.annotations
|
|
108
111
|
}
|
|
@@ -122,6 +125,9 @@ makeFrameColumnInfo := func(params, translation) {
|
|
|
122
125
|
if !is_undefined(entry.spec.domain) && len(entry.spec.domain) > 0 {
|
|
123
126
|
spec.domain = entry.spec.domain
|
|
124
127
|
}
|
|
128
|
+
if !is_undefined(entry.spec.contextDomain) && len(entry.spec.contextDomain) > 0 {
|
|
129
|
+
spec.contextDomain = entry.spec.contextDomain
|
|
130
|
+
}
|
|
125
131
|
if !is_undefined(entry.spec.annotations) && len(entry.spec.annotations) > 0 {
|
|
126
132
|
spec.annotations = entry.spec.annotations
|
|
127
133
|
}
|
|
@@ -344,7 +350,8 @@ _P_TABLE_COLUMN_ID_SCHEMA := [`or`,
|
|
|
344
350
|
`axisId`: {
|
|
345
351
|
`name`: `string`,
|
|
346
352
|
`type`: `string,regex=Int|Long|String`,
|
|
347
|
-
`domain,?`: { any: `string` }
|
|
353
|
+
`domain,?`: { any: `string` },
|
|
354
|
+
`contextDomain,?`: { any: `string` }
|
|
348
355
|
}
|
|
349
356
|
}]
|
|
350
357
|
|
|
@@ -21,10 +21,13 @@ _pObjectSpecSchema := {
|
|
|
21
21
|
|
|
22
22
|
"domain,?": {",any": "string"},
|
|
23
23
|
|
|
24
|
+
"contextDomain,?": {",any": "string"},
|
|
25
|
+
|
|
24
26
|
"axesSpec,?": [{
|
|
25
27
|
"type": "string,regex=String",
|
|
26
28
|
"name": "string",
|
|
27
29
|
"domain,?": {",any": "string"},
|
|
30
|
+
"contextDomain,?": {",any": "string"},
|
|
28
31
|
"annotations,?": {",any": "string"}
|
|
29
32
|
}],
|
|
30
33
|
|
|
@@ -5,7 +5,8 @@ AXIS_SELECTOR_SCHEMA := {
|
|
|
5
5
|
`__options__,closed`: true,
|
|
6
6
|
`type,?`: ["or", "string", ["string"]],
|
|
7
7
|
`name,?`: `string`,
|
|
8
|
-
`domain,?`: { any: `string` }
|
|
8
|
+
`domain,?`: { any: `string` },
|
|
9
|
+
`contextDomain,?`: { any: `string` }
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
|
|
@@ -52,6 +53,8 @@ ANCHORED_P_COLUMN_SELECTOR_SCHEMA := {
|
|
|
52
53
|
`type,?`: ["or", "string", ["string"]],
|
|
53
54
|
`domainAnchor,?`: `string`,
|
|
54
55
|
`domain,?`: { any: A_DOMAIN_SCHEMA },
|
|
56
|
+
`contextDomainAnchor,?`: `string`,
|
|
57
|
+
`contextDomain,?`: { any: A_DOMAIN_SCHEMA },
|
|
55
58
|
`axes,?`: [A_AXIS_SELECTOR_SCHEMA],
|
|
56
59
|
`partialAxesMatch,?`: `boolean`,
|
|
57
60
|
`annotations,?`: { any: `string` },
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platforma-sdk/workflow-tengo",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.10.0",
|
|
4
4
|
"description": "Tengo SDK library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@milaboratories/software-pframes-conv": "2.2.9",
|
|
20
20
|
"@platforma-open/milaboratories.software-small-binaries": "^2.0.1",
|
|
21
|
-
"@platforma-open/milaboratories.software-ptabler": "1.14.
|
|
22
|
-
"@platforma-open/milaboratories.software-ptexter": "1.2.
|
|
21
|
+
"@platforma-open/milaboratories.software-ptabler": "1.14.3",
|
|
22
|
+
"@platforma-open/milaboratories.software-ptexter": "1.2.2"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@platforma-sdk/tengo-builder": "2.4.
|
|
25
|
+
"@platforma-sdk/tengo-builder": "2.4.29"
|
|
26
26
|
},
|
|
27
27
|
"scripts": {
|
|
28
28
|
"type-check": "pl-tengo check",
|