Commit Graph
100 Commits
Author SHA1 Message Date
kschappell adf1622fe3 Speed up integration tests with 100x time scale
CI / Lint (push) Successful in 4s
CI / Type Check (push) Successful in 18s
CI / Release (push) Has been skipped
CI / Test (push) Successful in 37s
2025-12-03 23:01:33 +00:00
kschappell 9535575dbd Update README with cleaner description and licence link 2025-12-03 18:27:35 +00:00
kschappell 2c1f37bb7f Add proprietary licence 2025-11-28 19:16:10 +00:00
kschappell 58ccc5bc6f Fix CI tests and speed up integration tests
- Speed up simulation 10x for integration tests (reduces test time from
  10+ minutes to ~2.5 minutes)
- Add small delays between TCP commands in tests for reliability
- Fix Gitea CI release job (use gitea.ref instead of github.ref)
- Revert write() error-check that was consuming query responses
2025-11-26 11:21:49 +00:00
kschappell c2310ab93d Remove confusing pause/clear chart buttons from dashboard
The physics engine runs continuously, so pausing charts was misleading -
users might think the simulation stopped when it didn't. Charts now
always update automatically.

Also fix Streamlit deprecation warnings by replacing use_container_width
with width parameter (will be removed after 2025-12-31).
2025-11-21 12:27:53 +00:00
kschappell ce310d02fc Release v0.1.0 - MVP Complete
CI / Lint (push) Successful in 4s
CI / Type Check (push) Successful in 18s
CI / Test (push) Successful in 15m48s
CI / Release (push) Failing after 2m27s
2025-11-20 18:16:57 +00:00
kschappell 7fbbf1e387 Fix Windows file locking in repository tests 2025-11-16 20:13:43 +00:00
kschappell 3961b0e696 Polish dashboard UX and update README
- Wrap simulation controls in form to prevent page reruns on change
- Fix TempCo test configs to use 2+ temperature points
- Add Installation, Quick Start, and usage examples to README
2025-11-15 13:18:38 +00:00
kschappell 4b7f2292e1 Fix dashboard: connect instruments on startup, remove broken reset, apply controls properly 2025-11-09 15:56:06 +00:00
kschappell fe568d9945 Fix: auto-start charts and remove ScriptRunContext warning from background thread 2025-11-07 22:06:56 +00:00
kschappell 824f4f587c Fix server initialization race condition with proper event signaling 2025-11-06 09:52:35 +00:00
kschappell 15db602430 Improve dashboard UX: connect instruments before tests, clarify simulation controls, show error messages 2025-11-01 19:51:41 +00:00
kschappell 51d97a15b8 Fix dashboard database initialization using temp file instead of in-memory 2025-10-27 17:34:45 +00:00
kschappell 4fe302f786 Add end-to-end integration test 2025-10-23 21:23:18 +00:00
kschappell d89d02de51 Add results viewer dashboard page 2025-10-22 13:22:56 +00:00
kschappell 98af58d25c Add test execution dashboard page 2025-10-17 11:13:32 +00:00
kschappell a30ebcab96 Update dashboard to use HAL 2025-10-14 09:39:36 +00:00
kschappell 4f6f3be7a6 Fix TempCo integration tests with thread-based async server
Redesign integration test architecture to eliminate async/sync deadlock:
- Run SimulationServer in dedicated background thread with own event loop
- Rewrite TempCo tests as fully synchronous (no @pytest.mark.asyncio)
- Add ServerThread fixture in tests/integration/conftest.py
- Fix Unicode encoding errors (replace deg, mu, +/- with ASCII)
- Optimize temperature points for faster settling (23C, 25C, 27C)

All 3 TempCo integration tests now passing in ~5 minutes total.
2025-10-12 17:59:48 +00:00
kschappell 9d16480503 Fix SCPI server response handling and add TEMP:RAMP command
- Revert server to only send responses for non-empty strings
  Per SCPI protocol: successful commands with no output send nothing
- Add TEMP:RAMP command support to thermal chamber simulator
- Fixes test_multiple_commands and test_physics_engine_integration

