Restructure into src/ layout under pygui package
Move all application source under src/pygui/ and rewire imports, build config, and QML module path to match. - Relocate backend/, serialcomm/, and the ISC QML module into src/pygui/; convert main.py into pygui/__main__.py with a main() entry point (run via `python -m pygui` or the new `isc` script) - Rewrite absolute imports: backend.* -> pygui.backend.*, serialcomm.* -> pygui.serialcomm.* (source + tests) - Move app icons (isc.ico/icns) into packaging/ - Update README and ISC.qmlproject to the new paths
This commit is contained in:
@@ -16,34 +16,42 @@ python3 -m venv .venv
|
||||
source .venv/bin/activate
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
pip install -e . # install the `pygui` package (src/ layout) in editable mode
|
||||
```
|
||||
|
||||
## Run
|
||||
|
||||
```bash
|
||||
source .venv/bin/activate
|
||||
python main.py
|
||||
python -m pygui # or run the `isc` console script
|
||||
```
|
||||
|
||||
This launches the Qt window and loads the `ISC` QML module from `ISC/Main.qml`.
|
||||
This launches the Qt window and loads the `ISC` QML module from `src/pygui/ISC/Main.qml`.
|
||||
|
||||
## Project Structure
|
||||
|
||||
- `main.py`: PySide6 bootstrap; creates the Qt app and loads QML module `ISC/Main`.
|
||||
- `ISC/Main.qml`: top-level window definition.
|
||||
- `ISC/HomePage.qml`: main UI layout (left action rail, workspace panel, footer tabs).
|
||||
- `ISC/Theme.qml`: shared theme constants and dark/light mode tokens.
|
||||
- `ISC/qmldir`: QML module registration.
|
||||
The application lives under a `src/` layout as the `pygui` package:
|
||||
|
||||
- `src/pygui/__main__.py`: PySide6 bootstrap; creates the Qt app and loads QML module `ISC/Main`. Entry point for `python -m pygui`.
|
||||
- `src/pygui/backend/`: Qt-facing models and controllers (device, settings, file browser, wafer parsing).
|
||||
- `src/pygui/serialcomm/`: serial port, device service, and data-parser layer.
|
||||
- `src/pygui/ISC/`: the `ISC` QML module (UI).
|
||||
- `Main.qml`: top-level window definition.
|
||||
- `HomePage.qml`: main UI layout (left action rail, workspace panel, footer tabs).
|
||||
- `Theme.qml`: shared theme constants and dark/light mode tokens.
|
||||
- `qmldir`: QML module registration.
|
||||
- `tests/`: pytest suite.
|
||||
- `packaging/`: PyInstaller spec (`isc.spec`) and app icons.
|
||||
|
||||
## Window Configuration
|
||||
|
||||
Window dimensions and constraints are defined in `ISC/Main.qml`:
|
||||
Window dimensions and constraints are defined in `src/pygui/ISC/Main.qml`:
|
||||
|
||||
- **Default size**: 1400 × 820 pixels
|
||||
- **Minimum size**: 1100 × 700 pixels
|
||||
- **Title bar**: "ISenseCloud"
|
||||
|
||||
To adjust the window, edit the `Window` block in `ISC/Main.qml`:
|
||||
To adjust the window, edit the `Window` block in `src/pygui/ISC/Main.qml`:
|
||||
|
||||
```qml
|
||||
Window {
|
||||
@@ -58,8 +66,8 @@ Window {
|
||||
|
||||
## Customization
|
||||
|
||||
- Toggle dark/light mode in `ISC/Theme.qml` via `isDarkMode`.
|
||||
- Update sidebar and footer labels in `ISC/HomePage.qml` through `sideActions` and `bottomTabs`.
|
||||
- Toggle dark/light mode in `src/pygui/ISC/Theme.qml` via `isDarkMode`.
|
||||
- Update sidebar and footer labels in `src/pygui/ISC/HomePage.qml` through `sideActions` and `bottomTabs`.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
|
||||
Reference in New Issue
Block a user