Skip to content

Commit 39c883b

Browse files
authored
pyiron: set local folder as default project (#67)
* pyiron: set local folder as default project * Update pyiron_base.py * Update pyiron_base.py
1 parent f0f63dd commit 39c883b

13 files changed

+1081
-394
lines changed

aiida_nfdi.ipynb

Lines changed: 1 addition & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -298,16 +298,6 @@
298298
"source": "## Load Workflow with pyiron_base",
299299
"metadata": {}
300300
},
301-
{
302-
"id": "fdde6b82-b51d-434a-a9a8-5a8c31bbb429",
303-
"cell_type": "code",
304-
"source": "from pyiron_base import Project",
305-
"metadata": {
306-
"trusted": true
307-
},
308-
"outputs": [],
309-
"execution_count": 20
310-
},
311301
{
312302
"id": "be4d5d93-e9f6-4072-a6be-0ee5dc93590f",
313303
"cell_type": "code",
@@ -318,34 +308,11 @@
318308
"outputs": [],
319309
"execution_count": 21
320310
},
321-
{
322-
"id": "4db75587-5f4c-416d-a1f6-c949077fa2ca",
323-
"cell_type": "code",
324-
"source": "pr = Project(\"test\")\npr.remove_jobs(recursive=True, silently=True)",
325-
"metadata": {
326-
"trusted": true
327-
},
328-
"outputs": [
329-
{
330-
"output_type": "display_data",
331-
"data": {
332-
"text/plain": "0it [00:00, ?it/s]",
333-
"application/vnd.jupyter.widget-view+json": {
334-
"version_major": 2,
335-
"version_minor": 0,
336-
"model_id": "744782e84c574359874689c2242fb2d8"
337-
}
338-
},
339-
"metadata": {}
340-
}
341-
],
342-
"execution_count": 22
343-
},
344311
{
345312
"id": "4452a648-d4c3-4f5f-8678-ffb54bef17dc",
346313
"cell_type": "code",
347314
"source": [
348-
"delayed_object_lst = load_workflow_json(project=pr, file_name=workflow_json_filename)\n",
315+
"delayed_object_lst = load_workflow_json(file_name=workflow_json_filename)\n",
349316
"delayed_object_lst[-1].draw()"
350317
],
351318
"metadata": {
@@ -386,26 +353,6 @@
386353
}
387354
],
388355
"execution_count": 24
389-
},
390-
{
391-
"id": "b3bba27e-ece9-4c02-834c-53e69844b140",
392-
"cell_type": "code",
393-
"source": "pr.job_table()",
394-
"metadata": {
395-
"trusted": true
396-
},
397-
"outputs": [
398-
{
399-
"execution_count": 25,
400-
"output_type": "execute_result",
401-
"data": {
402-
"text/plain": " id status chemicalformula \\\n0 1 finished None \n1 2 finished None \n2 3 finished None \n3 4 finished None \n4 5 finished None \n5 6 finished None \n\n job \\\n0 generate_mesh_0b48cf5155cd6802c17d20bb58104132 \n1 convert_to_xdmf_29ad6ec6927268429dc9aef8166fde43 \n2 poisson_a0224b23ceb2119d105a5d98ef37f93e \n3 plot_over_line_82b37a42e0747f11d9a7f6318f63ac6b \n4 substitute_macros_874fc185ecec04b4cb9537c58b7efb7b \n5 compile_paper_3cee534ffe692833d37faf1fd2170cb6 \n\n subjob projectpath \\\n0 /generate_mesh_0b48cf5155cd6802c17d20bb58104132 None \n1 /convert_to_xdmf_29ad6ec6927268429dc9aef8166fde43 None \n2 /poisson_a0224b23ceb2119d105a5d98ef37f93e None \n3 /plot_over_line_82b37a42e0747f11d9a7f6318f63ac6b None \n4 /substitute_macros_874fc185ecec04b4cb9537c58b7efb7b None \n5 /compile_paper_3cee534ffe692833d37faf1fd2170cb6 None \n\n project timestart timestop totalcputime \\\n0 /home/jovyan/test/ 2025-04-12 11:32:18.725836 None None \n1 /home/jovyan/test/ 2025-04-12 11:32:21.567671 None None \n2 /home/jovyan/test/ 2025-04-12 11:32:24.772144 None None \n3 /home/jovyan/test/ 2025-04-12 11:32:30.023925 None None \n4 /home/jovyan/test/ 2025-04-12 11:32:34.237777 None None \n5 /home/jovyan/test/ 2025-04-12 11:32:36.156992 None None \n\n computer \\\n0 pyiron@jupyter-pyiron-dev-pyth-flow-definition-a8grxfsa#1 \n1 pyiron@jupyter-pyiron-dev-pyth-flow-definition-a8grxfsa#1 \n2 pyiron@jupyter-pyiron-dev-pyth-flow-definition-a8grxfsa#1 \n3 pyiron@jupyter-pyiron-dev-pyth-flow-definition-a8grxfsa#1 \n4 pyiron@jupyter-pyiron-dev-pyth-flow-definition-a8grxfsa#1 \n5 pyiron@jupyter-pyiron-dev-pyth-flow-definition-a8grxfsa#1 \n\n hamilton hamversion parentid masterid \n0 PythonFunctionContainerJob 0.4 None None \n1 PythonFunctionContainerJob 0.4 None None \n2 PythonFunctionContainerJob 0.4 None None \n3 PythonFunctionContainerJob 0.4 None None \n4 PythonFunctionContainerJob 0.4 None None \n5 PythonFunctionContainerJob 0.4 None None ",
403-
"text/html": "<div>\n<style scoped>\n .dataframe tbody tr th:only-of-type {\n vertical-align: middle;\n }\n\n .dataframe tbody tr th {\n vertical-align: top;\n }\n\n .dataframe thead th {\n text-align: right;\n }\n</style>\n<table border=\"1\" class=\"dataframe\">\n <thead>\n <tr style=\"text-align: right;\">\n <th></th>\n <th>id</th>\n <th>status</th>\n <th>chemicalformula</th>\n <th>job</th>\n <th>subjob</th>\n <th>projectpath</th>\n <th>project</th>\n <th>timestart</th>\n <th>timestop</th>\n <th>totalcputime</th>\n <th>computer</th>\n <th>hamilton</th>\n <th>hamversion</th>\n <th>parentid</th>\n <th>masterid</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th>0</th>\n <td>1</td>\n <td>finished</td>\n <td>None</td>\n <td>generate_mesh_0b48cf5155cd6802c17d20bb58104132</td>\n <td>/generate_mesh_0b48cf5155cd6802c17d20bb58104132</td>\n <td>None</td>\n <td>/home/jovyan/test/</td>\n <td>2025-04-12 11:32:18.725836</td>\n <td>None</td>\n <td>None</td>\n <td>pyiron@jupyter-pyiron-dev-pyth-flow-definition-a8grxfsa#1</td>\n <td>PythonFunctionContainerJob</td>\n <td>0.4</td>\n <td>None</td>\n <td>None</td>\n </tr>\n <tr>\n <th>1</th>\n <td>2</td>\n <td>finished</td>\n <td>None</td>\n <td>convert_to_xdmf_29ad6ec6927268429dc9aef8166fde43</td>\n <td>/convert_to_xdmf_29ad6ec6927268429dc9aef8166fde43</td>\n <td>None</td>\n <td>/home/jovyan/test/</td>\n <td>2025-04-12 11:32:21.567671</td>\n <td>None</td>\n <td>None</td>\n <td>pyiron@jupyter-pyiron-dev-pyth-flow-definition-a8grxfsa#1</td>\n <td>PythonFunctionContainerJob</td>\n <td>0.4</td>\n <td>None</td>\n <td>None</td>\n </tr>\n <tr>\n <th>2</th>\n <td>3</td>\n <td>finished</td>\n <td>None</td>\n <td>poisson_a0224b23ceb2119d105a5d98ef37f93e</td>\n <td>/poisson_a0224b23ceb2119d105a5d98ef37f93e</td>\n <td>None</td>\n <td>/home/jovyan/test/</td>\n <td>2025-04-12 11:32:24.772144</td>\n <td>None</td>\n <td>None</td>\n <td>pyiron@jupyter-pyiron-dev-pyth-flow-definition-a8grxfsa#1</td>\n <td>PythonFunctionContainerJob</td>\n <td>0.4</td>\n <td>None</td>\n <td>None</td>\n </tr>\n <tr>\n <th>3</th>\n <td>4</td>\n <td>finished</td>\n <td>None</td>\n <td>plot_over_line_82b37a42e0747f11d9a7f6318f63ac6b</td>\n <td>/plot_over_line_82b37a42e0747f11d9a7f6318f63ac6b</td>\n <td>None</td>\n <td>/home/jovyan/test/</td>\n <td>2025-04-12 11:32:30.023925</td>\n <td>None</td>\n <td>None</td>\n <td>pyiron@jupyter-pyiron-dev-pyth-flow-definition-a8grxfsa#1</td>\n <td>PythonFunctionContainerJob</td>\n <td>0.4</td>\n <td>None</td>\n <td>None</td>\n </tr>\n <tr>\n <th>4</th>\n <td>5</td>\n <td>finished</td>\n <td>None</td>\n <td>substitute_macros_874fc185ecec04b4cb9537c58b7efb7b</td>\n <td>/substitute_macros_874fc185ecec04b4cb9537c58b7efb7b</td>\n <td>None</td>\n <td>/home/jovyan/test/</td>\n <td>2025-04-12 11:32:34.237777</td>\n <td>None</td>\n <td>None</td>\n <td>pyiron@jupyter-pyiron-dev-pyth-flow-definition-a8grxfsa#1</td>\n <td>PythonFunctionContainerJob</td>\n <td>0.4</td>\n <td>None</td>\n <td>None</td>\n </tr>\n <tr>\n <th>5</th>\n <td>6</td>\n <td>finished</td>\n <td>None</td>\n <td>compile_paper_3cee534ffe692833d37faf1fd2170cb6</td>\n <td>/compile_paper_3cee534ffe692833d37faf1fd2170cb6</td>\n <td>None</td>\n <td>/home/jovyan/test/</td>\n <td>2025-04-12 11:32:36.156992</td>\n <td>None</td>\n <td>None</td>\n <td>pyiron@jupyter-pyiron-dev-pyth-flow-definition-a8grxfsa#1</td>\n <td>PythonFunctionContainerJob</td>\n <td>0.4</td>\n <td>None</td>\n <td>None</td>\n </tr>\n </tbody>\n</table>\n</div>"
404-
},
405-
"metadata": {}
406-
}
407-
],
408-
"execution_count": 25
409356
}
410357
]
411358
}

