Skip to content
Open
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
25 changes: 25 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
on:
workflow_dispatch:
push:
branches: main

name: Quarto Publish

jobs:
build-deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2

- name: Render and Publish
uses: quarto-dev/quarto-actions/publish@v2
with:
target: gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,4 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
notebooks/Medway_Creek/
84 changes: 84 additions & 0 deletions desktop_app/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# imWEBs Desktop App

This folder contains a standalone desktop UI for creating `imWEBs` model and scenario config files and running the existing Python workflow directly.

## Why this shape

The UI calls the library in-process instead of using shell commands or a local web server. That keeps packaging and error handling simple and lets the app stream Python log output directly into the window.

## What is included

- A PySide6 wizard-style desktop window with domain steps: Project Location, imWEBs Structure, Delineation and Rotation, BMP, Model Config Workflows, and Scenarios
- Background-managed config files (users only edit fields in the UI)
- Background execution for long-running model generation steps
- A thin service layer that writes config files and calls the `imWEBs` library API

## Run from source

From the repository root:

```powershell
pip install -e .
pip install -e .\desktop_app
imwebs-desktop
```

If you do not want to install the desktop app package, you can also run:

```powershell
python -m desktop_app.imwebs_desktop
```

## Packaging direction

This repository includes a Windows packaging workflow so end users do not need Python.

### Build a standalone app and installer

From the repository root:

```powershell
cd .\desktop_app
.\packaging\build_windows_installer.ps1 -AppVersion 0.1.0
```

Outputs:

- Standalone folder: `desktop_app\dist\imWEBs-Desktop\`
- Installer EXE (if Inno Setup is installed): `desktop_app\dist\installer\imwebs-desktop-<version>-setup.exe`

Notes:

- The script bundles the Python runtime and dependencies using PyInstaller.
- If Inno Setup (`iscc`) is not installed, the standalone app is still produced.
- Install Inno Setup to generate the final click-through installer.

### In-app update hosting (recommended)

Use GitHub Releases as the installer host for the `Check Update` button.

Required release asset format:

- Attach a Windows installer `.exe` to each release.
- Name should include `setup` or `installer` (for example `imwebs-desktop-0.1.1-setup.exe`).

Recommended release flow:

1. Build installer with `packaging/build_windows_installer.ps1`.
2. Create tag `vX.Y.Z` in GitHub.
3. Create GitHub Release for that tag.
4. Upload the installer EXE as a release asset.

The desktop app checks:

- `https://api.github.com/repos/hawklorry/imWEBs-Python/releases/latest`

and downloads the installer asset when a newer version is available.

## Notes

- The app writes INI files in the background using the same section and key names as the existing library.
- Running the UI follows a six-step wizard and includes model workflows plus scenario generation directly in-step.
- Advancing through the wizard saves the current step and validates the configuration before moving forward.
- Users do not need to manage config file paths directly; the app handles those paths internally.
- The current UI is intentionally direct and close to the library surface. It is meant as a solid foundation, not a finished product design.
5 changes: 5 additions & 0 deletions desktop_app/imwebs_desktop/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from .app import main

__version__ = "0.1.4"

__all__ = ["main", "__version__"]
5 changes: 5 additions & 0 deletions desktop_app/imwebs_desktop/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from imwebs_desktop.app import main


if __name__ == "__main__":
raise SystemExit(main())
Loading
Loading