Skip to content

Commit 54a2d09

Browse files
committed
added packagename and cleaned up
1 parent 2d01dd5 commit 54a2d09

File tree

5 files changed

+6
-7
lines changed

5 files changed

+6
-7
lines changed

.vscode/settings.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"service": "iris",
1313
"internalPort": 52773
1414
},
15-
"active": false
15+
"active": true
1616
},
1717
"sqltools.connections": [
1818
{

docker-compose.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@ services:
44
build:
55
context: .
66
dockerfile: Dockerfile
7-
command: --check-caps false
87
restart: always
98
ports:
109
- 1972
11-
- 55037:52773
10+
- 55038:52773
1211
- 53773
1312
volumes:
1413
- ./:/home/irisowner/dev

module.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<SourcesRoot>src</SourcesRoot>
1010
<Resource Name="dc.python.PKG"/>
1111
<FileCopy Name="python/" Target="${libdir}python/"/>
12-
<FileCopy Name="data/" Target="${libdir}data/"/>
12+
<FileCopy Name="data/" Target="${libdir}data/${packagename}/"/>
1313
</Module>
1414
</Document>
1515
</Export>

python/sample.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ def meanage(filename):
1919

2020
return str(mean_age)
2121

22-
print(meanage("/home/irisowner/dev/data/titanic.csv"))
22+
# print(meanage("/home/irisowner/dev/data/titanic.csv"))

src/dc/python/test.cls

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Class dc.python.PythonFromObjectScript
1+
Class dc.python.test
22
{
33

44
ClassMethod HelloWorld() As %Status
@@ -30,7 +30,7 @@ ClassMethod TitanicMeanAge() As %Status
3030
{
3131
Set sc = $$$OK
3232
set tt=##class(%SYS.Python).Import("sample")
33-
set path=$System.Util.ManagerDirectory()_"data/titanic.csv"
33+
set path=##class(%File).NormalizeDirectory("lib", ##class(%File).GetDirectory($zu(86)))_"data/iris-python-template/titanic.csv"
3434
write "mean age="_tt.meanage(path)
3535
Return sc
3636
}

0 commit comments

Comments
 (0)