Skip to content

Commit 58840e1

Browse files
committed
chore: updated datashield with released version
1 parent 7eb6ad2 commit 58840e1

File tree

4 files changed

+42
-28
lines changed

4 files changed

+42
-28
lines changed

datashield_opal/impl.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ def __init__(self, name: str, loginInfo: OpalClient.LoginInfo, profile: str = "d
140140
self.restore = restore
141141
self.verbose = False
142142
self.rsession = None
143+
self.rsession_started = False
143144

144145
#
145146
# Content listing
@@ -188,7 +189,16 @@ def start_session(self, asynchronous: bool = True) -> RSession:
188189
return self.rsession
189190
self.rsession = OpalRSession(self.client, profile=self.profile, restore=self.restore, verbose=self.verbose)
190191
self.rsession.start(asynchronous=asynchronous)
192+
self.rsession_started = not asynchronous or not self.rsession.is_pending()
191193
return self.rsession
194+
195+
def is_session_started(self) -> bool:
196+
if self.rsession is None:
197+
return False
198+
if self.rsession_started:
199+
return True
200+
self.rsession_started = not self.rsession.is_pending()
201+
return self.rsession_started
192202

193203
def get_session(self) -> RSession:
194204
if self.rsession is None:

examples/datashield.py.ipynb

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
},
100100
{
101101
"cell_type": "code",
102-
"execution_count": 8,
102+
"execution_count": 2,
103103
"id": "56772b7c",
104104
"metadata": {},
105105
"outputs": [
@@ -108,7 +108,7 @@
108108
"output_type": "stream",
109109
"text": [
110110
"Last message from server1: Ready\n",
111-
"Events from server1: [['PENDING', '2026-02-17T14:01:01.399Z', 'Created'], ['RUNNING', '2026-02-17T14:01:01.427Z', 'Ready']]\n"
111+
"Events from server1: [['PENDING', '2026-02-17T17:07:30.762Z', 'Created'], ['RUNNING', '2026-02-17T17:07:30.788Z', 'Ready']]\n"
112112
]
113113
}
114114
],
@@ -121,7 +121,7 @@
121121
},
122122
{
123123
"cell_type": "code",
124-
"execution_count": 61,
124+
"execution_count": 3,
125125
"id": "8c3f1ce1",
126126
"metadata": {},
127127
"outputs": [
@@ -131,7 +131,7 @@
131131
"{'server1': ['client'], 'server2': ['client']}"
132132
]
133133
},
134-
"execution_count": 61,
134+
"execution_count": 3,
135135
"metadata": {},
136136
"output_type": "execute_result"
137137
}
@@ -143,7 +143,7 @@
143143
},
144144
{
145145
"cell_type": "code",
146-
"execution_count": 62,
146+
"execution_count": 4,
147147
"id": "c9f5ae1a",
148148
"metadata": {},
149149
"outputs": [
@@ -157,7 +157,7 @@
157157
" 'R6']}"
158158
]
159159
},
160-
"execution_count": 62,
160+
"execution_count": 4,
161161
"metadata": {},
162162
"output_type": "execute_result"
163163
}
@@ -168,7 +168,7 @@
168168
},
169169
{
170170
"cell_type": "code",
171-
"execution_count": 63,
171+
"execution_count": 5,
172172
"id": "36dbc72d",
173173
"metadata": {},
174174
"outputs": [
@@ -178,7 +178,7 @@
178178
"{'server1': ['client', 'df'], 'server2': ['client', 'df']}"
179179
]
180180
},
181-
"execution_count": 63,
181+
"execution_count": 5,
182182
"metadata": {},
183183
"output_type": "execute_result"
184184
}
@@ -190,7 +190,7 @@
190190
},
191191
{
192192
"cell_type": "code",
193-
"execution_count": 64,
193+
"execution_count": 6,
194194
"id": "ccdcfd91",
195195
"metadata": {},
196196
"outputs": [
@@ -200,7 +200,7 @@
200200
"{'server1': 'data.frame', 'server2': 'data.frame'}"
201201
]
202202
},
203-
"execution_count": 64,
203+
"execution_count": 6,
204204
"metadata": {},
205205
"output_type": "execute_result"
206206
}
@@ -211,7 +211,7 @@
211211
},
212212
{
213213
"cell_type": "code",
214-
"execution_count": 65,
214+
"execution_count": 7,
215215
"id": "9ae41ebc",
216216
"metadata": {},
217217
"outputs": [
@@ -244,7 +244,7 @@
244244
" 'PM_BMI_CONTINUOUS']}"
245245
]
246246
},
247-
"execution_count": 65,
247+
"execution_count": 7,
248248
"metadata": {},
249249
"output_type": "execute_result"
250250
}
@@ -255,7 +255,7 @@
255255
},
256256
{
257257
"cell_type": "code",
258-
"execution_count": 66,
258+
"execution_count": 8,
259259
"id": "ee31c50b",
260260
"metadata": {},
261261
"outputs": [
@@ -274,7 +274,7 @@
274274
" 'ValidityMessage': 'VALID ANALYSIS'}}"
275275
]
276276
},
277-
"execution_count": 66,
277+
"execution_count": 8,
278278
"metadata": {},
279279
"output_type": "execute_result"
280280
}
@@ -285,17 +285,17 @@
285285
},
286286
{
287287
"cell_type": "code",
288-
"execution_count": 4,
288+
"execution_count": 9,
289289
"id": "d4cde00d",
290290
"metadata": {},
291291
"outputs": [
292292
{
293293
"data": {
294294
"text/plain": [
295-
"{'server1': ['df2'], 'server2': ['df2']}"
295+
"{'server1': ['client', 'df', 'df2'], 'server2': ['client', 'df', 'df2']}"
296296
]
297297
},
298-
"execution_count": 4,
298+
"execution_count": 9,
299299
"metadata": {},
300300
"output_type": "execute_result"
301301
}
@@ -307,7 +307,7 @@
307307
},
308308
{
309309
"cell_type": "code",
310-
"execution_count": 5,
310+
"execution_count": 10,
311311
"id": "f6ed662c",
312312
"metadata": {},
313313
"outputs": [],
@@ -321,7 +321,7 @@
321321
},
322322
{
323323
"cell_type": "code",
324-
"execution_count": null,
324+
"execution_count": 11,
325325
"id": "51dc8812",
326326
"metadata": {},
327327
"outputs": [
@@ -344,7 +344,7 @@
344344
},
345345
{
346346
"cell_type": "code",
347-
"execution_count": null,
347+
"execution_count": 12,
348348
"id": "48242294",
349349
"metadata": {},
350350
"outputs": [],
@@ -356,7 +356,7 @@
356356
},
357357
{
358358
"cell_type": "code",
359-
"execution_count": 8,
359+
"execution_count": 13,
360360
"id": "50165862",
361361
"metadata": {},
362362
"outputs": [
@@ -389,7 +389,7 @@
389389
},
390390
{
391391
"cell_type": "code",
392-
"execution_count": 9,
392+
"execution_count": 14,
393393
"id": "0a98f514",
394394
"metadata": {},
395395
"outputs": [],
@@ -399,7 +399,7 @@
399399
},
400400
{
401401
"cell_type": "code",
402-
"execution_count": 29,
402+
"execution_count": 15,
403403
"id": "578293b7",
404404
"metadata": {},
405405
"outputs": [
@@ -431,7 +431,7 @@
431431
},
432432
{
433433
"cell_type": "code",
434-
"execution_count": 40,
434+
"execution_count": 16,
435435
"id": "85481de0",
436436
"metadata": {},
437437
"outputs": [],

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ classifiers = [
2323
"Programming Language :: Python :: 3.13",
2424
]
2525
dependencies = [
26-
"datashield @ git+https://github.com/datashield/datashield-python.git@feat/sessions",
26+
"datashield>=0.2.0",
2727
"obiba_opal @ git+https://github.com/obiba/opal-python-client.git@master"
2828
]
2929

uv.lock

Lines changed: 7 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)