Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,40 @@

All notable changes to DualSPHysics Studio are documented in this file.

## [1.0.2] - 2026-07-29

### Added

- Added conservative preflight resource estimates from `dp`, definition
bounds, `TimeMax`, and `TimeOut`, followed by GenCase particle-count
correction and measured solver-memory parsing.
- Added a run center with session history, stage status, determinate particle
frame progress, dynamic ETA, resource evidence, output access, and record
export actions.
- Added an explicitly confirmed one-click workflow that always executes
GenCase, the user-selected CPU or GPU solver, and PartVTK in order.
- Added case-local `.dss-run` records with atomic `run.json` updates, the exact
XML snapshot, stage logs, tool and configuration hashes, relative manifest
references, interrupted-run recovery, and checksum-bearing diagnostic ZIPs.
- Added “create a new run from record”; it repeats preflight into a new output
directory and never replays an old command over existing outputs.

### Changed

- Manual GenCase, CPU/GPU, and PartVTK actions now join or create the same
reproducible output session used by the one-click workflow.
- Diagnostic exports include the XML snapshot by default. Users with case
privacy requirements can explicitly exclude it in the export dialog.

### Security

- Diagnostic exports redact local absolute paths from records, manifests, and
logs while continuing to exclude credentials and arbitrary environment
variables.
- Heuristic capacity estimates never silently select a solver, overwrite an
output, or claim guaranteed capacity; hard execution failures still come
from validated inputs, trusted tools, and observed output conflicts.

## [1.0.1] - 2026-07-29

### Added
Expand Down
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# DualSPHysics Studio 1.0.1
# DualSPHysics Studio 1.0.2

面向 DualSPHysics v5.4 的 Windows XML 可视化编辑器与本地计算流程前端。

Expand All @@ -11,6 +11,8 @@ Copyright © 2026 Fang Li。项目采用 [MIT License](LICENSE) 发布。
- 加载外部 3D 文件时仅支持 `.vtk` 和 `.stl`;读取前执行文件、点和单元预算预检,大型模型需确认,超过硬上限则阻止加载。
- “算例医生”汇总并筛选 XML 结构、计算域、marker、参数生效状态和时间配置问题;双击问题可在独立详情页查看完整描述、XML 路径、行号和源码上下文,双击位置仍可直接跳转到对应源码行。
- 直接调用已有 `GenCase_win64.exe`、`DualSPHysics5.4CPU_win64.exe`、`DualSPHysics5.4_win64.exe` 和 `PartVTK_win64.exe`,依次生成初始模型、CPU/GPU 求解数据和粒子 VTK。
- “一键完整运行”在强确认后依次执行 GenCase、用户明确选择的 CPU/GPU 求解和 PartVTK;运行中心持续显示阶段状态、粒子与资源区间、进度和动态 ETA。
- 每个正式阶段都在输出目录的 `.dss-run` 中维护原子会话记录、XML 快照、脱敏日志、工具哈希和阶段清单;诊断 ZIP 默认包含 XML,也可因隐私需要显式排除。
- “拓展功能”菜单按需发现便携目录 `DLC` 中由用户单独放入的独立 EXE,只有用户点击工具后才直接启动。
- 可选 OpenAI Responses API 中文解读;离线功能不需要密钥或网络。

Expand All @@ -35,12 +37,12 @@ python -m venv .venv

若当前环境已安装 `requirements-lock.txt` 中的固定版本,可添加 `-SkipInstall`。构建脚本使用 PyInstaller `onedir`,只生成目录,不额外创建 ZIP:

- `outputs\DualSPHysics Studio-v1.0.1 (windows x64)\`
- `outputs\DualSPHysics Studio-v1.0.2 (windows x64)\`

便携目录包含中文快速说明和合并后的第三方许可证,不包含 Python `*.dist-info` 安装元数据、DualSPHysics 官方二进制或任何案例文件。其基本结构为:

```text
DualSPHysics Studio-v1.0.1 (windows x64)\
DualSPHysics Studio-v1.0.2 (windows x64)\
DualSPHysicsStudio.exe
_internal\
快速说明.md
Expand All @@ -63,6 +65,8 @@ DualSPHysics Studio-v1.0.1 (windows x64)\
- GenCase、CPU/GPU 求解器和 PartVTK 仅从已保存设置、`DUALSPHYSICS_ROOT` 或用户明确选择的目录解析。
- `DLC` 工具仅在用户点击后以原 EXE 直接启动,不经过 shell/BAT,也不自动附加参数。
- 已存在求解数据或目标 VTK 时阻止运行,不自动删除或覆盖旧结果。
- 资源估算明确区分定义域网格上限、GenCase 实测粒子数和求解器实测内存;数据不足时显示未知,不把启发式结果作为容量保证。
- 诊断导出始终脱敏本机绝对路径;XML 默认随可复现记录导出,用户可在导出时勾选排除。
- 保存前自动创建源 XML 备份。
- AI 默认关闭;启用后会在发送前展示载荷,建议不会自动应用或运行。

