Skip to content

Commit 3a7552a

Browse files
authored
Readme: new functions
1 parent 4f37403 commit 3a7552a

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

README.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,16 @@ If you modified environment variables restart your InterSystems product.
2727
## Docker
2828

2929
1. To build docker image:
30-
- Copy `iscpython.so` into repository root (if it's not there)
31-
- Execute in repository root `docker build --force-rm --tag intersystems-community/irispy:latest .`
30+
- Copy `iscpython.so` into repository root (if it's not there already)
31+
- Execute in repository root `docker build --force-rm --tag intersystemscommunity/irispy:latest .`
3232
2. To run docker image execute:
3333

3434
```
3535
docker run -d \
3636
-p 52773:52773 \
3737
-v /<HOST-DIR-WITH-iris.key>/:/mount \
3838
--name irispy \
39-
intersystems-community/irispy:latest \
39+
intersystemscommunity/irispy:latest \
4040
--key /mount/iris.key \
4141
```
4242
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
6767
- `GetVariableInfo(variable, serialization, .defined, .type, .length)` - get info about variable: is it defined, type,and serialization length.
6868
- `GetStatus()` - returns last occured exception in Python and clears it.
6969
- `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.
7171
- `ExecuteQuery(query, variable, type)` - create resultset (pandas `dataframe` or `list`) from sql query and set it into `variable`.
7272
- `ImportModule(module, .imported, .alias)` - import module with alias.
7373
- `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
8787
- 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.
8888
- Restore context: `do ##class(isc.py.data.Context).RestoreContext(id, verbose, clear)` where `clear` kills currently loaded context if set to 1.
8989

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.
9191

9292
# Interoperability adapter
9393

@@ -105,13 +105,15 @@ Check request/response classes documentation for details.
105105

106106
Along with callout code and Interoperability adapter there's also a test Interoperability Production and test Business Process. To use them:
107107

108-
1. In OS bash execute `pip install pandas matplotlib seaborn`.
108+
1. In OS bash execute `pip install pandas matplotlib seaborn`.
109109
2. Execute: `do ##class(isc.py.test.CannibalizationData).Import()` to populate test data.
110110
3. In test Business Process `isc.py.test.Process` edit annotation for `Correlation Matrix: Graph` call, specifying valid filepath for `f.savefig` function.
111111
4. Save and compile business process.
112112
5. Start `isc.py.test.Production` production.
113113
6. Send empty `Ens.Request` mesage to the `isc.py.test.Process`.
114114

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+
115117
### Notes
116118

117119
- 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"
146148
There are several limitaions associated with the use of PythonAdapter.
147149

148150
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.
152154

153155
# Development
154156

0 commit comments

Comments
 (0)