@platforma-sdk/workflow-tengo 5.6.4 → 5.6.6
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/tengo/lib/exec.lib.tengo +8 -8
- package/dist/tengo/lib/pframes.builder.lib.tengo +11 -1
- package/dist/tengo/lib/pframes.export-pframe.lib.tengo +2 -2
- package/dist/tengo/lib/pt.expression.lib.tengo +44 -44
- package/dist/tengo/lib/pt.lib.tengo +2 -2
- package/dist/tengo/lib/smart.lib.tengo +1 -1
- package/dist/tengo/lib/waiter.lib.tengo +1 -1
- package/dist/tengo/lib/workdir.lib.tengo +2 -2
- package/dist/tengo/lib/workdir.proc.lib.tengo +11 -5
- package/dist/tengo/lib/workflow.bquery.lib.tengo +6 -6
- 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/package.json +4 -4
|
@@ -115,7 +115,7 @@ builder := func() {
|
|
|
115
115
|
software: func(sw) {
|
|
116
116
|
assertEntrypointNotSet()
|
|
117
117
|
ll.assert(assets.isSoftwareInfo(sw),
|
|
118
|
-
"exec.builder.software: <software> parameter is not a software info. Provide the value obtained from assets.importSoftware() here"
|
|
118
|
+
"exec.builder.software: <software> parameter is not a software info. Provide the value obtained from assets."+"importSoftware() here" // calm-down tengo-builder
|
|
119
119
|
)
|
|
120
120
|
|
|
121
121
|
soft = sw
|
|
@@ -570,7 +570,7 @@ builder := func() {
|
|
|
570
570
|
}
|
|
571
571
|
|
|
572
572
|
ll.assert(assets.isAssetInfo(asset),
|
|
573
|
-
"exec.builder.addAsset: <asset> parameter is not an asset info. Provide the value obtained from assets.importAsset() here")
|
|
573
|
+
"exec.builder.addAsset: <asset> parameter is not an asset info. Provide the value obtained from assets."+"importAsset() here") // calm-down tengo-builder
|
|
574
574
|
validation.assertType(destinationDir, "string", "exec.builder.addAsset: <destinationDir> is not a string. It must be a path inside working directory")
|
|
575
575
|
validation.assertType(pathsInArchive, ["string"], "exec.builder.addAsset: <pathsInArchive> must contain list of strings with paths inside archive")
|
|
576
576
|
|
|
@@ -598,7 +598,7 @@ builder := func() {
|
|
|
598
598
|
|
|
599
599
|
cacheAssetMillis: func (asset, millis) {
|
|
600
600
|
ll.assert(assets.isAssetInfo(asset),
|
|
601
|
-
"exec.builder.cacheAssetMillis: <asset> parameter is not an asset info. Provide the value obtained from assets.importAsset() here")
|
|
601
|
+
"exec.builder.cacheAssetMillis: <asset> parameter is not an asset info. Provide the value obtained from assets."+"importAsset() here") // calm-down tengo-builder
|
|
602
602
|
ll.assert(is_int(millis),
|
|
603
603
|
"exec.builder.cacheAssetMillis: asset cache time must be a number of milliseconds.")
|
|
604
604
|
|
|
@@ -614,7 +614,7 @@ builder := func() {
|
|
|
614
614
|
|
|
615
615
|
cacheAssetSeconds: func (asset, seconds) {
|
|
616
616
|
ll.assert(assets.isAssetInfo(asset),
|
|
617
|
-
"exec.builder.cacheAssetSeconds: <asset> parameter is not an asset info. Provide the value obtained from assets.importAsset() here")
|
|
617
|
+
"exec.builder.cacheAssetSeconds: <asset> parameter is not an asset info. Provide the value obtained from assets."+"importAsset() here") // calm-down tengo-builder
|
|
618
618
|
ll.assert(is_int(seconds),
|
|
619
619
|
"exec.builder.cacheAssetSeconds: asset cache time must be a number of seconds.")
|
|
620
620
|
|
|
@@ -630,7 +630,7 @@ builder := func() {
|
|
|
630
630
|
|
|
631
631
|
cacheAssetMinutes: func (asset, minutes) {
|
|
632
632
|
ll.assert(assets.isAssetInfo(asset),
|
|
633
|
-
"exec.builder.cacheAssetMinutes: <asset> parameter is not an asset info. Provide the value obtained from assets.importAsset() here")
|
|
633
|
+
"exec.builder.cacheAssetMinutes: <asset> parameter is not an asset info. Provide the value obtained from assets."+"importAsset() here")
|
|
634
634
|
ll.assert(is_int(minutes),
|
|
635
635
|
"exec.builder.cacheAssetMinutes: asset cache time must be a number of minutes.")
|
|
636
636
|
|
|
@@ -646,7 +646,7 @@ builder := func() {
|
|
|
646
646
|
|
|
647
647
|
cacheAssetHours: func (asset, hours) {
|
|
648
648
|
ll.assert(assets.isAssetInfo(asset),
|
|
649
|
-
"exec.builder.cacheAssetHours: <asset> parameter is not an asset info. Provide the value obtained from assets.importAsset() here")
|
|
649
|
+
"exec.builder.cacheAssetHours: <asset> parameter is not an asset info. Provide the value obtained from assets."+"importAsset() here") // calm-down tengo-builder
|
|
650
650
|
ll.assert(is_int(hours),
|
|
651
651
|
"exec.builder.cacheAssetHours: asset cache time must be a number of hours.")
|
|
652
652
|
|
|
@@ -662,9 +662,9 @@ builder := func() {
|
|
|
662
662
|
|
|
663
663
|
cacheAssetDays: func (asset, days) {
|
|
664
664
|
ll.assert(assets.isAssetInfo(asset),
|
|
665
|
-
"exec.builder.
|
|
665
|
+
"exec.builder.cacheAssetDays: <asset> parameter is not an asset info. Provide the value obtained from assets."+"importAsset() here") // calm-down tengo-builder
|
|
666
666
|
ll.assert(is_int(days),
|
|
667
|
-
"exec.builder.
|
|
667
|
+
"exec.builder.cacheAssetDays: asset cache time must be a number of days.")
|
|
668
668
|
|
|
669
669
|
assetIdKey := ll.idToString(asset._id)
|
|
670
670
|
assetCache[assetIdKey] = days * 24 * times.hour
|
|
@@ -14,7 +14,17 @@ pFrameBuilder := func() {
|
|
|
14
14
|
self := undefined
|
|
15
15
|
self = ll.toStrict(oop.inherit(r, {
|
|
16
16
|
|
|
17
|
-
add: func(column, spec, data) {
|
|
17
|
+
add: func(column, spec, ...data) {
|
|
18
|
+
if (len(data) == 0) {
|
|
19
|
+
data = undefined
|
|
20
|
+
} else if (len(data) == 1) {
|
|
21
|
+
data = data[0]
|
|
22
|
+
if (is_undefined(data)) {
|
|
23
|
+
ll.panic("Data is undefined for column '%s'", column)
|
|
24
|
+
}
|
|
25
|
+
} else {
|
|
26
|
+
ll.panic("Too many data arguments for column '%s'", column)
|
|
27
|
+
}
|
|
18
28
|
if (!is_undefined(spec)) {
|
|
19
29
|
if !smart.isReference(spec) {
|
|
20
30
|
validation.assertType(spec, pSpec.P_OBJECT_SPEC_SCHEMA)
|
|
@@ -91,14 +91,14 @@ exportPFrame := func(pfResource, skipHideDataFromUI) {
|
|
|
91
91
|
|
|
92
92
|
for colName, col in columns {
|
|
93
93
|
if is_undefined(col.data) {
|
|
94
|
-
result.add(colName, col.specRaw
|
|
94
|
+
result.add(colName, col.specRaw)
|
|
95
95
|
continue
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
shouldHideDataFromUI := skipHideDataFromUI && !is_undefined(col.spec) && col.spec.annotations["pl7.app/hideDataFromUi"] == "true"
|
|
99
99
|
if shouldHideDataFromUI {
|
|
100
100
|
|
|
101
|
-
result.add(colName, col.specRaw
|
|
101
|
+
result.add(colName, col.specRaw)
|
|
102
102
|
continue
|
|
103
103
|
}
|
|
104
104
|
|
|
@@ -117,7 +117,7 @@ _newWindowExpression = func(expression, aggregation, currentAlias) {
|
|
|
117
117
|
}
|
|
118
118
|
return {type: "alias", value: valueExpr, name: currentAlias}
|
|
119
119
|
},
|
|
120
|
-
|
|
120
|
+
|
|
121
121
|
_getAggregation: func(ctx) {
|
|
122
122
|
if aggregation == undefined {
|
|
123
123
|
ll.panic("Using this operation as a group by expression is not allowed, most probably because you applied .over() to it. %v", expression)
|
|
@@ -239,7 +239,7 @@ _newExpression = func(expression) {
|
|
|
239
239
|
}
|
|
240
240
|
|
|
241
241
|
self = ll.toStrict({
|
|
242
|
-
|
|
242
|
+
|
|
243
243
|
_getExpression: func(ctx) {
|
|
244
244
|
ll.assert(is_map(ctx), "ctx must be a map")
|
|
245
245
|
return expression(ctx)
|
|
@@ -259,48 +259,48 @@ _newExpression = func(expression) {
|
|
|
259
259
|
},
|
|
260
260
|
|
|
261
261
|
|
|
262
|
-
|
|
262
|
+
|
|
263
263
|
gt: func(other) { return binaryOp("gt", other) },
|
|
264
|
-
|
|
264
|
+
|
|
265
265
|
ge: func(other) { return binaryOp("ge", other) },
|
|
266
|
-
|
|
266
|
+
|
|
267
267
|
eq: func(other) { return binaryOp("eq", other) },
|
|
268
|
-
|
|
268
|
+
|
|
269
269
|
lt: func(other) { return binaryOp("lt", other) },
|
|
270
|
-
|
|
270
|
+
|
|
271
271
|
le: func(other) { return binaryOp("le", other) },
|
|
272
|
-
|
|
272
|
+
|
|
273
273
|
neq: func(other) { return binaryOp("neq", other) },
|
|
274
274
|
|
|
275
275
|
|
|
276
|
-
|
|
276
|
+
|
|
277
277
|
plus: func(other) { return binaryOp("plus", other) },
|
|
278
|
-
|
|
278
|
+
|
|
279
279
|
minus: func(other) { return binaryOp("minus", other) },
|
|
280
|
-
|
|
280
|
+
|
|
281
281
|
multiply: func(other) { return binaryOp("multiply", other) },
|
|
282
|
-
|
|
282
|
+
|
|
283
283
|
truediv: func(other) { return binaryOp("truediv", other) },
|
|
284
|
-
|
|
284
|
+
|
|
285
285
|
floordiv: func(other) { return binaryOp("floordiv", other) },
|
|
286
286
|
|
|
287
|
-
|
|
287
|
+
|
|
288
288
|
log10: func() { return unaryOp("log10") },
|
|
289
|
-
|
|
289
|
+
|
|
290
290
|
log: func() { return unaryOp("log") },
|
|
291
|
-
|
|
291
|
+
|
|
292
292
|
log2: func() { return unaryOp("log2") },
|
|
293
|
-
|
|
293
|
+
|
|
294
294
|
abs: func() { return unaryOp("abs") },
|
|
295
|
-
|
|
295
|
+
|
|
296
296
|
sqrt: func() { return unaryOp("sqrt") },
|
|
297
|
-
|
|
297
|
+
|
|
298
298
|
negate: func() { return unaryOp("negate") },
|
|
299
|
-
|
|
299
|
+
|
|
300
300
|
floor: func() { return unaryOp("floor") },
|
|
301
|
-
|
|
301
|
+
|
|
302
302
|
round: func() { return unaryOp("round") },
|
|
303
|
-
|
|
303
|
+
|
|
304
304
|
ceil: func() { return unaryOp("ceil") },
|
|
305
305
|
|
|
306
306
|
|
|
@@ -328,25 +328,25 @@ _newExpression = func(expression) {
|
|
|
328
328
|
},
|
|
329
329
|
|
|
330
330
|
|
|
331
|
-
|
|
331
|
+
|
|
332
332
|
and: func(other) {
|
|
333
333
|
ll.assert(_isExpression(other), "and method expects an expression object as argument")
|
|
334
334
|
return allHorizontal(self, other) // Refer to top-level function
|
|
335
335
|
},
|
|
336
|
-
|
|
336
|
+
|
|
337
337
|
or: func(other) {
|
|
338
338
|
ll.assert(_isExpression(other), "or method expects an expression object as argument")
|
|
339
339
|
return anyHorizontal(self, other) // Refer to top-level function
|
|
340
340
|
},
|
|
341
|
-
|
|
341
|
+
|
|
342
342
|
not: func() {
|
|
343
343
|
return unaryOp("not")
|
|
344
344
|
},
|
|
345
345
|
|
|
346
346
|
|
|
347
|
-
|
|
347
|
+
|
|
348
348
|
isNull: func() { return unaryOp("is_na") }, // Polars: is_null(), TS: is_na
|
|
349
|
-
|
|
349
|
+
|
|
350
350
|
isNotNull: func() { return unaryOp("is_not_na") }, // Polars: is_not_null(), TS: is_not_na
|
|
351
351
|
|
|
352
352
|
|
|
@@ -429,11 +429,11 @@ _newExpression = func(expression) {
|
|
|
429
429
|
},
|
|
430
430
|
|
|
431
431
|
|
|
432
|
-
|
|
432
|
+
|
|
433
433
|
strToUpper: func() { return unaryStrOp("to_upper") },
|
|
434
|
-
|
|
434
|
+
|
|
435
435
|
strToLower: func() { return unaryStrOp("to_lower") },
|
|
436
|
-
|
|
436
|
+
|
|
437
437
|
strLenChars: func() { return unaryStrOp("str_len")},
|
|
438
438
|
|
|
439
439
|
|
|
@@ -827,32 +827,32 @@ _newExpression = func(expression) {
|
|
|
827
827
|
},
|
|
828
828
|
|
|
829
829
|
|
|
830
|
-
|
|
830
|
+
|
|
831
831
|
sum: func() { return aggOp("sum") },
|
|
832
|
-
|
|
832
|
+
|
|
833
833
|
mean: func() { return aggOp("mean") },
|
|
834
|
-
|
|
834
|
+
|
|
835
835
|
median: func() { return aggOp("median") },
|
|
836
|
-
|
|
836
|
+
|
|
837
837
|
min: func() { return aggOp("min") },
|
|
838
|
-
|
|
838
|
+
|
|
839
839
|
max: func() { return aggOp("max") },
|
|
840
|
-
|
|
840
|
+
|
|
841
841
|
std: func() { return aggOp("std") },
|
|
842
|
-
|
|
842
|
+
|
|
843
843
|
var: func() { return aggOp("var") },
|
|
844
|
-
|
|
844
|
+
|
|
845
845
|
count: func() { return aggOp("count") },
|
|
846
|
-
|
|
846
|
+
|
|
847
847
|
first: func() { return aggOp("first") },
|
|
848
|
-
|
|
848
|
+
|
|
849
849
|
last: func() { return aggOp("last") },
|
|
850
|
-
|
|
850
|
+
|
|
851
851
|
nUnique: func() { return aggOp("n_unique") },
|
|
852
852
|
|
|
853
|
-
|
|
853
|
+
|
|
854
854
|
maxBy: func(...by) { return aggOpBy("max_by", by) },
|
|
855
|
-
|
|
855
|
+
|
|
856
856
|
minBy: func(...by) { return aggOpBy("min_by", by) },
|
|
857
857
|
|
|
858
858
|
|
|
@@ -944,7 +944,7 @@ _newExpression = func(expression) {
|
|
|
944
944
|
}, undefined, undefined)
|
|
945
945
|
},
|
|
946
946
|
|
|
947
|
-
|
|
947
|
+
|
|
948
948
|
toString: func() {
|
|
949
949
|
return self.cast("string")
|
|
950
950
|
},
|
|
@@ -110,7 +110,7 @@ _getDirFillRule := func(dir) {
|
|
|
110
110
|
_fill := func() {
|
|
111
111
|
wd := smart.ephemeralBuilder(constants.RTYPE_WORKDIR_FILL)
|
|
112
112
|
|
|
113
|
-
|
|
113
|
+
|
|
114
114
|
_allocationRef := undefined
|
|
115
115
|
blobs := {}
|
|
116
116
|
files := {}
|
|
@@ -288,7 +288,7 @@ _fill := func() {
|
|
|
288
288
|
return self
|
|
289
289
|
},
|
|
290
290
|
|
|
291
|
-
|
|
291
|
+
|
|
292
292
|
mkDirs: func(dirs) {
|
|
293
293
|
for _, dir in dirs {
|
|
294
294
|
self.mkDir(dir)
|
|
@@ -134,11 +134,17 @@ proc := func() {
|
|
|
134
134
|
|
|
135
135
|
inputs.files = self.filesInWd()
|
|
136
136
|
result := cb(inputs)
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
137
|
+
if (is_undefined(self._wdFinalBuilder)) {
|
|
138
|
+
return {
|
|
139
|
+
result: result,
|
|
140
|
+
workdir: self.wdAfterReadFiles()
|
|
141
|
+
}
|
|
142
|
+
} else {
|
|
143
|
+
wd := self._wdFinalBuilder.build()
|
|
144
|
+
return {
|
|
145
|
+
result: result,
|
|
146
|
+
workdir: wd.getWorkdirAfter()
|
|
147
|
+
}
|
|
142
148
|
}
|
|
143
149
|
})
|
|
144
150
|
}
|
|
@@ -23,15 +23,15 @@ _OPTIONS_SCHEME := {
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
_DEFAULT_OPTIONS := {
|
|
26
|
-
|
|
26
|
+
|
|
27
27
|
spec: true,
|
|
28
|
-
|
|
28
|
+
|
|
29
29
|
data: true,
|
|
30
|
-
|
|
30
|
+
|
|
31
31
|
single: false,
|
|
32
|
-
|
|
32
|
+
|
|
33
33
|
first: false,
|
|
34
|
-
|
|
34
|
+
|
|
35
35
|
errIfMissing: false
|
|
36
36
|
}
|
|
37
37
|
|
|
@@ -283,7 +283,7 @@ resolve := func(ref, ctx, ...options) {
|
|
|
283
283
|
|
|
284
284
|
|
|
285
285
|
_ANCHORED_QUERY_DEFAULT_OPTIONS := {
|
|
286
|
-
|
|
286
|
+
|
|
287
287
|
ignoreMissingDomains: false
|
|
288
288
|
}
|
|
289
289
|
|
|
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.6.
|
|
3
|
+
"version": "5.6.6",
|
|
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": "^1.15.25",
|
|
21
|
-
"@platforma-open/milaboratories.software-
|
|
22
|
-
"@platforma-open/milaboratories.software-
|
|
21
|
+
"@platforma-open/milaboratories.software-ptabler": "1.13.5",
|
|
22
|
+
"@platforma-open/milaboratories.software-ptexter": "1.2.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@platforma-sdk/tengo-builder": "2.
|
|
25
|
+
"@platforma-sdk/tengo-builder": "2.4.0"
|
|
26
26
|
},
|
|
27
27
|
"scripts": {
|
|
28
28
|
"type-check": "pl-tengo check",
|