Add pyproject.toml with runtime and dev dependency groups plus a uv.lock, replacing requirements.txt and pytest.ini. Update the Makefile and README to use uv (sync/run/test). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
60 lines
1.9 KiB
Markdown
60 lines
1.9 KiB
Markdown
# Pipeline Network Diagram Editor
|
|
|
|
A desktop editor for drawing **pipeline networks** — water lines, power lines, gas, etc. —
|
|
built with **PyQt6** on the Qt **QGraphicsView** framework.
|
|
|
|
## Features
|
|
|
|
- **Node library** with grouped, draggable vector (SVG) symbols (pump, tank, valve, source, sink, junction…).
|
|
- **Typed ports** with relation semantics (water / power / gas / …) and per-relation color schemes;
|
|
connection compatibility is validated and highlighted.
|
|
- **Orthogonal edge routing** along a rectangular grid, with an optional **arc at line crossings**.
|
|
- **Edge styles**: line styles plus head/tail decorations (arrow, circle, diamond, none).
|
|
- **Grouped property panel** for the selected node/edge — presentation (geometry, title, color) and
|
|
physics (length, diameter, flow rate, flow type). Property types: string, int, float, bool, enum,
|
|
color, catalogue item, catalogue items, value list.
|
|
- **Mock flow calculation** distributing flow across edges, with **animated direction and volume**.
|
|
- Editing UX: drag, multi-select, snap-to-grid, undo/redo, copy/paste, save/open (JSON),
|
|
export to PNG/SVG, configurable grid & color schemes.
|
|
|
|

|
|
|
|
## Requirements
|
|
|
|
- Python 3.11+
|
|
- PyQt6 (with QtSvg)
|
|
- [uv](https://docs.astral.sh/uv/) for dependency and virtual-env management
|
|
|
|
Install dependencies (creates a `.venv` automatically):
|
|
|
|
```bash
|
|
uv sync
|
|
```
|
|
|
|
## Run
|
|
|
|
```bash
|
|
uv run pipeline-editor
|
|
```
|
|
|
|
## Test
|
|
|
|
Tests run headless:
|
|
|
|
```bash
|
|
QT_QPA_PLATFORM=offscreen uv run pytest
|
|
```
|
|
|
|
## Layout
|
|
|
|
```
|
|
pipeline_editor/
|
|
model/ domain: properties, catalogue, relations, ports, nodes, edges, document
|
|
view/ QGraphicsView canvas, scene, node/port/edge items, routing
|
|
panels/ node library dock, property editor dock
|
|
calc/ mock flow solver + animation
|
|
resources/ SVG node symbols, color schemes
|
|
docs/plan/ actionable implementation plan
|
|
tests/ pytest suites for typical scenarios
|
|
```
|