Skip to content

Commit fb04dcf

Browse files
committed
refactor VipGirder
1 parent ab25ec7 commit fb04dcf

File tree

5 files changed

+408
-109
lines changed

5 files changed

+408
-109
lines changed
Lines changed: 210 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,210 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": null,
6+
"id": "e4b2f485-cb8b-4e4b-b21c-c381760fc914",
7+
"metadata": {},
8+
"outputs": [],
9+
"source": [
10+
"%load_ext autoreload"
11+
]
12+
},
13+
{
14+
"cell_type": "code",
15+
"execution_count": null,
16+
"id": "9a2a0f64-107e-47a3-b994-4ba55735bfa8",
17+
"metadata": {},
18+
"outputs": [],
19+
"source": [
20+
"%autoreload 2"
21+
]
22+
},
23+
{
24+
"cell_type": "code",
25+
"execution_count": null,
26+
"id": "f72d24fb-f9f4-45b2-b7bc-0533216932ea",
27+
"metadata": {},
28+
"outputs": [],
29+
"source": [
30+
"import vip_client\n",
31+
"import importlib\n",
32+
"from vip_client import VipGirder\n",
33+
"#importlib.reload(client)\n",
34+
"vip_client.__path__"
35+
]
36+
},
37+
{
38+
"cell_type": "code",
39+
"execution_count": null,
40+
"id": "8a60aa4a-ba39-4c9b-b749-a79b8f6d21e7",
41+
"metadata": {},
42+
"outputs": [],
43+
"source": [
44+
"import inspect\n",
45+
"inspect.getfile(VipGirder)"
46+
]
47+
},
48+
{
49+
"cell_type": "code",
50+
"execution_count": null,
51+
"id": "fc36a278-550b-43f5-800d-3500612ba12d",
52+
"metadata": {},
53+
"outputs": [],
54+
"source": [
55+
"VipGirder.init()"
56+
]
57+
},
58+
{
59+
"cell_type": "code",
60+
"execution_count": null,
61+
"id": "0a7c7ee2-2656-4585-9930-895e68cc90ac",
62+
"metadata": {},
63+
"outputs": [],
64+
"source": [
65+
"session.display()"
66+
]
67+
},
68+
{
69+
"cell_type": "markdown",
70+
"id": "97d7cf93-2ab0-4d07-81b2-654b38480f9a",
71+
"metadata": {},
72+
"source": [
73+
"# Output on girder (default)"
74+
]
75+
},
76+
{
77+
"cell_type": "code",
78+
"execution_count": null,
79+
"id": "cdaa53b9-eaec-44d7-a342-7b41191fcb4a",
80+
"metadata": {},
81+
"outputs": [],
82+
"source": [
83+
"pipeline_id=\"BasicGrepLocal/0.2\"\n",
84+
"VipGirder.show_pipeline(pipeline_id)\n",
85+
"session_name=\"test_girder_girder\"\n",
86+
"output_dir=\"/collection/ReproVIPSpectro/test/vip_outputs\"\n",
87+
"input_settings={\n",
88+
" \"file\":\"/collection/ReproVIPSpectro/test/test_for_grep.txt\",\n",
89+
" \"int\":5,\n",
90+
" \"text\":\"grep\"\n",
91+
"}\n",
92+
"session = VipGirder(session_name=session_name, pipeline_id=pipeline_id, input_settings=input_settings, output_dir=output_dir)"
93+
]
94+
},
95+
{
96+
"cell_type": "markdown",
97+
"id": "1aec7d5d-05e1-4baf-af30-2e9b42e791f1",
98+
"metadata": {},
99+
"source": [
100+
"# Output on VIP"
101+
]
102+
},
103+
{
104+
"cell_type": "code",
105+
"execution_count": null,
106+
"id": "25da2f62-e044-4ffd-855f-74881ad5d770",
107+
"metadata": {},
108+
"outputs": [],
109+
"source": [
110+
"pipeline_id=\"BasicGrepLocal/0.2\"\n",
111+
"VipGirder.show_pipeline(pipeline_id)\n",
112+
"session_name=\"test_girder_vip\"\n",
113+
"input_settings={\n",
114+
" \"file\":\"/collection/ReproVIPSpectro/test/test_for_grep.txt\",\n",
115+
" \"int\":5,\n",
116+
" \"text\":\"grep\"\n",
117+
"}\n",
118+
"session = VipGirder(session_name=session_name, pipeline_id=pipeline_id, input_settings=input_settings, output_location=\"vip\")"
119+
]
120+
},
121+
{
122+
"cell_type": "markdown",
123+
"id": "7c726378-93b0-443d-9531-89b42735142d",
124+
"metadata": {},
125+
"source": [
126+
"# Output in local"
127+
]
128+
},
129+
{
130+
"cell_type": "code",
131+
"execution_count": null,
132+
"id": "bff17ffe-bebc-419d-b68d-ed3b0d2f4cf7",
133+
"metadata": {},
134+
"outputs": [],
135+
"source": [
136+
"pipeline_id=\"BasicGrepLocal/0.2\"\n",
137+
"VipGirder.show_pipeline(pipeline_id)\n",
138+
"session_name=\"test_girder_local\"\n",
139+
"input_settings={\n",
140+
" \"file\":\"/collection/ReproVIPSpectro/test/test_for_grep.txt\",\n",
141+
" \"int\":5,\n",
142+
" \"text\":\"grep\"\n",
143+
"}\n",
144+
"session = VipGirder(session_name=session_name, pipeline_id=pipeline_id, input_settings=input_settings, output_location=\"local\")"
145+
]
146+
},
147+
{
148+
"cell_type": "code",
149+
"execution_count": null,
150+
"id": "d47ee6da-1178-4646-b9f6-a71711dcac01",
151+
"metadata": {},
152+
"outputs": [],
153+
"source": [
154+
"session.launch_pipeline()\n",
155+
"session.display()\n",
156+
"session.monitor_workflows()\n",
157+
"session.display()"
158+
]
159+
},
160+
{
161+
"cell_type": "code",
162+
"execution_count": null,
163+
"id": "81f8dc9e-22ab-4603-ae3b-28d83f0a2615",
164+
"metadata": {},
165+
"outputs": [],
166+
"source": [
167+
"session.download_outputs()"
168+
]
169+
},
170+
{
171+
"cell_type": "code",
172+
"execution_count": null,
173+
"id": "d54e5e44-7350-4e79-a8aa-0a8a58c60fac",
174+
"metadata": {},
175+
"outputs": [],
176+
"source": [
177+
"session.finish()"
178+
]
179+
},
180+
{
181+
"cell_type": "code",
182+
"execution_count": null,
183+
"id": "39544d26-4881-4562-9d65-209c61836b33",
184+
"metadata": {},
185+
"outputs": [],
186+
"source": []
187+
}
188+
],
189+
"metadata": {
190+
"kernelspec": {
191+
"display_name": "Python 3 (ipykernel)",
192+
"language": "python",
193+
"name": "python3"
194+
},
195+
"language_info": {
196+
"codemirror_mode": {
197+
"name": "ipython",
198+
"version": 3
199+
},
200+
"file_extension": ".py",
201+
"mimetype": "text/x-python",
202+
"name": "python",
203+
"nbconvert_exporter": "python",
204+
"pygments_lexer": "ipython3",
205+
"version": "3.13.3"
206+
}
207+
},
208+
"nbformat": 4,
209+
"nbformat_minor": 5
210+
}

src/vip_client/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"""
99

1010
# Informations
11-
__version__ = "0.1.8"
11+
__version__ = "0.1.9-a1"
1212
__license__ = "CECILL-B"
1313

1414
from vip_client.classes import VipSession
15+
from vip_client.classes import VipGirder

0 commit comments

Comments
 (0)