TCP server integration tests now passing (8/8).
TempCo integration tests still need work due to async/sync mixing.
2025-10-09 15:25:08 +00:00
kschappell 3b2c60178f WIP: Use thread pool executor for integration tests
Move synchronous test execution to thread pool executor to avoid
blocking the async event loop. This prevents deadlocks when sync
client code tries to communicate with async server in same loop.

Note: Integration tests still experiencing timeouts - needs further
investigation. Unit tests and TCP server communication are working.
2025-10-08 16:16:13 +00:00
kschappell 32e9994a2b Fix TCP server response handling and add pandas-stubs
- Always send a response (even empty) to prevent client timeouts
- Add pandas-stubs to dev dependencies for mypy type checking
- Server now sends newline-terminated response for all commands

This fixes the mypy CI failure. Integration test failures still need
investigation - likely due to event loop blocking when mixing sync/async.
2025-10-01 17:37:36 +00:00
kschappell b03eb8c89f Fix CI errors: linting, type checking, and tests
- Fix import sorting in test_instruments.py (ruff I001)
- Install pandas-stubs for mypy type checking
- Add garbage collection cleanup to repository test fixtures
- Prevent Windows file locking errors in tempfile cleanup

All CI checks now passing: lint, type check, and all 244 tests.
2025-09-29 18:02:39 +00:00
kschappell 762dd75cdc Add instrument CLI commands 2025-09-26 17:56:36 +00:00
kschappell 6520a02ef6 Add test execution CLI commands 2025-09-22 13:32:05 +00:00
kschappell 0676d4bdbd Release v0.1.0-beta.2
CI / Lint (push) Failing after 4s
CI / Type Check (push) Successful in 18s
CI / Test (push) Failing after 21s
CI / Release (push) Has been skipped
2025-09-22 11:04:43 +00:00
kschappell 968814e709 Add TempCo integration tests 2025-09-16 11:20:03 +00:00
kschappell 01c2d89c1b Implement TempCo characterisation test 2025-09-15 18:32:58 +00:00
kschappell 8516101514 Add DVT test base class 2025-09-10 16:03:37 +00:00
kschappell 4e90861849 Implement test runner 2025-09-09 19:31:09 +00:00
kschappell 23aec13bc6 Implement limit checker 2025-09-05 15:44:46 +00:00
kschappell 0816ba0122 Implement test logger 2025-08-31 17:24:16 +00:00
kschappell fa06dcc864 Add test framework models 2025-08-28 21:57:03 +00:00
kschappell d4bfd3157b Add data persistence tests 2025-08-25 14:31:30 +00:00
kschappell 614c6cf3a3 Add Parquet measurement storage 2025-08-20 23:59:48 +00:00
kschappell 8509f4200e Implement SQLite repository 2025-08-17 20:54:35 +00:00
kschappell 194b10a54c Add data persistence models 2025-08-17 11:34:53 +00:00
kschappell 83c68d2025 Add configuration tests 2025-08-14 15:59:04 +00:00
kschappell 0a25ec2129 Add default configuration file 2025-08-11 13:11:17 +00:00
kschappell 21529e6a99 Implement configuration loader 2025-08-05 15:12:34 +00:00
kschappell b5fc47cfd4 Add configuration Pydantic models 2025-08-01 17:46:03 +00:00
kschappell 38d77bbfc0 Release v0.1.0-beta.1
CI / Lint (push) Failing after 3s
CI / Type Check (push) Successful in 19s
CI / Test (push) Successful in 11s
CI / Release (push) Has been skipped
2025-08-01 11:46:21 +00:00
kschappell 990a910ecb Add instrument interface tests 2025-07-26 20:12:06 +00:00
kschappell 03e364e071 Add instrument factory 2025-07-26 19:22:27 +00:00
kschappell fe2271d551 Implement instrument interfaces in drivers 2025-07-24 18:15:50 +00:00
kschappell 74cac2c1d7 Add instrument interface protocols 2025-07-19 14:08:46 +00:00
kschappell 06223d0b96 Fix linting: use builtin OSError and TimeoutError instead of socket aliases 2025-07-15 11:15:17 +00:00
kschappell eac1be845f Add driver unit tests 2025-07-10 15:57:02 +00:00
kschappell b4c21fa54d Add PSU and DMM drivers 2025-07-08 09:45:40 +00:00
kschappell 8c10979581 Add thermal chamber driver 2025-07-04 18:14:37 +00:00
kschappell d64d8bd4fb Add driver base class 2025-06-30 15:04:21 +00:00
kschappell 8fc8c3e660 Refactor DUTModel from Protocol to ABC for explicit interface implementation 2025-06-29 17:33:28 +00:00
kschappell 822e74c1aa Refactor Transport from Protocol to ABC for explicit interface implementation 2025-06-25 19:25:42 +00:00
kschappell fcb4f68a53 Update specification to mandate ABC over Protocol for maximum type safety 2025-06-24 23:59:34 +00:00
kschappell ec164596a8 Add transport layer tests 2025-06-19 15:55:38 +00:00
kschappell edaa6a68ff Implement TCP transport 2025-06-16 13:30:35 +00:00
kschappell c111d9b6e4 Add transport protocol definition 2025-06-14 20:48:34 +00:00
kschappell c8838cf567 Fix linting and type errors for CI
- Use X | None syntax instead of Optional[X] (UP045)
- Sort imports in dashboard app (I001)
- Remove unnecessary UTF-8 encoding argument (UP012)
- Add 'from err' to exception re-raises (B904)
- Remove unused imports in integration tests (F401)
- Fix useless expression in test (B018)
- Cast **1.5 result to float in LDO model (mypy no-any-return)
- Use functools.partial instead of lambda in server (mypy misc)
2025-06-12 22:05:46 +00:00
kschappell 262caf416e Move InstrumentServer to instruments/transport
InstrumentServer is a general-purpose SCPI-over-TCP server that can
host any device implementing the SCPIDevice protocol (process method).
Moving it from simulation/ to instruments/transport/ reflects this:
- simulation package now depends on instruments package
- InstrumentServer can host both virtual and real instrument adapters
- Added SCPIDevice Protocol for type-safe device registration
2025-06-07 15:15:56 +00:00
kschappell b9649128ec Release v0.1.0-alpha.3
CI / Lint (push) Failing after 3s
CI / Type Check (push) Failing after 17s
CI / Test (push) Successful in 9s
CI / Release (push) Has been skipped
2025-06-02 22:56:53 +00:00
kschappell 2fc76c9691 Add TCP server integration tests
Test connection handling, multiple clients, instrument access across
all three virtual instruments, physics engine integration, and error
handling. Update pytest-asyncio config for v1.x compatibility.
2025-05-30 22:59:33 +00:00
kschappell 95b1550b6c Add simulation server entry point
Create SimulationServer that wires physics engine to all virtual
instruments and exposes them over TCP. Add 'serve' CLI command to
start the server with configurable ports and physics rate.
2025-05-30 19:31:01 +00:00
kschappell f46b443bd1 Implement TCP client handling
Add async client connection handling with:
- Multiple concurrent connections per port
- Line-based SCPI protocol (newline terminated)
- start(), stop(), and serve_forever() methods
- Proper connection lifecycle and error handling
2025-05-24 13:48:10 +00:00
kschappell 1dc979a9cf Add async TCP server foundation
Create InstrumentServer class with asyncio for hosting virtual SCPI
instruments over TCP. Supports registering instruments on specific
ports with port-to-instrument mapping.
2025-05-22 21:32:38 +00:00
kschappell be2396a8f0 Add multimeter simulator tests
Comprehensive test coverage for MultimeterSim including MEAS:VOLT:DC,
MEAS:CURR:DC, CONF, and READ commands. Tests both standalone operation
and physics engine integration including temperature-dependent measurements.
2025-05-21 22:55:40 +00:00
kschappell b3c8f24775 Add multimeter simulator
Implement SCPI-based virtual DMM with DC voltage and current measurement.
Supports MEAS, CONF, and READ commands. Integrates with physics engine
for DUT output measurements.
2025-05-16 23:48:11 +00:00
kschappell 758bb3ceef Add power supply simulator tests
Comprehensive test coverage for PowerSupplySim including VOLT, CURR,
OUTP, and MEAS commands. Tests both standalone operation and physics
engine integration.
2025-05-12 17:29:00 +00:00
kschappell d79646c28f Add power supply simulator
Implement SCPI-based virtual power supply with voltage/current control
and output enable commands. Integrates with physics engine for DUT
input voltage simulation.
2025-05-09 20:21:07 +00:00
kschappell a5888009be Add thermal chamber simulator tests
Tests for ThermalChamberSim SCPI command responses:
- Basic IEEE 488.2 commands (*IDN?, *RST, *OPC?)
- TEMP:SETPOINT set/query
- TEMP:ACTUAL? query
- TEMP:STAB? stability query
- Physics engine integration tests
2025-05-05 21:00:43 +00:00
kschappell 031eb33277 Implement thermal chamber SCPI commands
- TEMP:SETPOINT: Set/query target temperature
- TEMP:ACTUAL?: Query actual chamber temperature from physics engine
- TEMP:STAB?: Query temperature stability (within 0.5°C threshold)
2025-05-04 19:34:48 +00:00
kschappell 539b7307df Add thermal chamber simulator stub
Defines ThermalChamberSim class with stub SCPI command handlers for
TEMP:SETPOINT, TEMP:ACTUAL?, and TEMP:STAB? commands.
2025-05-02 23:33:16 +00:00
kschappell 7e1817430b Add base instrument class
Provides SCPI command parsing and dispatch mechanism for virtual
instruments. Includes IEEE 488.2 common commands (*IDN?, *RST, *CLS,
*OPC) and abstract methods for instrument-specific implementations.
2025-04-28 19:24:24 +00:00
kschappell 03cb4b8ba5 Add SCPI parser tests
Comprehensive test suite for SCPI command parsing:
- SCPICommand dataclass tests (creation, keyword property)
- Parser tests for queries, commands, arguments
- IEEE 488.2 common command tests (*IDN?, *RST, etc.)
- Edge cases (whitespace, empty strings)
- Instrument-specific command tests

