cd /path/to/gridpack-workbench-dev
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip setuptools wheel
python -m pip install -e ".[dev,analysis]"The minimal GUI dependency is also listed in requirements.txt; optional plotting/data dependencies are listed in
requirements-analysis.txt.
source .venv/bin/activate
gridlensor:
scripts/run_app.shThe primary test runner is pytest:
python -m pytestUse the editable install from the setup section before running the full suite so GUI and optional analysis dependencies are available. Individual tests are intentionally small and independent; prefer adding a focused regression test before changing parser, analysis, runner, or GUI behavior.
The test suite also checks package metadata, console-script wiring, runtime dependency mirrors, and local README
documentation links. Keep pyproject.toml, requirements.txt, README.md, and src/gridlens/__init__.py
in sync when changing packaging or release information.
For headless machines, Qt tests set QT_QPA_PLATFORM=offscreen in the test module.
Build the product in this order:
- Confirm one known GridPACK case runs manually with Docker.
- Confirm
docker_command.pybuilds the correct command. - Confirm
gridpack_runner.pyruns that case through Python. - Confirm project folders, manifests, status files, and logs are correct.
- Use the GUI to run the same case.
- Add exact output parsers.
- Add graph data, analysis manifests, and exports.
- Package with PyInstaller.
- Wrap PyInstaller output in a
.deb. - Test on a clean DGX OS 7 account.
Keep user-sensitive behavior in core/ and runner/, not in GUI event handlers. The GUI should gather values and call
well-tested functions.
Never build Docker commands as shell strings. Build a list of arguments and run it without shell=True.
Keep modules organized around one responsibility. For example, parsed GridPACK data flows through analysis/parsers.py,
analysis/enrichment.py, analysis/metrics.py, and analysis/dataset.py before graph data or exports are written.
Add small helper modules when they make behavior reusable and testable.
Use explicit, readable Python over clever shortcuts. Public functions and non-obvious helpers should have concise docstrings that explain behavior rather than repeat the function signature.