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
Copy file name to clipboardExpand all lines: README.md
+59-55
Original file line number
Diff line number
Diff line change
@@ -54,6 +54,7 @@ $ docker-compose up -d
54
54
55
55
### IRIS Initialization
56
56
In this template two approaches are provided to initialize iris: merge and python.
57
+
merge.cpf is a convenient way to setup different IRIS configuration settings. [Learn more about merge.cpf](https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=RACS_cpf#:~:text=Use%20the%20iris%20merge%20command,is%20the%20instance's%20current%20iris.).
57
58
58
59
1. Using merge to initialize IRIS and create IRIS Database and Namespace
59
60
Notice [merge.cpf](https://github.com/intersystems-community/iris-embedded-python-template/blob/4c12d4b02770c7422c7553ee818a18c1871c3759/merge.cpf) file that is being implemented during docker image build in Dockerfile
@@ -80,76 +81,26 @@ docker run --rm -it containers.intersystems.com/intersystems/passwordhash:1.1 -a
80
81
```
81
82
82
83
2. Using python to initialize IRIS.
83
-
Often we used a special iris.script file to run ObjectScript commands during the initialization.
84
-
This template shows you how to use python for the same purpose with [iris-script.py](https://github.com/intersystems-community/iris-embedded-python-template/blob/4c12d4b02770c7422c7553ee818a18c1871c3759/iris-script.py)file.
84
+
Often we used a special [iris.script](https://github.com/intersystems-community/iris-embedded-python-template/blob/d7c817865b48681e3454997906e1374b3baeef74/iris.script) file to run ObjectScript commands during the initialization - it is here just for the information.
85
+
This template shows you how to use python for the same purpose with [iris_script.py](https://github.com/intersystems-community/iris-embedded-python-template/blob/4c12d4b02770c7422c7553ee818a18c1871c3759/iris_script.py)file.
85
86
It is being executed via the line in Dockerfile:
86
87
```
87
-
irispython iris-script.py && \
88
+
irispython iris_script.py && \
88
89
```
89
-
the iris-script.py file contains examples how developer can initialize different services of iris via Python code.
90
+
the iris_script.py file contains examples how developer can initialize different services of iris via Python code.
90
91
91
92
92
93
## How to test it
93
94
94
-
### Working with Python libs from ObjectScript
95
-
Open IRIS terminal:
96
-
97
-
```objectscript
98
-
$ docker-compose exec iris iris session iris
99
-
USER>zn "IRISAPP"
100
-
```
101
-
102
-
The first test demonstrates the call to a standard python library working with dates datetime
103
-
```objectscript
104
-
IRISAPP>d ##class(dc.python.test).Today()
105
-
2021-02-09
106
-
```
107
-
108
-
Another example shows the work of a custom lib sample.py which is installed with repo or ZPM. It has function hello which returns string "world":
109
-
```objectscript
110
-
IRISAPP>d ##class(dc.python.test).Hello()
111
-
World
112
-
```
113
-
114
-
Another example shows how to work with files and use pandas and numpy libs.
0 commit comments