@platforma-sdk/workflow-tengo 5.6.5 → 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.
Files changed (49) hide show
  1. package/dist/tengo/lib/exec.lib.tengo +8 -8
  2. package/dist/tengo/lib/pt.expression.lib.tengo +44 -44
  3. package/dist/tengo/lib/pt.lib.tengo +2 -2
  4. package/dist/tengo/lib/smart.lib.tengo +1 -1
  5. package/dist/tengo/lib/waiter.lib.tengo +1 -1
  6. package/dist/tengo/lib/workdir.lib.tengo +2 -2
  7. package/dist/tengo/lib/workdir.proc.lib.tengo +11 -5
  8. package/dist/tengo/lib/workflow.bquery.lib.tengo +6 -6
  9. package/dist/tengo/tpl/annotations.compute.plj.gz +0 -0
  10. package/dist/tengo/tpl/anonymize.deanonymize.plj.gz +0 -0
  11. package/dist/tengo/tpl/anonymize.impl.plj.gz +0 -0
  12. package/dist/tengo/tpl/check_network.create_workdir_from_storage.plj.gz +0 -0
  13. package/dist/tengo/tpl/check_network.download_blob.plj.gz +0 -0
  14. package/dist/tengo/tpl/check_network.run_hello_world.plj.gz +0 -0
  15. package/dist/tengo/tpl/check_network.run_hello_world_py.plj.gz +0 -0
  16. package/dist/tengo/tpl/check_network.upload_blob.plj.gz +0 -0
  17. package/dist/tengo/tpl/check_network.upload_template.plj.gz +0 -0
  18. package/dist/tengo/tpl/check_network.workdir_type_name_extractor.plj.gz +0 -0
  19. package/dist/tengo/tpl/exec.conda.create-env.plj.gz +0 -0
  20. package/dist/tengo/tpl/exec.delayed-compute-allocation.impl.plj.gz +0 -0
  21. package/dist/tengo/tpl/exec.exec-impl.plj.gz +0 -0
  22. package/dist/tengo/tpl/exec.exec.plj.gz +0 -0
  23. package/dist/tengo/tpl/exec.load-software.impl.plj.gz +0 -0
  24. package/dist/tengo/tpl/exec.monetization_info.plj.gz +0 -0
  25. package/dist/tengo/tpl/exec.monetization_to_json.plj.gz +0 -0
  26. package/dist/tengo/tpl/exec.python.create-venv.plj.gz +0 -0
  27. package/dist/tengo/tpl/exec.python.install-deps.plj.gz +0 -0
  28. package/dist/tengo/tpl/exec.python.venv-bin-path.plj.gz +0 -0
  29. package/dist/tengo/tpl/ll.get-field.plj.gz +0 -0
  30. package/dist/tengo/tpl/pframes.export-multiple-pcolumns.plj.gz +0 -0
  31. package/dist/tengo/tpl/pframes.export-parquet-pcolumn-chunk.plj.gz +0 -0
  32. package/dist/tengo/tpl/pframes.export-pframe-for-ui.plj.gz +0 -0
  33. package/dist/tengo/tpl/pframes.export-pframe.plj.gz +0 -0
  34. package/dist/tengo/tpl/pframes.export-single-pcolumn.plj.gz +0 -0
  35. package/dist/tengo/tpl/pframes.import-dir.plj.gz +0 -0
  36. package/dist/tengo/tpl/pframes.parse-to-json.plj.gz +0 -0
  37. package/dist/tengo/tpl/pframes.process-pcolumn-data.plj.gz +0 -0
  38. package/dist/tengo/tpl/pframes.remove-nulls.plj.gz +0 -0
  39. package/dist/tengo/tpl/pframes.slice-data.plj.gz +0 -0
  40. package/dist/tengo/tpl/pframes.xsv-export-pframe.plj.gz +0 -0
  41. package/dist/tengo/tpl/pframes.xsv-import-if-not-null.plj.gz +0 -0
  42. package/dist/tengo/tpl/pframes.xsv-import-map.plj.gz +0 -0
  43. package/dist/tengo/tpl/pt.import-dir.plj.gz +0 -0
  44. package/dist/tengo/tpl/pt.workflow-run.plj.gz +0 -0
  45. package/dist/tengo/tpl/waiter.waiter.plj.gz +0 -0
  46. package/dist/tengo/tpl/workdir.save.plj.gz +0 -0
  47. package/dist/tengo/tpl/workflow.build-ctx.plj.gz +0 -0
  48. package/dist/tengo/tpl/workflow.query-anchored.plj.gz +0 -0
  49. package/package.json +2 -2
@@ -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.cacheAssetHours: <asset> parameter is not an asset info. Provide the value obtained from assets.importAsset() here")
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.cacheAssetHours: asset cache time must be a number of days.")
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
@@ -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
  },
@@ -67,11 +67,11 @@ _validateColumn := func(name, columnStruct) {
67
67
 
68
68
  _newPEntry := func(columnsByName, joinTree) {
69
69
  return ll.toStrict({
70
-
70
+
71
71
  _getColumnsMap: func() {
72
72
  return columnsByName
73
73
  },
74
-
74
+
75
75
  _getJoinTree: func() {
76
76
  return joinTree
77
77
  }
@@ -399,7 +399,7 @@ resource = func(r) {
399
399
 
400
400
  isFinal: func() {
401
401
 
402
- if false {
402
+ if false /* feats.fullFeaturedApi */ {
403
403
  return self.info().IsFinal
404
404
  }
405
405
 
@@ -16,7 +16,7 @@ waiterTpl := assets.importTemplate("@platforma-sdk/workflow-tengo:waiter.waiter"
16
16
  builder := func(pass) {
17
17
  self := undefined
18
18
 
19
-
19
+
20
20
  whatToWait := []
21
21
 
22
22
  self = ll.toStrict({
@@ -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
- wd := self.wdFinalBuilder().build()
138
-
139
- return {
140
- result: result,
141
- workdir: wd.getWorkdirAfter()
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platforma-sdk/workflow-tengo",
3
- "version": "5.6.5",
3
+ "version": "5.6.6",
4
4
  "description": "Tengo SDK library",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",
@@ -22,7 +22,7 @@
22
22
  "@platforma-open/milaboratories.software-ptexter": "1.2.0"
23
23
  },
24
24
  "devDependencies": {
25
- "@platforma-sdk/tengo-builder": "2.3.14"
25
+ "@platforma-sdk/tengo-builder": "2.4.0"
26
26
  },
27
27
  "scripts": {
28
28
  "type-check": "pl-tengo check",