@@ -42,7 +42,42 @@ repo, removes the template banner from `README.md`, and finally deletes
4242 PathSim core example; replace it with notebooks that demonstrate your
4343 blocks. Every ` *.ipynb ` here is executed and rendered by the docs build.
4444
45- ## 4. Register with the docs build
45+ ## 4. Stay compatible with the web runtime
46+
47+ PathView ships a browser build that runs Python through Pyodide. Pure-Python
48+ toolboxes load there out of the box, but dependencies that ship native code
49+ (` pybamm ` , ` jsbsim ` , ` casadi ` , anything that needs a compiled wheel) fail to
50+ install in the browser.
51+
52+ Default ` pip install pathsim-<name> ` on Linux/macOS/Windows should still
53+ install everything — no extras required. To get there:
54+
55+ 1 . ** Mark heavy dependencies in ` pyproject.toml ` ** with a PEP 508 environment
56+ marker so micropip (Pyodide) silently skips them:
57+
58+ ``` toml
59+ dependencies = [
60+ " pathsim>=0.22" ,
61+ " numpy>=1.15" ,
62+ " pybamm>=25.12; sys_platform != 'emscripten'" ,
63+ ]
64+ ```
65+
66+ 2 . ** Guard the re-export in ` src/pathsim_<name>/__init__.py ` ** so the rest of
67+ the toolbox stays importable when the heavy dep is missing:
68+
69+ ``` python
70+ try :
71+ from .cells import CellElectrical
72+ __all__ += [" CellElectrical" ]
73+ except ImportError :
74+ pass
75+ ```
76+
77+ In PathView's web Toolbox Manager, introspection then finds only the blocks
78+ whose submodules imported successfully; the desktop install sees everything.
79+
80+ ## 5. Register with the docs build
4681
4782The documentation site (` docs.pathsim.org ` ) is built by the
4883[ ` pathsim/docs ` ] ( https://github.com/pathsim/docs ) repository. It clones every
@@ -70,7 +105,7 @@ The repo-side docs contract is just: an importable package under `src/` and
70105` *.ipynb ` files under ` docs/source/examples/ ` . No Sphinx — the docs build owns
71106all rendering.
72107
73- ## 5 . Releasing
108+ ## 6 . Releasing
74109
75110` .github/workflows/publish.yml ` publishes to PyPI via trusted publishing when
76111a GitHub Release is published. Versions come from git tags via ` setuptools-scm ` ,
0 commit comments