Expand Down
49 changes: 27 additions & 22 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,19 @@ scope. Version labels are planning buckets, not delivery-date commitments.
bridge to the GenCase quick check.
3. Completed in v1.0.1: expose an initial searchable parameter workbench for
existing scalar values while retaining XML as the only source of truth.
4. Collect reproducible bug reports from the public releases.
5. Add an opt-in diagnostic export containing version, stage logs, and
non-sensitive environment facts while excluding case content, credentials,
and personal paths by default.
6. Exercise the portable build in CI or a controlled release workflow and add
4. Completed in v1.0.2: add conservative resource estimates that distinguish
definition-domain upper bounds, GenCase particle measurements, solver
memory reports, history-calibrated duration, and unavailable data.
5. Completed in v1.0.2: add a run center and an explicitly confirmed complete
GenCase -> CPU/GPU -> PartVTK workflow while preserving direct stage actions.
6. Completed in v1.0.2: add case-local atomic run records, XML snapshots,
stage logs, tool hashes, interrupted-run recovery, and privacy-aware
diagnostic exports. XML is included by default and can be explicitly
excluded for private cases; local paths are always redacted from exports.
7. Collect reproducible bug reports from the public releases.
8. Exercise the portable build in CI or a controlled release workflow and add
Authenticode signing when a publisher certificate is available.
7. Keep Python and pinned dependencies current through reviewed, audited patch
9. Keep Python and pinned dependencies current through reviewed, audited patch
releases.

Exit evidence: reproduced issues have regression tests; the complete Windows
Expand All @@ -53,20 +59,20 @@ remain clean.
Exit evidence: every supported edit round-trips losslessly outside the intended
change and has a focused fixture-based regression test.

## v1.2 — simulation workflow
## v1.2 — run insight and recovery

1. Make GenCase, CPU/GPU solver, and PartVTK stages easier to inspect through
structured command previews, progress, duration, and result summaries.
2. Add a case-local run history that records hashes and stage outcomes without
storing private paths in the repository or release package.
3. Improve recovery guidance for interrupted, failed, or conflicting stages
while preserving the no-delete/no-overwrite rule.
4. Add explicit capability and version diagnostics for configured
DualSPHysics installations.
The base simulation workflow moved forward into v1.0.2.

Exit evidence: a generic sample case can complete the configured stage sequence
with reviewable manifests, deterministic conflict behavior, and tested failure
recovery.
1. Compare estimates and actual measurements across multiple selected runs.
2. Add richer filtering and recovery guidance for interrupted or failed
sessions while preserving the no-delete/no-overwrite rule.
3. Add explicit capability diagnostics for configured DualSPHysics
installations and solver options.
4. Validate history calibration on documented representative CPU and GPU
cases before narrowing any resource range.

Exit evidence: comparisons remain source-hash and backend aware, recovery always
creates a new safe run, and representative cases document estimate error bands.

## v1.3 — results visualization

Expand Down Expand Up @@ -100,7 +106,6 @@ without expanding their execution authority.

## Recommended next development ticket

After validating the v1.0.1 portable package, implement the opt-in,
privacy-filtered diagnostic export. It gives public bug reports a reproducible
source of truth without collecting case XML, credentials, or personal paths by
default.
After validating the v1.0.2 portable package, add run-to-run comparison using
the case-local session records. Keep comparisons source-hash and backend aware,
and do not narrow resource ranges until representative evidence supports it.
2 changes: 1 addition & 1 deletion THIRD_PARTY_NOTICES.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
THIRD-PARTY SOFTWARE NOTICES
DualSPHysics Studio 1.0.1
DualSPHysics Studio 1.0.2

Copyright (c) 2026 Fang Li. The original DualSPHysics Studio source code is
licensed under the MIT License in the separate `LICENSE` file.
Expand Down
2 changes: 1 addition & 1 deletion packaging/DualSPHysicsStudio.spec
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- mode: python ; coding: utf-8 -*-
"""PyInstaller onedir specification for DualSPHysics Studio 1.0.1.
"""PyInstaller onedir specification for DualSPHysics Studio 1.0.2.

