Restructure package for domain-driven design

Reorganise package structure to improve separation of concerns:
- instruments/ - SCPI, transport, drivers, interfaces, factory
- simulation/ - physics engine, virtual instruments, server
- framework/ - test runner, logger, limits, context
- tests/ - thermal/, electrical/ (DVT test implementations)
- data/ - repository, models
- reporting/ - generator, templates
- app/ - CLI, config, dashboard

This structure enables:
- Reusable instruments package for other test suites
- Clear separation of simulation (dev) vs production code
- Domain-focused package organisation

Updated documentation to reflect new paths.
This commit is contained in:
2025-02-10 12:06:22 +00:00
parent e94c0c9e71
commit 85024f8670
29 changed files with 332 additions and 361 deletions

View File

@@ -0,0 +1,5 @@
"""Application entry points.
Contains CLI, dashboard, and configuration loading for the
py_dvt_ate application.
"""

40
src/py_dvt_ate/app/cli.py Normal file
View File

@@ -0,0 +1,40 @@
"""Command-line interface for py_dvt_ate."""
from typing import Annotated, Optional
import typer
from py_dvt_ate import __version__
app = typer.Typer(
name="py-dvt-ate",
help="Coupled Physics DVT Simulation Platform",
add_completion=False,
)
def version_callback(value: bool) -> None:
"""Print version and exit."""
if value:
typer.echo(f"py-dvt-ate version {__version__}")
raise typer.Exit()
@app.callback()
def main(
version: Annotated[
Optional[bool],
typer.Option(
"--version",
"-v",
help="Show version and exit.",
callback=version_callback,
is_eager=True,
),
] = None,
) -> None:
"""py-dvt-ate: Coupled Physics DVT Simulation Platform."""
if __name__ == "__main__":
app()

View File

@@ -0,0 +1,5 @@
"""Streamlit dashboard for real-time monitoring.
Provides visualisation of instrument status, test progress,
and historical results.
"""