Skip to content

Commit

Permalink
fix: mocs can now be added without calling serialize
Browse files Browse the repository at this point in the history
  • Loading branch information
ManonMarchand committed Jun 25, 2024
1 parent dfb3ba8 commit 0d70bb7
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 15 deletions.
26 changes: 16 additions & 10 deletions content/01-intro-to-python-vizier-and-ipyaladin.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"metadata": {},
"outputs": [],
"source": [
"%pip install anywidget\n",
"%pip install ipywidgets==8.1.2\n",
"%pip install ipyaladin\n",
"%pip install sidecar"
]
},
Expand Down Expand Up @@ -136,12 +137,11 @@
"metadata": {},
"outputs": [],
"source": [
"aladin.add_moc_from_dict(catalog_coverage.serialize(\"json\"),\n",
" {\"color\": \"lightblue\",\n",
" \"fill\": True,\n",
" \"edge\": True,\n",
" \"opacity\": 0.2\n",
" })"
"aladin.add_moc(catalog_coverage,\n",
" color=\"lightblue\",\n",
" fill=True,\n",
" edge=True,\n",
" opacity=0.2)"
]
},
{
Expand Down Expand Up @@ -203,7 +203,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "jupyterlite-cds",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -219,13 +219,19 @@
"pygments_lexer": "ipython3",
"version": "3.10.11"
},
"orig_nbformat": 4,
"vscode": {
"interpreter": {
"hash": "86f746604a95311db3b65fdbe489811da477d28d9b9887fbfebf91cebe84b237"
}
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
"state": {},
"version_major": 2,
"version_minor": 0
}
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
17 changes: 12 additions & 5 deletions content/03-draw_me_a_MOC.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@
"metadata": {},
"outputs": [],
"source": [
"await micropip.install(\"emfs:\" + str(path) for path in whl_paths)\n",
"await micropip.install(\"widgetsnbextension\")"
"await micropip.install(\"emfs:\" + str(path) for path in whl_paths)"
]
},
{
Expand All @@ -46,7 +45,8 @@
"metadata": {},
"outputs": [],
"source": [
"%pip install anywidget"
"%pip install ipywidgets==8.1.2\n",
"%pip install ipyaladin"
]
},
{
Expand Down Expand Up @@ -147,7 +147,7 @@
"metadata": {},
"outputs": [],
"source": [
"aladin.add_moc_from_dict(polygon_moc.serialize(\"json\"), {\"color\": \"pink\", \"opacity\": 0.5})"
"aladin.add_moc(polygon_moc, color=\"pink\", opacity=0.5)"
]
}
],
Expand All @@ -167,12 +167,19 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.15"
"version": "3.10.11"
},
"vscode": {
"interpreter": {
"hash": "85bb43f988bdbdc027a50b6d744a62eda8a76617af1f4f9b115d38242716dbac"
}
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
"state": {},
"version_major": 2,
"version_minor": 0
}
}
},
"nbformat": 4,
Expand Down

0 comments on commit 0d70bb7

Please sign in to comment.