@@ -17,29 +17,39 @@ A web-based visual node editor for building and simulating dynamic systems with
1717- [ Plotly.js] ( https://plotly.com/javascript/ ) for interactive plots
1818- [ CodeMirror 6] ( https://codemirror.net/ ) for code editing
1919
20- ## Getting Started
20+ ## Installation
21+
22+ ### pip install (recommended for users)
23+
24+ ``` bash
25+ pip install pathview
26+ pathview serve
27+ ```
28+
29+ This starts the PathView server with a local Python backend and opens your browser. No Node.js required.
30+
31+ ** Options:**
32+ - ` --port PORT ` — server port (default: 5000)
33+ - ` --host HOST ` — bind address (default: 127.0.0.1)
34+ - ` --no-browser ` — don't auto-open the browser
35+ - ` --debug ` — debug mode with auto-reload
36+
37+ ### Development setup
2138
2239``` bash
2340npm install
2441npm run dev
2542```
2643
27- To use the Flask backend (server-side Python) :
44+ To use the Flask backend during development :
2845
2946``` bash
30- pip install -r server/requirements.txt
47+ pip install flask flask-cors
3148npm run server # Start Flask backend on port 5000
3249npm run dev # Start Vite dev server (separate terminal)
3350# Open http://localhost:5173/?backend=flask
3451```
3552
36- For production:
37-
38- ``` bash
39- npm run build
40- npm run preview
41- ```
42-
4353## Project Structure
4454
4555```
8292├── routes/ # SvelteKit pages
8393└── app.css # Global styles with CSS variables
8494
85- server/
95+ pathview_server/ # Python package (pip install pathview)
8696├── app.py # Flask server (subprocess management, HTTP routes)
8797├── worker.py # REPL worker subprocess (Python execution)
88- └── requirements.txt # Server Python dependencies
98+ ├── cli.py # CLI entry point (pathview serve)
99+ └── static/ # Bundled frontend (generated at build time)
89100
90101scripts/
91102├── config/ # Configuration files for extraction
@@ -467,15 +478,21 @@ Browser Tab Flask Server Worker Subprocess
467478└──────────────┘ └──────────────────┘ └──────────────────┘
468479```
469480
470- ** Setup :**
481+ ** Standalone (pip package) :**
471482
472483``` bash
473- pip install -r server/requirements.txt
474- npm run server # Starts Flask on port 5000
475- npm run dev # Starts Vite dev server (separate terminal)
484+ pip install pathview
485+ pathview serve
476486```
477487
478- Then open ` http://localhost:5173/?backend=flask ` .
488+ ** Development (separate servers):**
489+
490+ ``` bash
491+ pip install flask flask-cors
492+ npm run server # Starts Flask API on port 5000
493+ npm run dev # Starts Vite dev server (separate terminal)
494+ # Open http://localhost:5173/?backend=flask
495+ ```
479496
480497** Key properties:**
481498- ** Process isolation** — each session gets its own Python subprocess
@@ -666,7 +683,8 @@ https://view.pathsim.org/?modelgh=pathsim/pathview/static/examples/feedback-syst
666683| --------| ---------|
667684| ` npm run dev ` | Start Vite development server |
668685| ` npm run server ` | Start Flask backend server (port 5000) |
669- | ` npm run build ` | Production build |
686+ | ` npm run build ` | Production build (GitHub Pages) |
687+ | ` npm run build:package ` | Build pip package (frontend + wheel) |
670688| ` npm run preview ` | Preview production build |
671689| ` npm run check ` | TypeScript/Svelte type checking |
672690| ` npm run lint ` | Run ESLint |
@@ -783,14 +801,23 @@ Port labels show the name of each input/output port alongside the node. Toggle g
783801
784802## Deployment
785803
786- PathView uses a dual deployment strategy with automatic versioning:
804+ PathView has two deployment targets:
805+
806+ ### GitHub Pages (web)
787807
788808| Trigger | What happens | Deployed to |
789809| ---------| --------------| -------------|
790810| Push to ` main ` | Build with base path ` /dev ` | [ view.pathsim.org/dev/] ( https://view.pathsim.org/dev/ ) |
791811| Release published | Bump ` package.json ` , build, deploy | [ view.pathsim.org/] ( https://view.pathsim.org/ ) |
792812| Manual dispatch | Choose ` dev ` or ` release ` | Respective path |
793813
814+ ### PyPI (pip package)
815+
816+ | Trigger | What happens | Published to |
817+ | ---------| --------------| --------------|
818+ | Release published | Build frontend + wheel, publish | [ pypi.org/project/pathview] ( https://pypi.org/project/pathview/ ) |
819+ | Manual dispatch | Choose ` testpypi ` or ` pypi ` | Respective index |
820+
794821### How it works
795822
7968231 . Both versions deploy to the ` deployment ` branch using GitHub Actions
0 commit comments