You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
3. Test process `isc.py.test.Process` saves image aftifact into temp directory. You might want to change that path to a monted directory. To do that edit annotation for `Correlation Matrix: Graph` call, specifying valid filepath for `f.savefig` function.
@@ -67,7 +67,7 @@ Generally the main interface to Python is `isc.py.Main`. It offers these methods
67
67
-`GetVariableInfo(variable, serialization, .defined, .type, .length)` - get info about variable: is it defined, type,and serialization length.
68
68
-`GetStatus()` - returns last occured exception in Python and clears it.
69
69
-`GetVariableJson(variable, .stream, useString)` - get JSON serialization of variable.
70
-
-`GetVariablePickle(variable, .stream, useString)` - get Pickle serialization of variable.
70
+
-`GetVariablePickle(variable, .stream, useString, useDill)` - get Pickle (or Dill) serialization of variable.
71
71
-`ExecuteQuery(query, variable, type)` - create resultset (pandas `dataframe` or `list`) from sql query and set it into `variable`.
72
72
-`ImportModule(module, .imported, .alias)` - import module with alias.
73
73
-`GetModuleInfo(module, .imported, .alias)` - get module alias and is it currently imported.
@@ -87,7 +87,7 @@ Python context can be persisted into InterSystems IRIS and restored later on. Th
87
87
- Display context: `do ##class(isc.py.data.Context).DisplayContext(id)` where `id` is an id of a stored context. Leave empty to display current context.
88
88
- Restore context: `do ##class(isc.py.data.Context).RestoreContext(id, verbose, clear)` where `clear` kills currently loaded context if set to 1.
89
89
90
-
Context is saved into `isc.py.data` package and can be viewed/edited by SQL and object methods.
90
+
Context is saved into `isc.py.data` package and can be viewed/edited by SQL and object methods. Currently modules, functions and variables are saved.
91
91
92
92
# Interoperability adapter
93
93
@@ -105,13 +105,15 @@ Check request/response classes documentation for details.
105
105
106
106
Along with callout code and Interoperability adapter there's also a test Interoperability Production and test Business Process. To use them:
107
107
108
-
1. In OS bash execute `pip install pandas matplotlib seaborn`.
108
+
1. In OS bash execute `pip install pandas matplotlib seaborn`.
109
109
2. Execute: `do ##class(isc.py.test.CannibalizationData).Import()` to populate test data.
110
110
3. In test Business Process `isc.py.test.Process` edit annotation for `Correlation Matrix: Graph` call, specifying valid filepath for `f.savefig` function.
111
111
4. Save and compile business process.
112
112
5. Start `isc.py.test.Production` production.
113
113
6. Send empty `Ens.Request` mesage to the `isc.py.test.Process`.
114
114
115
+
Note: instead of step 3 run: `set sc = ##class(isc.py.util.Installer).ConfigureTestProcess(user, password, host, port, namespace)` to try adgust process automatically.
116
+
115
117
### Notes
116
118
117
119
- If you want to use `ODBC` connection, on Windows install pyodbc: `pip install pyodbc`, on Linux install: `apt-get install unixodbc unixodbc-dev python-pyodbc`.
@@ -146,9 +148,9 @@ zpy "x"
146
148
There are several limitaions associated with the use of PythonAdapter.
147
149
148
150
1. Modules reinitialization. Some modules may only be loaded once diring process lifetime (i.e. numpy). While Finalization clears the context of the process, repeated load of such libraries terminates the process. Discussions: [1](https://stackoverflow.com/questions/14843408/python-c-embedded-segmentation-fault), [2](https://stackoverflow.com/questions/7676314/py-initialize-py-finalize-not-working-twice-with-numpy).
149
-
2. Variables. Do not use these variables: `zzzcolumns`, `zzzdata`, `zzzdef`, `zzzalias`, `zzzerr`, `zzzvar`, `zzztype`, `zzzlen`, `zzzjson`, `zzzpickle`, `zzzcount`, `zzzitem`, `zzzmodules`, `zzzvars`. Please report any leakage of these variables. System code should always clear them.
150
-
3. Functions Do not redefine these functions `zzzmodulesfunc()`, `zzzvarsfunc()`, `zzzgetalias()`, `zzztoserializable()`.
151
-
4. Context persistence. Only pickled variables could be restored correctly. User functions are currently not supported. Module imports are supported.
151
+
2. Variables. Do not use these variables: `zzz*` variables. Please report any leakage of these variables. System code should always clear them.
152
+
3. Functions Do not redefine `zzz*()` functions.
153
+
4. Context persistence. Only pickled/dill variables could be restored correctly. Module imports are supported.
0 commit comments