Run this specification through ``packaging/build_portable.ps1``. The spec
deliberately packages only the Studio application and its Python runtime; it
Expand Down
4 changes: 2 additions & 2 deletions packaging/build_portable.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ $QtThirdPartyNotices = Join-Path $LicenseSource "Qt-6.11.1-THIRD-PARTY-NOTICES.t
$VtkThirdPartyNotices = Join-Path $LicenseSource "VTK-9.6.2-THIRD-PARTY-NOTICES.txt"
$RustThirdPartyNotices = Join-Path $LicenseSource "Rust-Native-THIRD-PARTY-NOTICES.txt"
$NoticesSource = Join-Path $ProjectRoot "THIRD_PARTY_NOTICES.txt"
$WorkRoot = Join-Path ([System.IO.Path]::GetTempPath()) "DualSPHysicsStudio-1.0.1-pyinstaller"
$WorkRoot = Join-Path ([System.IO.Path]::GetTempPath()) "DualSPHysicsStudio-1.0.2-pyinstaller"
$BuildRoot = Join-Path $WorkRoot "build"
$DistRoot = Join-Path $WorkRoot "dist"
$OutputsRoot = Join-Path $ProjectRoot "outputs"
$ArtifactName = "DualSPHysics Studio-v1.0.1 (windows x64)"
$ArtifactName = "DualSPHysics Studio-v1.0.2 (windows x64)"
$PyInstallerDirectoryName = "DualSPHysicsStudio"
$BuiltDirectory = Join-Path $DistRoot $PyInstallerDirectoryName
$PortableDirectory = Join-Path $OutputsRoot $ArtifactName
Expand Down
8 changes: 4 additions & 4 deletions packaging/version_info.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# UTF-8
VSVersionInfo(
ffi=FixedFileInfo(
filevers=(1, 0, 1, 0),
prodvers=(1, 0, 1, 0),
filevers=(1, 0, 2, 0),
prodvers=(1, 0, 2, 0),
mask=0x3f,
flags=0x0,
OS=0x40004,
Expand All @@ -16,12 +16,12 @@ VSVersionInfo(
u'080404b0',
[
StringStruct(u'FileDescription', u'DualSPHysics v5.4 XML visual editor and local pipeline frontend'),
StringStruct(u'FileVersion', u'1.0.1.0'),
StringStruct(u'FileVersion', u'1.0.2.0'),
StringStruct(u'InternalName', u'DualSPHysicsStudio'),
StringStruct(u'LegalCopyright', u'Copyright (c) 2026 Fang Li'),
StringStruct(u'OriginalFilename', u'DualSPHysicsStudio.exe'),
StringStruct(u'ProductName', u'DualSPHysics Studio'),
StringStruct(u'ProductVersion', u'1.0.1')
StringStruct(u'ProductVersion', u'1.0.2')
]
)
]),
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "dualsphysics-studio"
version = "1.0.1"
version = "1.0.2"
description = "DualSPHysics v5.4 XML visual editor and local pipeline frontend"
readme = "README.md"
license = "MIT"
Expand Down
17 changes: 17 additions & 0 deletions src/dualsphysics_studio/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ def _smoke_test() -> int:
DualSPHysicsGPUAdapter,
GenCaseAdapter,
PartVTKAdapter,
RunSession,
estimate_case,
)
from .resources import resource_path
from openai import OpenAI
Expand All @@ -44,6 +46,21 @@ def _smoke_test() -> int:
PartVTKAdapter()
with tempfile.TemporaryDirectory(prefix="dss-smoke-") as temporary:
temporary_path = Path(temporary)
source_path = temporary_path / "Case_Def.xml"
source_path.write_text(document.text, encoding="utf-8")
session = RunSession.create(
source_xml=source_path,
output_root=temporary_path / "Case_out",
backend="gpu",
workflow=("gencase", "gpu", "partvtk"),
)
session.add_estimate(estimate_case(document))
diagnostic_path = session.export_diagnostic(
temporary_path / "diagnostic.zip"
)
if not session.record_path.is_file() or not diagnostic_path.is_file():
raise RuntimeError("run-session smoke test failed")

stl_path = temporary_path / "triangle.stl"
stl_path.write_text(
"solid test\n"
Expand Down
Loading