refactor: migrate to pixi + marimo + nxviz plotly backend#477
Open
ericmjl wants to merge 4 commits into
Open
Conversation
- Move all Python deps into [project] dependencies (pypi via editable install) - Add marimo>=0.14, nxviz>=0.9.0, plotly>=5.0 to project deps - Switch all nxviz calls to use backend='plotly' - Remove inline script metadata from all notebooks (pixi handles deps) - Add pixi task 'notebook' -> marimo edit --no-token notebooks/ - Remove render_html from nams.functions, update solutions modules - Update setup instructions to use pixi instead of uv - Update [tool.pixi.project] -> [tool.pixi.workspace] - Remove jupyter/ipykernel conda deps (no longer needed)
…bottom - Move marimo import to a single cell that returns mo, all other cells reference it via marimo's reactive dependency system - Wrap intentional G.edges[15,16] KeyError in try/except in 02-networkx-intro - Delete empty cell in 02-networkx-intro - Cosmetic reformatting from marimo auto-save in 01-setup
…-save - Standardize mo.md() call formatting (single-line vs multi-line) - Add __generated_with version marker - Remove backend='plotly' from some nxviz calls in 01-hubs - Return nv from nxviz import cell for downstream use
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Rearchitects the tutorial to use pixi for dependency management with marimo notebooks and nxviz plotly backend.
Changes
pyproject.toml
[project](installed via pypi editable):marimo>=0.14,nxviz>=0.9.0,plotly>=5.0, etc.pixi run notebooktask →marimo edit --no-token notebooks/[tool.pixi.project]→[tool.pixi.workspace](newer pixi format)nams package
render_html()fromnams/functions.py(no longer needed)paths,structures,bipartite) to return/print plain strings insteadAll 16 notebooks
# /// scriptinline metadata (pixi handles deps)backend="plotly"to allnxvizcalls (nv.circos,nv.arc,nv.matrix,nv.hive,nv.geo)annotate.*calls andplt.show()after nxviz (plotly handles rendering)plt.show()for pure matplotlib (nx.draw,plt.hist,plt.scatter)Usage
Verification
All 16 notebooks pass
marimo check(0 errors, markdown indentation warnings only).