Skip to content

Commit

Permalink
Merge pull request #30 from pomme-abricot/application
Browse files Browse the repository at this point in the history
Add interactive application with voila
  • Loading branch information
pomme-abricot authored Jun 14, 2021
2 parents 9fcc368 + 130a948 commit 984bd1f
Show file tree
Hide file tree
Showing 10 changed files with 3,968 additions and 11,576 deletions.
2,611 changes: 2,611 additions & 0 deletions example/tutorials/5.Waffle_representation.ipynb

Large diffs are not rendered by default.

1,013 changes: 1,013 additions & 0 deletions example/tutorials/6.Interactive_widgets.ipynb

Large diffs are not rendered by default.

11,203 changes: 0 additions & 11,203 deletions example/tutorials/Waffle.ipynb

This file was deleted.

36 changes: 25 additions & 11 deletions src/openalea/strawberry/application/Strawberry Application.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
"container_main = v.Container(\n",
" _metadata={'mount_id': 'content-main'}, \n",
" children=[\n",
" p1.p1_container_main\n",
" p1.container_main\n",
" ]\n",
")\n",
"# container_main"
Expand All @@ -147,14 +147,14 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 4,
"id": "a90ad25d",
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "8f2ccc39f65e4789b6bbb53251ff3d44",
"model_id": "c9cbb5ef33684116aba177ced33e750b",
"version_major": 2,
"version_minor": 0
},
Expand All @@ -169,11 +169,11 @@
"source": [
"# Navigation (menubar)\n",
"components_map = {\n",
" 'Import MTG': p1.p1_container_main,\n",
" 'Import MTG': p1.container_main,\n",
" 'Visualization': p2.container_main,\n",
" 'Plant Scale': p3.p3_container_main,\n",
" 'Module Scale': p4.p4_container_main,\n",
" 'Node Scale': p5.p5_container_main,\n",
" 'Plant Scale': p3.container_main,\n",
" 'Module Scale': p4.container_main,\n",
" 'Node Scale': p5.container_main,\n",
"}\n",
"\n",
"py_items = [\n",
Expand Down Expand Up @@ -226,7 +226,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 5,
"id": "e884deaf",
"metadata": {
"scrolled": false
Expand All @@ -235,16 +235,30 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "202742710fe54cc3a06b75dc8c6246e5",
"model_id": "b52bd48577de4582b570f20f9f8f7328",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Container(children=[Container(children=[Tabs(children=[Tab(children=['Import Files']), Tab(children=['Files De"
"Container(children=[Container(children=[Tabs(children=[Tab(children=['Waffle']), TabItem(children=[Row(childre"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"== Line 20: A\tA\t+\t?\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n",
"Unknown right symbols <filter object at 0x7f0b7be2f310>.\n",
"== Line 21: A\tA\t<\t1\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n",
"Unknown right symbols <filter object at 0x7f0b7be2f4c0>.\n",
"== Line 22: T\tT\t+\t?\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n",
"Unknown right symbols <filter object at 0x7f0b7be2f8e0>.\n",
"== Line 23: T\tT\t<\t1\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n",
"Unknown right symbols <filter object at 0x7f0b7be2f1c0>.\n"
]
}
],
"source": [
Expand Down Expand Up @@ -276,7 +290,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.9"
"version": "3.8.10"
}
},
"nbformat": 4,
Expand Down
14 changes: 7 additions & 7 deletions src/openalea/strawberry/application/app_import_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,16 +100,16 @@ def on_change_get_files(widget, event, data):
else:
tableMTG.df= pd.DataFrame()

# update genotype selection
# update genotype selections
genotypes_selection.items=get_genotypes(misc.all_mtg)
p2.genotype_selection_3d.items=get_genotypes(misc.all_mtg)
p2.genotype_selection_2d.items=get_genotypes(misc.all_mtg)
p3.p3_wgt_genotypes_selection_t1.items=get_genotypes(misc.all_mtg)
p3.p3_wgt_genotypes_selection_t2.items=get_genotypes(misc.all_mtg)
p4.p4_wgt_genotypes_selection_t1.items=get_genotypes(misc.all_mtg)
p4.p4_wgt_genotypes_selection_t2.items=get_genotypes(misc.all_mtg)
p4.p4_wgt_genotypes_selection_t4.items=get_genotypes(misc.all_mtg)
p5.p5_wgt_genotypes_selection_t4.items=get_genotypes(misc.all_mtg)
p3.genotypes_selection_extraction.items=get_genotypes(misc.all_mtg)
p3.genotypes_selection_analyze.items=get_genotypes(misc.all_mtg)
p4.genotypes_selection_extraction.items=get_genotypes(misc.all_mtg)
p4.genotypes_selection_single_genotype.items=get_genotypes(misc.all_mtg)
p4.genotypes_selection_waffle.items=get_genotypes(misc.all_mtg)
p5.genotypes_selection_waffle.items=get_genotypes(misc.all_mtg)

# update file description
print_files_description()
Expand Down
Loading

0 comments on commit 984bd1f

Please sign in to comment.