diff --git a/.gitignore b/.gitignore index d43ea0d..eb87610 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,8 @@ notes.md -documents \ No newline at end of file +documents + +# uv +.venv/ +uv.lock diff --git a/.python-version b/.python-version new file mode 100644 index 0000000..24ee5b1 --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +3.13 diff --git a/README.md b/README.md index ef5035a..decc536 100644 --- a/README.md +++ b/README.md @@ -3,13 +3,30 @@ Simbio Tutorial for COMBINE 2026. To run in a browser following these links to r - https://marimo.app/https://github.com/dyscolab/simbio-tutorial/blob/main/tutorials/poincare_intro.py - https://marimo.app/https://github.com/dyscolab/simbio-tutorial/blob/main/tutorials/simbio_intro.py - https://marimo.app/https://github.com/dyscolab/simbio-tutorial/blob/main/tutorials/analysis.py - -For running it locally it is recommended to use [pixi](https://pixi.prefix.dev/latest/) to manage environments. Run + +For running it locally, the dependencies are available via either pixi or uv. + +## pixi +It is recommended to use [pixi](https://pixi.prefix.dev/latest/) to manage environments. Run ```pixi run open``` -to open landing page with all tutorial notebooks in browser or +to open landing page with all tutorial notebooks in browser or ```pixi run open [path to notebook]``` -to open a specific tutorial. \ No newline at end of file +to open a specific tutorial. + +## uv +The same dependencies are also declared in `pyproject.toml` for [uv](https://docs.astral.sh/uv/). Run + +```uv run marimo edit tutorials``` + +to open the landing page with all tutorial notebooks in browser or + +```uv run marimo edit tutorials/poincare_intro.py``` +```uv run marimo edit tutorials/simbio_intro.py``` +```uv run marimo edit tutorials/io.py``` +```uv run marimo edit tutorials/analysis.py``` + +to open a specific tutorial. Use `uv run marimo run [path to notebook]` instead to open a tutorial as a read-only app with the code hidden. diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..058957e --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,31 @@ +[project] +name = "simbio-tutorial" +version = "0.1.0" +description = "Add your description here" +readme = "README.md" +requires-python = ">=3.13" +dependencies = [ + "biomodels>=0.3.2", + "ipykernel>=7.3.0", + "ipywidgets>=8.1.9", + "jablonski>=0.3.1", + "marimo>=0.20.2", + "matplotlib>=3.11.1", + "numpy>=2.4.2", + "poincare>=1.2.0", + "pylatex>=1.4.2", + "python-libsbml>=5.21.1", + "pyzmq>=27.1.0", + "rebop>=0.10.0", + "seaborn>=0.13.2", + "simbio>=1.2.0", + "symbolite>=1.1.1", +] + +# marimo notebooks are not valid plain Python (top-level `async with app.setup()`), +# so lint them with `marimo check` instead of ruff/ty. +[tool.ruff] +extend-exclude = ["tutorials"] + +[tool.ty.src] +exclude = ["tutorials"] diff --git a/tutorials/analysis.py b/tutorials/analysis.py index 3962201..029a414 100644 --- a/tutorials/analysis.py +++ b/tutorials/analysis.py @@ -12,7 +12,7 @@ if sys.executable == "/home/pyodide/this.program": import micropip - await micropip.install( + _ = await micropip.install( ["pint_pandas<=0.7", "typing_extensions>=4.15.0", "simbio>=1.2.0", "matplotlib"], verbose = False ) diff --git a/tutorials/io.py b/tutorials/io.py index fd6d2a7..052c5a1 100644 --- a/tutorials/io.py +++ b/tutorials/io.py @@ -14,7 +14,7 @@ if sys.executable == "/home/pyodide/this.program": import micropip - await micropip.install( + _ = await micropip.install( ["pint_pandas<=0.7", "typing_extensions>=4.15.0", "simbio>=1.2.0", "matplotlib"], verbose = False ) diff --git a/tutorials/poincare_intro.py b/tutorials/poincare_intro.py index 76db81a..9b03455 100644 --- a/tutorials/poincare_intro.py +++ b/tutorials/poincare_intro.py @@ -12,7 +12,7 @@ if sys.executable == "/home/pyodide/this.program": import micropip - await micropip.install( + _ = await micropip.install( ["pint_pandas<=0.7", "typing_extensions>=4.15.0", "poincare>=1.2.0", "matplotlib"], verbose = False ) diff --git a/tutorials/simbio_intro.py b/tutorials/simbio_intro.py index 4382161..0bd3c20 100644 --- a/tutorials/simbio_intro.py +++ b/tutorials/simbio_intro.py @@ -12,7 +12,7 @@ if sys.executable == "/home/pyodide/this.program": import micropip - await micropip.install( + _ = await micropip.install( ["pint_pandas<=0.7", "typing_extensions>=4.15.0", "simbio>=1.2.0", "matplotlib"], verbose = False )