Skip to content

Jupyter support for ModelView#1907

Merged
ramcdougal merged 2 commits into
masterfrom
jupyter-modelview
Jul 7, 2022
Merged

Jupyter support for ModelView#1907
ramcdougal merged 2 commits into
masterfrom
jupyter-modelview

Conversation

@ramcdougal

Copy link
Copy Markdown
Member

Displaying a ModelView object inside a Jupyter notebook shows the expandable tree instead of e.g. ModelView[0]. This makes ModelView usable in e.g. Google Colab, even though it doesn't give the full information (as no shape plots are available).

image

Importantly:

  • collapsing and expanding list elements is done in pure HTML (no JavaScript), so there are no save/load security issues... it just works when you reopen the notebook

  • the repr and str of the object are unchanged (so scripts analyzing ModelView objects are unaffected)

  • the ModelView object itself is completely unchanged

  • the displaying behavior is unchanged inside a regular terminal or an IPython session

    image

@ramcdougal ramcdougal requested a review from nrnhines July 7, 2022 19:36
@ramcdougal ramcdougal requested a review from Helveg July 7, 2022 19:43

@nrnhines nrnhines left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

Merging #1907 (04666fe) into master (40c8cb4) will decrease coverage by 0.05%.
The diff coverage is 13.51%.

@@            Coverage Diff             @@
##           master    #1907      +/-   ##
==========================================
- Coverage   47.18%   47.12%   -0.06%     
==========================================
  Files         543      543              
  Lines      112892   112929      +37     
==========================================
- Hits        53263    53223      -40     
- Misses      59629    59706      +77     
Impacted Files Coverage Δ
share/lib/python/neuron/__init__.py 40.09% <13.51%> (-1.23%) ⬇️
src/nrnmpi/bbsmpipack.cpp 81.95% <0.00%> (-10.25%) ⬇️
src/parallel/bbsclimpi.cpp 50.57% <0.00%> (-8.63%) ⬇️
src/parallel/bbssrvmpi.cpp 41.46% <0.00%> (-6.10%) ⬇️
src/parallel/bbs.cpp 74.57% <0.00%> (-1.70%) ⬇️

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@azure-pipelines

Copy link
Copy Markdown

✔️ 04666fe -> Azure artifacts URL

@ramcdougal ramcdougal merged commit 622f1a8 into master Jul 7, 2022
@ramcdougal ramcdougal deleted the jupyter-modelview branch July 7, 2022 20:26
alexsavulescu pushed a commit that referenced this pull request Aug 8, 2022
- collapsing and expanding list elements is done in pure HTML (no JavaScript), so there are no save/load security issues... it just works when you reopen the notebook
- the repr and str of the object are unchanged (so scripts analyzing ModelView objects are unaffected)
- the ModelView object itself is completely unchanged
- the displaying behavior is unchanged inside a regular terminal or an IPython session
@alexsavulescu alexsavulescu mentioned this pull request Aug 9, 2022
18 tasks
alexsavulescu pushed a commit that referenced this pull request Aug 9, 2022
- collapsing and expanding list elements is done in pure HTML (no JavaScript), so there are no save/load security issues... it just works when you reopen the notebook
- the repr and str of the object are unchanged (so scripts analyzing ModelView objects are unaffected)
- the ModelView object itself is completely unchanged
- the displaying behavior is unchanged inside a regular terminal or an IPython session
alexsavulescu pushed a commit that referenced this pull request Aug 12, 2022
- collapsing and expanding list elements is done in pure HTML (no JavaScript), so there are no save/load security issues... it just works when you reopen the notebook
- the repr and str of the object are unchanged (so scripts analyzing ModelView objects are unaffected)
- the ModelView object itself is completely unchanged
- the displaying behavior is unchanged inside a regular terminal or an IPython session
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants