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.
41 lines
822 B
Python
41 lines
822 B
Python
"""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()
|