Skip to content

openDreamStudioResearch/openSupplyWaterAnalyse

Repository files navigation

OpenWaterAnalyse / Web-EPANET

License: MIT CI

中文 | English

中文说明

项目简介

这是一个供水仿真工具。

这是一个基于 Flask + Vue 的 EPANET Web 工作台,用于上传、查看、编辑、分析和导出 .inp 管网模型文件。

当前版本重点覆盖以下能力:

  • 稳定的文件上传、示例加载和重新分析流程
  • Browser / Map / Property / Report 多面板联动
  • 对象创建、属性编辑和结果查看入口
  • 结果快照、图表、报表和回放交互
  • 中英文界面切换
  • 无头浏览器自动回归验证

界面截图

主工作台

工作台总览

图表联动

图表联动视图

分析选项

分析选项面板

技术栈

  • 后端:Flask
  • 前端:Vue 3 + Vite
  • 结果处理:EPANET 相关解析与计算逻辑
  • 自动化验证:Playwright(headless)

本地启动

  1. 创建并激活 Python 虚拟环境
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
  1. 安装前端依赖
npm install
  1. 构建前端资源
npm run build
  1. 启动 Flask
export FLASK_APP=web_epanet.py
flask run --port 5000
  1. 打开工作台

常用验证命令

npm run build
./venv/bin/python -m py_compile app/routes.py app/lib/EPANETFunctions9.py
node scripts/validate_workbench_targeted.mjs 'http://127.0.0.1:5000/upload?demo=net1'
node scripts/validate_workbench_sample_targeted.mjs 'http://127.0.0.1:5000/upload?demo=sample'

目录说明

  • app/: Flask 应用、接口、模板和静态资源
  • frontend/: Vue 工作台源码
  • scripts/: 构建与无头验证脚本
  • original/: 原始参考材料
  • uploads/: 运行时上传文件目录(默认不纳入版本控制)

许可证

本项目采用 MIT License,详见 LICENSE

开源协作

AI 使用

  • MCP 规划文档:docs/MCP_PLAN.md
  • Repo-local skill:ai/skills/open-supply-workbench
  • Repo-local skill:ai/skills/open-supply-validation

这些 skills 当前保存在仓库内,适合与项目一起版本化。如果需要让 Codex 自动发现,可以再复制或软链接到 $CODEX_HOME/skills

说明

本仓库在原始 Web-EPANET 基础上继续演进,当前目标是向桌面版 EPANET 的手工工作流能力靠拢。

English

Overview

This is a water supply simulation tool.

This repository contains a Flask + Vue EPANET web workbench for uploading, inspecting, editing, analysing, and exporting .inp network models.

The current workbench focuses on:

  • Stable file upload, demo loading, and rerun flows
  • Tight Browser / Map / Property / Report synchronization
  • Object creation, property editing, and results entry points
  • Snapshot playback, chart, and report interactions
  • Built-in Chinese / English language switching
  • Headless browser regression coverage

Screenshots

Main Workbench

Workbench overview

Graph Synchronization

Graph synchronization view

Analysis Options

Analysis options panel

Stack

  • Backend: Flask
  • Frontend: Vue 3 + Vite
  • Simulation/report handling: EPANET-related parsing and computation logic
  • Regression tooling: Playwright in headless mode

Local Run

  1. Create and activate a Python virtual environment
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
  1. Install frontend dependencies
npm install
  1. Build frontend assets
npm run build
  1. Start Flask
export FLASK_APP=web_epanet.py
flask run --port 5000
  1. Open the workbench

Useful Validation Commands

npm run build
./venv/bin/python -m py_compile app/routes.py app/lib/EPANETFunctions9.py
node scripts/validate_workbench_targeted.mjs 'http://127.0.0.1:5000/upload?demo=net1'
node scripts/validate_workbench_sample_targeted.mjs 'http://127.0.0.1:5000/upload?demo=sample'

Repository Layout

  • app/: Flask app, routes, templates, and static assets
  • frontend/: Vue workbench source
  • scripts/: build and headless validation scripts
  • original/: original reference materials
  • uploads/: runtime upload directory (ignored by git)

License

This project is distributed under the MIT License. See LICENSE.

Open Source Collaboration

AI Usage

  • MCP plan: docs/MCP_PLAN.md
  • Repo-local skill: ai/skills/open-supply-workbench
  • Repo-local skill: ai/skills/open-supply-validation

These skills live inside the repository so they can be versioned with the tool. If auto-discovery is needed, copy or symlink them into $CODEX_HOME/skills.

Notes

The repository builds on the original Web-EPANET work and is being extended toward stronger parity with desktop EPANET manual workflows.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors