Skip to content

Commit 7073662

Browse files
committed
Docs: spell check
1 parent 75000c9 commit 7073662

File tree

3 files changed

+27
-27
lines changed

3 files changed

+27
-27
lines changed

CHANGELOG.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2424
### Changed
2525
- Dill is now a required module.
2626
- `GetVariableInfo` now returns FQCN as type.
27-
- `GetVariableInfo` support for atributes (methods and the like).
28-
- Test process noe uses non-interactive GUI for test business process
27+
- `GetVariableInfo` support for attributes (methods and the like).
28+
- Test process now uses non-interactive GUI for test business process
2929
- Test process: new data, simplified code.
3030
- Log trace events enabled by default.
3131

@@ -55,7 +55,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
5555

5656
## [0.4.2] - 2019-01-17
5757
### Changed
58-
- Pass/retrieve limit raized to 3 641 144 characters.
58+
- Pass/retrieve limit raised to 3 641 144 characters.
5959

6060
## [0.4] - 2018-12-28
6161
### Added
@@ -66,7 +66,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6666

6767
## [0.3] - 2018-12-24
6868
### Changed
69-
- Transfer limit raized to 3 641 144 characters.
69+
- Transfer limit raised to 3 641 144 characters.
7070

7171
### Removed
7272
- Explicit initialization (now it's done implicitly).

Gateway.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Gateway functionality
22

3-
This document describes functionality pertrainig to what is commonly understood as (.Net/Java) Gateway.
3+
This document describes functionality pertaining to what is commonly understood as (.Net/Java) Gateway.
44
There are three main parts:
55
- Execute Function
66
- Proxyless Gateway
@@ -26,11 +26,11 @@ It is caller responsibility to escape argument values. Use `isc.py.util.Converte
2626
`ExecuteFunction` method from `isc.py.Main` class. Signature:
2727
- `function` - name of function to invoke. Can be nested, i.e. `random.randint`
2828
- `variable` - name of python variable to write result to.
29-
- `positionalArguments` - positional argumets for Python function. Can be one of:
29+
- `positionalArguments` - positional arguments for Python function. Can be one of:
3030
+ `$lb(val1, val2, ..., valN)`
3131
+ `%Collection.AbstractIterator` object
3232
+ JSON array
33-
- `keywordArguments` - keyword argumets for Python function. Can be one of:
33+
- `keywordArguments` - keyword arguments for Python function. Can be one of:
3434
+ `$lb($lb(name1, val1), $lb(name2, val2), ..., $lb(nameN, valN))`
3535
+ `%Collection.AbstractArray` object
3636
+ flat JSON object
@@ -145,7 +145,7 @@ set obj.name="Bob"
145145
write obj.name
146146
write obj.age
147147
```
148-
4. We can set some new properties too (unlike `ExecuteFunction` values are escaped automatically if `%EscapeOnSet` property is 1, which is default. You can also set properties to other dynamic objects. In that case unsecaped python variable name would be used):
148+
4. We can set some new properties too (unlike `ExecuteFunction` values are escaped automatically if `%EscapeOnSet` property is 1, which is default. You can also set properties to other dynamic objects. In that case unescaped python variable name would be used):
149149
```
150150
set obj.pet = "Dog"
151151
write obj.pet

README.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ This projects brings you the power of Python right into your InterSystems IRIS e
2020

2121
## Linux
2222

23-
5. Check that your SYSTEM `PATH` environment variable has `/usr/lib` and `/usr/lib/x86_64-linux-gnu`, preferably at the begining. Use `/etc/environment` file to set environment variables.
23+
5. Check that your SYSTEM `PATH` environment variable has `/usr/lib` and `/usr/lib/x86_64-linux-gnu`, preferably at the beginning. Use `/etc/environment` file to set environment variables.
2424
6. In cause of errors check Troubleshooting section `undefined symbol: _Py_TrueStruct` and specify PythonLib property.
2525

2626
## Mac
@@ -44,9 +44,9 @@ docker run -d \
4444
intersystemscommunity/irispy:latest \
4545
--key /mount/iris.key \
4646
```
47-
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.
47+
3. Test process `isc.py.test.Process` saves image artifact into temp directory. You might want to change that path to a mounted directory. To do that edit annotation for `Correlation Matrix: Graph` call, specifying valid filepath for `f.savefig` function.
4848
4. For terminal access execute: `docker exec -it irispy sh`.
49-
5. Access SMP with SuperUser/SYS or Admin/SYS user/passowrd.
49+
5. Access SMP with SuperUser/SYS or Admin/SYS user/password.
5050
6. To stop container execute: `docker stop irispy && docker rm --force irispy`.
5151

5252
# Use
@@ -67,10 +67,10 @@ set sc = ##class(isc.py.Callout).Unload()
6767
Generally the main interface to Python is `isc.py.Main`. It offers these methods (all return `%Status`):
6868

6969
- `SimpleString(code, returnVariable, serialization, .result)` - for cases where both code and variable are strings.
70-
- `ExecuteCode(code, variable)` - execute `code` (it may be a stream or string), optionally ser result into `variable`.
70+
- `ExecuteCode(code, variable)` - execute `code` (it may be a stream or string), optionally set result into `variable`.
7171
- `GetVariable(variable, serialization, .stream, useString)` - get `serialization` of `variable` in `stream`. If `useString` is 1 and variable serialization can fit into string then string is returned instead of the stream.
7272
- `GetVariableInfo(variable, serialization, .defined, .type, .length)` - get info about variable: is it defined, type,and serialization length.
73-
- `GetStatus()` - returns last occured exception in Python and clears it.
73+
- `GetStatus()` - returns last occurred exception in Python and clears it.
7474
- `GetVariableJson(variable, .stream, useString)` - get JSON serialization of variable.
7575
- `GetVariablePickle(variable, .stream, useString, useDill)` - get Pickle (or Dill) serialization of variable.
7676
- `ExecuteQuery(query, variable, type)` - create resultset (pandas `dataframe` or `list`) from sql query and set it into `variable`.
@@ -92,7 +92,7 @@ To open Python shell: `do ##class(isc.py.util.Shell).Shell()`. To exit press ent
9292

9393
Python context can be persisted into InterSystems IRIS and restored later on. There are currently three public functions:
9494

95-
- Save context: `set sc = ##class(isc.py.data.Context).SaveContext(.context, maxLength, mask, verbose)` where `maxLength` - maximum length of saved variable. If veriable serialization is longer than that, it would be ignored. Set to 0 to get them all, `mask` - comma separated list of variables to save (special symbols * and ? are recognized), `verbose` specifies displaying context after saving, and `context` is a resulting Python context. Get context id with `context.%Id()`
95+
- Save context: `set sc = ##class(isc.py.data.Context).SaveContext(.context, maxLength, mask, verbose)` where `maxLength` - maximum length of saved variable. If variable serialization is longer than that, it would be ignored. Set to 0 to get them all, `mask` - comma separated list of variables to save (special symbols * and ? are recognized), `verbose` specifies displaying context after saving, and `context` is a resulting Python context. Get context id with `context.%Id()`
9696
- 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.
9797
- Restore context: `do ##class(isc.py.data.Context).RestoreContext(id, verbose, clear)` where `clear` kills currently loaded context if set to 1.
9898

@@ -105,16 +105,16 @@ Interoperability adapter `isc.py.ens.Operation` offers ability to interact with
105105
- Execute Python code via `isc.py.msg.ExecutionRequest`. Returns `isc.py.msg.ExecutionResponse` with requested variable values
106106
- Execute Python code via `isc.py.msg.StreamExecutionRequest`. Returns `isc.py.msg.StreamExecutionResponse` with requested variable values. Same as above, but accepts and returns streams instead of strings.
107107
- Set dataset from SQL Query with `isc.py.msg.QueryRequest`. Returns `Ens.Response`.
108-
- Save Python conext via `isc.py.msg.SaveRequest`. Returns `Ens.StringResponse` with context id.
108+
- Save Python context via `isc.py.msg.SaveRequest`. Returns `Ens.StringResponse` with context id.
109109
- Restore Python context via `isc.py.msg.RestoreRequest`.
110110

111111
Check request/response classes documentation for details.
112112

113113
Settings:
114114
- `Initializer` - select a class implementing `isc.py.init.Abstract`. It can be used to load functions, modules, classes and so on. It would be executed at process start.
115-
- `PythonLib` - (linux only) if you see loading errors set it to `libpython3.6m.so` or even to a full path to the shared library.
115+
- `PythonLib` - (Linux only) if you see loading errors set it to `libpython3.6m.so` or even to a full path to the shared library.
116116

117-
Note: `isc.py.util.BPEmulator` class is added to allow easy testing of Python Interoperability business processes. It cat execute business process (pyhton parts) in a current job.
117+
Note: `isc.py.util.BPEmulator` class is added to allow easy testing of Python Interoperability business processes. It can execute business process (python parts) in a current job.
118118

119119
# Test Business Process
120120

@@ -125,14 +125,14 @@ Along with callout code and Interoperability adapter there's also a test Interop
125125
3. In test Business Process `isc.py.test.Process` edit annotation for `Correlation Matrix: Graph` call, specifying valid filepath for `f.savefig` function.
126126
4. Save and compile business process.
127127
5. Start `isc.py.test.Production` production.
128-
6. Send empty `Ens.Request` mesage to the `isc.py.test.Process`.
128+
6. Send empty `Ens.Request` message to the `isc.py.test.Process`.
129129

130-
Note: instead of step 3 run: `set sc = ##class(isc.py.util.Installer).ConfigureTestProcess(user, password, host, port, namespace)` to try adgust process automatically.
130+
Note: instead of step 3 run: `set sc = ##class(isc.py.util.Installer).ConfigureTestProcess(user, password, host, port, namespace)` to try adjust process automatically.
131131

132132
### Notes
133133

134134
- 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`.
135-
- If you want to use `JDBC` connection, install JayDeBeApi: `pip install JayDeBeApi`. On linux you might need to install: `apt-get install python-apt` beforehand.
135+
- If you want to use `JDBC` connection, install JayDeBeApi: `pip install JayDeBeApi`. On Linux you might need to install: `apt-get install python-apt` beforehand.
136136
- If you get errors similar to `undefined symbol: _Py_TrueStruct` in `isc.py.ens.Operation`operation set setting `PythonLib` to `libpython3.6m.so` or even to a full path of the shared library.
137137
- In test Business Process `isc.py.test.Process` edit annotation for `ODBC` or `JDBC` calls, specifying correct connection string.
138138
- In production, `isc.py.test.Process` host set `ConnectionType` setting to a preferred connection type (defaults to `RAW`, change only if you need to test xDBC connectivity).
@@ -162,9 +162,9 @@ Argumentless `zpy` command opens python shell.
162162

163163
# Limitations
164164

165-
There are several limitaions associated with the use of PythonAdapter.
165+
There are several limitations associated with the use of PythonAdapter.
166166

167-
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).
167+
1. Modules reinitialization. Some modules may only be loaded once during 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).
168168
2. Variables. Do not use these variables: `zzz*` variables. Please report any leakage of these variables. System code should always clear them.
169169
3. Functions Do not redefine `zzz*()` functions.
170170
4. Context persistence. Only pickled/dill variables could be restored correctly. Module imports are supported.
@@ -187,7 +187,7 @@ Development of C code is done in Eclipse.
187187

188188
## Linux
189189

190-
It's recommended to use Linux os which uses python3 by default, i.e. Ubuntu 18.04.1 LTS. Skip steps 1 and maybe even 2 if your OS has python 3.6 as default python (`python3 --version` or `python --version` or `python3.6 --version`).
190+
It's recommended to use Linux OS which uses python3 by default, i.e. Ubuntu 18.04.1 LTS. Skip steps 1 and maybe even 2 if your OS has python 3.6 as default python (`python3 --version` or `python --version` or `python3.6 --version`).
191191

192192
1. Add Python 3.6 repo: `add-apt-repository ppa:jonathonf/python-3.6` and `apt-get update`
193193
2. Install: `apt install python3.6 python3.6-dev libpython3.6-dev build-essential`
@@ -225,7 +225,7 @@ sys.version
225225

226226
The result should contain: `Python 3.6.7` and `64 bit`. If it's not, [install Python 3.6.7 64 bit](https://www.python.org/downloads/release/python-367/).
227227

228-
2. Check OS-specific instsallation steps. Make sure that path relevant for InterSystems IRIS (usually system) contains Python installation.
228+
2. Check OS-specific installation steps. Make sure that path relevant for InterSystems IRIS (usually system) contains Python installation.
229229

230230
3. Make sure that InterSystems IRIS can access Python installation.
231231

@@ -243,15 +243,15 @@ ver
243243

244244
If they are not the same search for a Python executable that is actually used by InterSystems IRIS.
245245

246-
2. Check that module is, in fact, installed. Open OS bash, execute `python` (maybe `python3` or `python36` on linux) and inside opened python bash execute `import <module>`. If it fails with some error run in OS bash `pip install <module>`. Note that module name for import and module name for pip could be different.
246+
2. Check that module is, in fact, installed. Open OS bash, execute `python` (maybe `python3` or `python36` on Linux) and inside opened python bash execute `import <module>`. If it fails with some error run in OS bash `pip install <module>`. Note that module name for import and module name for pip could be different.
247247
3. If you're sure that module is installed, compare paths used by python (it's not system path). Get path with:
248248
```
249249
import sys
250250
path=sys.path
251251
path
252252
```
253253
They should be the same. If they are not the same read how `PYTHONPATH` (python) is formed [here](https://stackoverflow.com/questions/897792/where-is-pythons-sys-path-initialized-from) and adjust your OS environment to form pythonpath (python) correctly, i.e. set `PYTHONPATH` (system) env var to `C:\Users\<USER>\AppData\Roaming\Python\Python36\site-packages` or other directories where your modules reside (and other missing directories).
254-
4. Compare python paths again and they are not the same or the problem persists add missing paths explicitly to the isc.py.ens.OutboundAdaptor init code (for interoperability) and on process start (for Callout wrapper):
254+
4. Compare python paths again and they are not the same or the problem persists add missing paths explicitly to the `isc.py.ens.Operation` init code (for interoperability) and on process start (for Callout wrapper):
255255

256256
```
257257
do ##class(isc.py.Main).SimpleString("import sys")
@@ -260,7 +260,7 @@ do ##class(isc.py.Main).SimpleString("sys.path.append('C:\\Users\\<USER>\\AppDat
260260

261261
## `undefined symbol: _Py_TrueStruct` or similar errors
262262

263-
1. Check `ldconfig` and adgust it to point to the directory with Python shared library.
263+
1. Check `ldconfig` and adjust it to point to the directory with Python shared library.
264264
2. If it fails:
265265
- For interoperability in `isc.py.ens.Operation` operation set setting `PythonLib` to `libpython3.6m.so` or even to a full path of the shared library.
266266
- For Callout wrapper on process start call `do ##class(isc.py.Callout).Initialize("libpython3.6m.so")` alternatively pass a full path of the shared library.

0 commit comments

Comments
 (0)