aiida_qe.ipynb

Lines changed: 3 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -348,15 +348,6 @@
348348
"source": "## Load Workflow with pyiron_base",
349349
"metadata": {}
350350
},
351-
{
352-
"cell_type": "code",
353-
"source": "from pyiron_base import Project",
354-
"metadata": {
355-
"trusted": true
356-
},
357-
"outputs": [],
358-
"execution_count": 22
359-
},
360351
{
361352
"cell_type": "code",
362353
"source": "from python_workflow_definition.pyiron_base import load_workflow_json",
@@ -368,29 +359,10 @@
368359
},
369360
{
370361
"cell_type": "code",
371-
"source": "pr = Project(\"test\")\npr.remove_jobs(recursive=True, silently=True)",
372-
"metadata": {
373-
"trusted": true
374-
},
375-
"outputs": [
376-
{
377-
"output_type": "display_data",
378-
"data": {
379-
"text/plain": "0it [00:00, ?it/s]",
380-
"application/vnd.jupyter.widget-view+json": {
381-
"version_major": 2,
382-
"version_minor": 0,
383-
"model_id": "682a9c9d86fb4bc4823cd8112c5ffdf4"
384-
}
385-
},
386-
"metadata": {}
387-
}
362+
"source": [
363+
"delayed_object_lst = load_workflow_json(file_name=workflow_json_filename)\n",
364+
"delayed_object_lst[-1].draw()"
388365
],
389-
"execution_count": 24
390-
},
391-
{
392-
"cell_type": "code",
393-
"source": "delayed_object_lst = load_workflow_json(project=pr, file_name=workflow_json_filename)\ndelayed_object_lst[-1].draw()",
394366
"metadata": {
395367
"trusted": true
396368
},

aiida_simple.ipynb

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -175,15 +175,6 @@
175175
"source": "## Load Workflow with pyiron_base",
176176
"metadata": {}
177177
},
178-
{
179-
"cell_type": "code",
180-
"source": "from pyiron_base import Project",
181-
"metadata": {
182-
"trusted": true
183-
},
184-
"outputs": [],
185-
"execution_count": 12
186-
},
187178
{
188179
"cell_type": "code",
189180
"source": "from python_workflow_definition.pyiron_base import load_workflow_json",
@@ -193,32 +184,10 @@
193184
"outputs": [],
194185
"execution_count": 13
195186
},
196-
{
197-
"cell_type": "code",
198-
"source": "pr = Project(\"test\")\npr.remove_jobs(recursive=True, silently=True)",
199-
"metadata": {
200-
"trusted": true
201-
},
202-
"outputs": [
203-
{
204-
"output_type": "display_data",
205-
"data": {
206-
"text/plain": "0it [00:00, ?it/s]",
207-
"application/vnd.jupyter.widget-view+json": {
208-
"version_major": 2,
209-
"version_minor": 0,
210-
"model_id": "1cebe3e991ff4d8aacbea78a858011fb"
211-
}
212-
},
213-
"metadata": {}
214-
}
215-
],
216-
"execution_count": 14
217-
},
218187
{
219188
"cell_type": "code",
220189
"source": [
221-
"delayed_object_lst = load_workflow_json(project=pr, file_name=workflow_json_filename)\n",
190+
"delayed_object_lst = load_workflow_json(file_name=workflow_json_filename)\n",
222191
"delayed_object_lst[-1].draw()"
223192
],
224193
"metadata": {

jobflow_nfdi.ipynb

Lines changed: 1 addition & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -261,16 +261,6 @@
261261
"source": "## Load Workflow with pyiron_base",
262262
"metadata": {}
263263
},
264-
{
265-
"id": "fdde6b82-b51d-434a-a9a8-5a8c31bbb429",
266-
"cell_type": "code",
267-
"source": "from pyiron_base import Project",
268-
"metadata": {
269-
"trusted": true
270-
},
271-
"outputs": [],
272-
"execution_count": 18
273-
},
274264
{
275265
"id": "be4d5d93-e9f6-4072-a6be-0ee5dc93590f",
276266
"cell_type": "code",
@@ -281,34 +271,11 @@
281271
"outputs": [],
282272
"execution_count": 19
283273
},
284-
{
285-
"id": "4db75587-5f4c-416d-a1f6-c949077fa2ca",
286-
"cell_type": "code",
287-
"source": "pr = Project(\"test\")\npr.remove_jobs(recursive=True, silently=True)",
288-
"metadata": {
289-
"trusted": true
290-
},
291-
"outputs": [
292-
{
293-
"output_type": "display_data",
294-
"data": {
295-
"text/plain": "0it [00:00, ?it/s]",
296-
"application/vnd.jupyter.widget-view+json": {
297-
"version_major": 2,
298-
"version_minor": 0,
299-
"model_id": "9a6ea2489a6847ab8375930b499b9a7f"
300-
}
301-
},
302-
"metadata": {}
303-
}
304-
],
305-
"execution_count": 20
306-
},
307274
{
308275
"id": "4452a648-d4c3-4f5f-8678-ffb54bef17dc",
309276
"cell_type": "code",
310277
"source": [
311-
"delayed_object_lst = load_workflow_json(project=pr, file_name=workflow_json_filename)\n",
278+
"delayed_object_lst = load_workflow_json(file_name=workflow_json_filename)\n",
312279
"delayed_object_lst[-1].draw()"
313280
],
314281
"metadata": {
@@ -349,26 +316,6 @@
349316
}
350317
],
351318
"execution_count": 22
352-
},
353-
{
354-
"id": "b3bba27e-ece9-4c02-834c-53e69844b140",
355-
"cell_type": "code",
356-
"source": "pr.job_table()",
357-
"metadata": {
358-
"trusted": true
359-
},
360-
"outputs": [
361-
{
362-
"execution_count": 23,
363-
"output_type": "execute_result",
364-
"data": {
365-
"text/plain": " id status chemicalformula \\\n0 1 finished None \n1 2 finished None \n2 3 finished None \n3 4 finished None \n4 5 finished None \n5 6 finished None \n\n job \\\n0 generate_mesh_0b48cf5155cd6802c17d20bb58104132 \n1 convert_to_xdmf_29ad6ec6927268429dc9aef8166fde43 \n2 poisson_a0224b23ceb2119d105a5d98ef37f93e \n3 plot_over_line_82b37a42e0747f11d9a7f6318f63ac6b \n4 substitute_macros_874fc185ecec04b4cb9537c58b7efb7b \n5 compile_paper_3cee534ffe692833d37faf1fd2170cb6 \n\n subjob projectpath \\\n0 /generate_mesh_0b48cf5155cd6802c17d20bb58104132 None \n1 /convert_to_xdmf_29ad6ec6927268429dc9aef8166fde43 None \n2 /poisson_a0224b23ceb2119d105a5d98ef37f93e None \n3 /plot_over_line_82b37a42e0747f11d9a7f6318f63ac6b None \n4 /substitute_macros_874fc185ecec04b4cb9537c58b7efb7b None \n5 /compile_paper_3cee534ffe692833d37faf1fd2170cb6 None \n\n project timestart timestop totalcputime \\\n0 /home/jovyan/test/ 2025-04-12 11:33:56.439299 None None \n1 /home/jovyan/test/ 2025-04-12 11:33:59.335257 None None \n2 /home/jovyan/test/ 2025-04-12 11:34:02.548200 None None \n3 /home/jovyan/test/ 2025-04-12 11:34:07.792544 None None \n4 /home/jovyan/test/ 2025-04-12 11:34:12.093499 None None \n5 /home/jovyan/test/ 2025-04-12 11:34:14.126943 None None \n\n computer \\\n0 pyiron@jupyter-pyiron-dev-pyth-flow-definition-a8grxfsa#1 \n1 pyiron@jupyter-pyiron-dev-pyth-flow-definition-a8grxfsa#1 \n2 pyiron@jupyter-pyiron-dev-pyth-flow-definition-a8grxfsa#1 \n3 pyiron@jupyter-pyiron-dev-pyth-flow-definition-a8grxfsa#1 \n4 pyiron@jupyter-pyiron-dev-pyth-flow-definition-a8grxfsa#1 \n5 pyiron@jupyter-pyiron-dev-pyth-flow-definition-a8grxfsa#1 \n\n hamilton hamversion parentid masterid \n0 PythonFunctionContainerJob 0.4 None None \n1 PythonFunctionContainerJob 0.4 None None \n2 PythonFunctionContainerJob 0.4 None None \n3 PythonFunctionContainerJob 0.4 None None \n4 PythonFunctionContainerJob 0.4 None None \n5 PythonFunctionContainerJob 0.4 None None ",
366-
"text/html": "<div>\n<style scoped>\n .dataframe tbody tr th:only-of-type {\n vertical-align: middle;\n }\n\n .dataframe tbody tr th {\n vertical-align: top;\n }\n\n .dataframe thead th {\n text-align: right;\n }\n</style>\n<table border=\"1\" class=\"dataframe\">\n <thead>\n <tr style=\"text-align: right;\">\n <th></th>\n <th>id</th>\n <th>status</th>\n <th>chemicalformula</th>\n <th>job</th>\n <th>subjob</th>\n <th>projectpath</th>\n <th>project</th>\n <th>timestart</th>\n <th>timestop</th>\n <th>totalcputime</th>\n <th>computer</th>\n <th>hamilton</th>\n <th>hamversion</th>\n <th>parentid</th>\n <th>masterid</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th>0</th>\n <td>1</td>\n <td>finished</td>\n <td>None</td>\n <td>generate_mesh_0b48cf5155cd6802c17d20bb58104132</td>\n <td>/generate_mesh_0b48cf5155cd6802c17d20bb58104132</td>\n <td>None</td>\n <td>/home/jovyan/test/</td>\n <td>2025-04-12 11:33:56.439299</td>\n <td>None</td>\n <td>None</td>\n <td>pyiron@jupyter-pyiron-dev-pyth-flow-definition-a8grxfsa#1</td>\n <td>PythonFunctionContainerJob</td>\n <td>0.4</td>\n <td>None</td>\n <td>None</td>\n </tr>\n <tr>\n <th>1</th>\n <td>2</td>\n <td>finished</td>\n <td>None</td>\n <td>convert_to_xdmf_29ad6ec6927268429dc9aef8166fde43</td>\n <td>/convert_to_xdmf_29ad6ec6927268429dc9aef8166fde43</td>\n <td>None</td>\n <td>/home/jovyan/test/</td>\n <td>2025-04-12 11:33:59.335257</td>\n <td>None</td>\n <td>None</td>\n <td>pyiron@jupyter-pyiron-dev-pyth-flow-definition-a8grxfsa#1</td>\n <td>PythonFunctionContainerJob</td>\n <td>0.4</td>\n <td>None</td>\n <td>None</td>\n </tr>\n <tr>\n <th>2</th>\n <td>3</td>\n <td>finished</td>\n <td>None</td>\n <td>poisson_a0224b23ceb2119d105a5d98ef37f93e</td>\n <td>/poisson_a0224b23ceb2119d105a5d98ef37f93e</td>\n <td>None</td>\n <td>/home/jovyan/test/</td>\n <td>2025-04-12 11:34:02.548200</td>\n <td>None</td>\n <td>None</td>\n <td>pyiron@jupyter-pyiron-dev-pyth-flow-definition-a8grxfsa#1</td>\n <td>PythonFunctionContainerJob</td>\n <td>0.4</td>\n <td>None</td>\n <td>None</td>\n </tr>\n <tr>\n <th>3</th>\n <td>4</td>\n <td>finished</td>\n <td>None</td>\n <td>plot_over_line_82b37a42e0747f11d9a7f6318f63ac6b</td>\n <td>/plot_over_line_82b37a42e0747f11d9a7f6318f63ac6b</td>\n <td>None</td>\n <td>/home/jovyan/test/</td>\n <td>2025-04-12 11:34:07.792544</td>\n <td>None</td>\n <td>None</td>\n <td>pyiron@jupyter-pyiron-dev-pyth-flow-definition-a8grxfsa#1</td>\n <td>PythonFunctionContainerJob</td>\n <td>0.4</td>\n <td>None</td>\n <td>None</td>\n </tr>\n <tr>\n <th>4</th>\n <td>5</td>\n <td>finished</td>\n <td>None</td>\n <td>substitute_macros_874fc185ecec04b4cb9537c58b7efb7b</td>\n <td>/substitute_macros_874fc185ecec04b4cb9537c58b7efb7b</td>\n <td>None</td>\n <td>/home/jovyan/test/</td>\n <td>2025-04-12 11:34:12.093499</td>\n <td>None</td>\n <td>None</td>\n <td>pyiron@jupyter-pyiron-dev-pyth-flow-definition-a8grxfsa#1</td>\n <td>PythonFunctionContainerJob</td>\n <td>0.4</td>\n <td>None</td>\n <td>None</td>\n </tr>\n <tr>\n <th>5</th>\n <td>6</td>\n <td>finished</td>\n <td>None</td>\n <td>compile_paper_3cee534ffe692833d37faf1fd2170cb6</td>\n <td>/compile_paper_3cee534ffe692833d37faf1fd2170cb6</td>\n <td>None</td>\n <td>/home/jovyan/test/</td>\n <td>2025-04-12 11:34:14.126943</td>\n <td>None</td>\n <td>None</td>\n <td>pyiron@jupyter-pyiron-dev-pyth-flow-definition-a8grxfsa#1</td>\n <td>PythonFunctionContainerJob</td>\n <td>0.4</td>\n <td>None</td>\n <td>None</td>\n </tr>\n </tbody>\n</table>\n</div>"
367-
},
368-
"metadata": {}
369-
}
370-
],
371-
"execution_count": 23
372319
}
373320
]
374321
}

0 commit comments

Comments
 (0)