Also fixed bug where is_query was determined from command string
ending rather than header ending (handles queries with arguments).
2025-04-21 13:10:50 +00:00
kschappell 97541e76dd Implement SCPI parser
Adds SCPIParser class with parse() method that handles:
- IEEE 488.2 common commands (*IDN?, *RST, etc.)
- Query commands (ending with '?')
- Commands with comma-separated arguments
- Whitespace stripping
2025-04-21 12:03:55 +00:00
kschappell b309645f60 Add SCPI command dataclass
Defines SCPICommand dataclass for parsed SCPI commands with:
- header: command header (e.g., "TEMP:SETPOINT")
- arguments: list of command arguments
- is_query: whether command is a query
- keyword property: header without trailing '?'
2025-04-16 23:08:32 +00:00
kschappell 9e9c8b55f5 Remove fragment from sidebar controls (not supported)
Sidebar controls cannot be in a fragment. Brief blank on
slider change is a Streamlit limitation.
2025-04-15 21:25:23 +00:00
kschappell 9a3fed1da0 Put sidebar controls in fragment to prevent page blanking
Both controls and display are now fragments, so slider
changes don't trigger full page reruns.
2025-04-13 18:47:37 +00:00
kschappell 3f47d8a5e4 Use st.fragment for smooth dashboard updates
Replace st.rerun() with @st.fragment decorator to prevent
full page reloads and eliminate UI greying out.
2025-04-08 13:08:15 +00:00
kschappell ffa51dcc81 Fix dashboard simulation speed with time multiplier
- Add time multiplier control (1× to 100× speed)
- Calculate steps based on real elapsed time
- Add 50ms delay to prevent UI thrashing
- Display current speed in Sim Time metric
2025-04-05 17:58:41 +00:00
kschappell b1408f8fe4 Release v0.1.0-alpha.2
CI / Lint (push) Failing after 3s
CI / Type Check (push) Failing after 16s
CI / Test (push) Successful in 7s
CI / Release (push) Has been skipped
2025-04-03 21:20:13 +00:00
kschappell bcc8bf6b23 Add self-heating visualisation 2025-03-29 17:04:13 +00:00
kschappell a88fdd1cea Add interactive physics controls 2025-03-24 15:02:51 +00:00
kschappell 79eabd35ce Add physics visualisation panel 2025-03-24 14:20:53 +00:00
kschappell 3378820293 Add Streamlit dashboard skeleton 2025-03-18 14:24:17 +00:00
kschappell d130963ce2 Release v0.1.0-alpha.1
CI / Lint (push) Failing after 4s
CI / Type Check (push) Failing after 7s
CI / Test (push) Successful in 7s
CI / Release (push) Has been skipped
Physics engine working milestone:
- Thermal-electrical coupling simulation
- LDO DUT model with temperature dependence
- Comprehensive test suite
2025-03-14 19:10:34 +00:00
kschappell bdd7cae0da Add physics engine tests
Integration tests for thermal-electrical coupling:
- Thermal settling (chamber, case, junction)
- Self-heating effects with power dissipation
- Temperature-dependent electrical behaviour
- Complete thermal-electrical feedback loop
2025-03-13 16:42:17 +00:00
kschappell ea5070132d Implement physics engine stepping
Full implementation of step() method with thermal-electrical coupling:
- Chamber temperature first-order response to setpoint
- Case temperature with self-heating via thermal calculations
- Junction temperature from θ_jc thermal resistance
- Electrical state from temperature-dependent DUT model
- Default LDO model when none provided
2025-03-11 19:23:10 +00:00
kschappell 762d7181e3 Implement LDO DUT model
Temperature-dependent LDO voltage regulator model with:
- Output voltage tempco (ppm/°C)
- Quiescent current tempco
- Dropout voltage temperature dependence
- Power dissipation calculation (Vin-Vout)*Iload + Vin*Iq
- Dropout detection

Implements DUTModel protocol for physics engine integration.
2025-03-06 21:24:17 +00:00
kschappell f45f5a2a19 Implement thermal calculation functions
Pure functions for first-order thermal response calculations:
- Temperature derivative and update using Euler integration
- Case temperature with self-heating via θ_ca
- Junction temperature calculation via θ_jc
- Steady-state junction temperature helper
2025-03-02 20:05:54 +00:00
kschappell 1ffb47bacd Add physics model unit tests
Test dataclass creation, immutability, equality, and hashability for
ThermalState and ElectricalState. Also test PhysicsEngine stub methods.
2025-02-27 21:23:36 +00:00
kschappell 1f72290744 Rename models.py to state.py to avoid conflict with models/ directory
The models.py file conflicts with the models/ subdirectory when
importing. Renamed to state.py for clarity.
2025-02-27 19:02:42 +00:00
kschappell 54ea9c0a56 Add physics engine stub
Define PhysicsEngine class with stub methods for thermal-electrical
simulation. Methods return placeholder values; full implementation
will be added in Sprint 3.
2025-02-20 18:59:24 +00:00
kschappell 7937dbf079 Add DUT model protocol
Define the DUTModel Protocol interface that all device models must
implement to integrate with the physics engine.
2025-02-20 18:53:40 +00:00
kschappell 842ff09431 Add physics state dataclasses
Define frozen dataclasses for ThermalState and ElectricalState to
represent immutable simulation state snapshots.
2025-02-15 19:51:02 +00:00
kschappell ed2515bca7 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.
2025-02-10 12:06:22 +00:00
kschappell 154352e92f Release v0.0.1
CI / Lint (push) Failing after 3s
CI / Type Check (push) Successful in 7s
CI / Test (push) Failing after 6s
CI / Release (push) Has been skipped
2025-02-08 14:48:21 +00:00
kschappell 5cb8794db8 Add CLI entry point with version command 2025-02-05 19:21:17 +00:00
kschappell 66ea201f07 Configure development tooling (ruff, mypy, pytest) 2025-02-03 20:00:48 +00:00
kschappell 8eb2bbc7d5 Add package directory structure 2025-02-01 17:28:37 +00:00
kschappell 80ad6db5e8 Add pyproject.toml with core dependencies 2025-01-29 10:12:45 +00:00
kschappell 54c87c5ee7 Add versioning strategy and CI/CD pipeline
- Add semantic versioning section to development plan
- Map sprint milestones to version tags
- Create Gitea Actions CI workflow (lint, typecheck, test, release)
- Add CHANGELOG.md following Keep a Changelog format
2025-01-23 12:27:02 +00:00