Commit Graph

86 Commits

Author SHA1 Message Date
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
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
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
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
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
762dd75cdc Add instrument CLI commands 2025-09-26 17:56:36 +00:00
6520a02ef6 Add test execution CLI commands 2025-09-22 13:32:05 +00:00
0676d4bdbd Release v0.1.0-beta.2
Some checks failed
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
968814e709 Add TempCo integration tests 2025-09-16 11:20:03 +00:00
01c2d89c1b Implement TempCo characterisation test 2025-09-15 18:32:58 +00:00
8516101514 Add DVT test base class 2025-09-10 16:03:37 +00:00
4e90861849 Implement test runner 2025-09-09 19:31:09 +00:00
23aec13bc6 Implement limit checker 2025-09-05 15:44:46 +00:00
0816ba0122 Implement test logger 2025-08-31 17:24:16 +00:00
fa06dcc864 Add test framework models 2025-08-28 21:57:03 +00:00
d4bfd3157b Add data persistence tests 2025-08-25 14:31:30 +00:00
614c6cf3a3 Add Parquet measurement storage 2025-08-20 23:59:48 +00:00
8509f4200e Implement SQLite repository 2025-08-17 20:54:35 +00:00
194b10a54c Add data persistence models 2025-08-17 11:34:53 +00:00
83c68d2025 Add configuration tests 2025-08-14 15:59:04 +00:00
0a25ec2129 Add default configuration file 2025-08-11 13:11:17 +00:00
21529e6a99 Implement configuration loader 2025-08-05 15:12:34 +00:00
b5fc47cfd4 Add configuration Pydantic models 2025-08-01 17:46:03 +00:00
38d77bbfc0 Release v0.1.0-beta.1
Some checks failed
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
990a910ecb Add instrument interface tests 2025-07-26 20:12:06 +00:00
03e364e071 Add instrument factory 2025-07-26 19:22:27 +00:00
fe2271d551 Implement instrument interfaces in drivers 2025-07-24 18:15:50 +00:00
74cac2c1d7 Add instrument interface protocols 2025-07-19 14:08:46 +00:00
06223d0b96 Fix linting: use builtin OSError and TimeoutError instead of socket aliases 2025-07-15 11:15:17 +00:00
eac1be845f Add driver unit tests 2025-07-10 15:57:02 +00:00
b4c21fa54d Add PSU and DMM drivers 2025-07-08 09:45:40 +00:00
8c10979581 Add thermal chamber driver 2025-07-04 18:14:37 +00:00
d64d8bd4fb Add driver base class 2025-06-30 15:04:21 +00:00
8fc8c3e660 Refactor DUTModel from Protocol to ABC for explicit interface implementation 2025-06-29 17:33:28 +00:00
822e74c1aa Refactor Transport from Protocol to ABC for explicit interface implementation 2025-06-25 19:25:42 +00:00
fcb4f68a53 Update specification to mandate ABC over Protocol for maximum type safety 2025-06-24 23:59:34 +00:00
ec164596a8 Add transport layer tests 2025-06-19 15:55:38 +00:00
edaa6a68ff Implement TCP transport 2025-06-16 13:30:35 +00:00
c111d9b6e4 Add transport protocol definition 2025-06-14 20:48:34 +00:00
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
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
b9649128ec Release v0.1.0-alpha.3
Some checks failed
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
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
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
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
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
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
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
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
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