@platforma-sdk/workflow-tengo 4.4.0 → 4.4.2
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.internal.lib.tengo +18 -10
- package/dist/tengo/lib/exec.python.lib.tengo +17 -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/exec.R.create-renv.plj.gz +0 -0
- package/dist/tengo/tpl/exec.exec.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-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.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/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 +1 -1
|
@@ -23,14 +23,23 @@ desc := import("@platforma-sdk/workflow-tengo:exec.descriptor")
|
|
|
23
23
|
validation := import("@platforma-sdk/workflow-tengo:validation")
|
|
24
24
|
|
|
25
25
|
|
|
26
|
+
|
|
27
|
+
|
|
26
28
|
_ARG_VAR_PKG := "pkg" // abs path to software package
|
|
27
29
|
_ARG_VAR_JAVA := "java" // abs path to 'java' run environment
|
|
28
|
-
|
|
30
|
+
_ARG_VAR_PYTHON_VENV := "python" // abs path to python virtual environment. WARNING: not change the name, it's used in other part of code
|
|
31
|
+
_ARG_VAR_PYTHON_RUN_ENV := "python_run_env" // abs path to python run environment used to create venv
|
|
32
|
+
_ARG_VAR_VENV_BIN_DIR := "venv_bin_dir" // name of bin dir in python venv depending on OS type (Scripts on Windows, bin on Unix)
|
|
29
33
|
_ARG_VAR_R := "R" // abs path to 'R' run environment runtime
|
|
30
34
|
_ARG_VAR_R_VENV := "rVenv" // abs path to 'R' portable virtual environment
|
|
31
35
|
_ARG_VAR_MNZ := "monetization" // monetization env value
|
|
32
36
|
|
|
33
37
|
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
pythonBinDir := undefined
|
|
41
|
+
|
|
42
|
+
|
|
34
43
|
_expr := func(varName) {
|
|
35
44
|
return "{" + varName + "}"
|
|
36
45
|
}
|
|
@@ -119,21 +128,20 @@ _loadPythonRunEnvironment := func(operationMode, descriptor, softName, softPkg)
|
|
|
119
128
|
|
|
120
129
|
venv := venvBuilder.
|
|
121
130
|
cacheDays(7).
|
|
122
|
-
build()
|
|
123
|
-
venv()
|
|
124
|
-
|
|
125
|
-
venvRoot := path.join(_expr(_ARG_VAR_PYTHON), "venv")
|
|
126
|
-
venvRefKey := softName + "/venv"
|
|
131
|
+
build()
|
|
127
132
|
|
|
128
|
-
pythonRefVar := _newRefVar(
|
|
133
|
+
pythonRefVar := _newRefVar(_ARG_VAR_PYTHON_RUN_ENV, softName+"/python", venv.python())
|
|
134
|
+
pythonVenvRefVar := _newRefVar(_ARG_VAR_PYTHON_VENV, softName + "/venv", venv.venv())
|
|
135
|
+
venvBinDirRefVar := _newRefVar(_ARG_VAR_VENV_BIN_DIR, softName + "/binDir", venv.binDir() )
|
|
129
136
|
|
|
130
137
|
return ll.toStrict({
|
|
131
138
|
runEnvType: "python",
|
|
132
139
|
|
|
133
|
-
variables: [ pythonRefVar ],
|
|
134
|
-
customPaths: [ _newArg(false, path.join(
|
|
140
|
+
variables: [ pythonRefVar, pythonVenvRefVar, venvBinDirRefVar ],
|
|
141
|
+
customPaths: [ _newArg(false, path.join(_expr(_ARG_VAR_PYTHON_VENV), "venv", _expr(_ARG_VAR_VENV_BIN_DIR))) ],
|
|
135
142
|
envs: {
|
|
136
|
-
"VIRTUAL_ENV": _newArg(false,
|
|
143
|
+
"VIRTUAL_ENV": _newArg(false, path.join(_expr(_ARG_VAR_PYTHON_VENV), "venv")),
|
|
144
|
+
"PYTHONPATH": _newArg(false, path.join(_expr(_ARG_VAR_PYTHON_RUN_ENV), descriptor.runEnv.binDir, "python_stdlib"))
|
|
137
145
|
}
|
|
138
146
|
})
|
|
139
147
|
}
|
|
@@ -12,6 +12,7 @@ runenv := import("@platforma-sdk/workflow-tengo:exec.runenv")
|
|
|
12
12
|
desc := import("@platforma-sdk/workflow-tengo:exec.descriptor")
|
|
13
13
|
|
|
14
14
|
_OUTPUT_RUN_ENV := "runEnv"
|
|
15
|
+
_OUTPUT_BIN_DIR := "binDir"
|
|
15
16
|
|
|
16
17
|
createVenvTpl := assets.importTemplate("@platforma-sdk/workflow-tengo:exec.python.create-venv")
|
|
17
18
|
|
|
@@ -150,6 +151,22 @@ pythonVenvBuilder := func() {
|
|
|
150
151
|
|
|
151
152
|
|
|
152
153
|
|
|
154
|
+
python: func() {
|
|
155
|
+
return pythonPkg
|
|
156
|
+
},
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
binDir: func() {
|
|
163
|
+
return tpl.output(_OUTPUT_BIN_DIR, cache)
|
|
164
|
+
},
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
|
|
153
170
|
|
|
154
171
|
venv: func() {
|
|
155
172
|
return tpl.output(_OUTPUT_RUN_ENV, cache)
|
|
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
|