embeddedci-openhtf 2.2.0__tar.gz → 2.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. {embeddedci_openhtf-2.2.0 → embeddedci_openhtf-2.3.0}/CHANGELOG.md +7 -0
  2. {embeddedci_openhtf-2.2.0 → embeddedci_openhtf-2.3.0}/PKG-INFO +9 -7
  3. {embeddedci_openhtf-2.2.0 → embeddedci_openhtf-2.3.0}/README.md +7 -5
  4. {embeddedci_openhtf-2.2.0 → embeddedci_openhtf-2.3.0}/pyproject.toml +2 -2
  5. embeddedci_openhtf-2.3.0/tests/conftest.py +25 -0
  6. embeddedci_openhtf-2.2.0/tests/conftest.py +0 -11
  7. {embeddedci_openhtf-2.2.0 → embeddedci_openhtf-2.3.0}/.gitignore +0 -0
  8. {embeddedci_openhtf-2.2.0 → embeddedci_openhtf-2.3.0}/LICENSE +0 -0
  9. {embeddedci_openhtf-2.2.0 → embeddedci_openhtf-2.3.0}/examples/analog_loopback.py +0 -0
  10. {embeddedci_openhtf-2.2.0 → embeddedci_openhtf-2.3.0}/examples/flash_and_boot.py +0 -0
  11. {embeddedci_openhtf-2.2.0 → embeddedci_openhtf-2.3.0}/examples/serial_smoke.py +0 -0
  12. {embeddedci_openhtf-2.2.0 → embeddedci_openhtf-2.3.0}/examples/station.py +0 -0
  13. {embeddedci_openhtf-2.2.0 → embeddedci_openhtf-2.3.0}/src/embeddedci_openhtf/__init__.py +0 -0
  14. {embeddedci_openhtf-2.2.0 → embeddedci_openhtf-2.3.0}/src/embeddedci_openhtf/analog.py +0 -0
  15. {embeddedci_openhtf-2.2.0 → embeddedci_openhtf-2.3.0}/src/embeddedci_openhtf/measurements.py +0 -0
  16. {embeddedci_openhtf-2.2.0 → embeddedci_openhtf-2.3.0}/src/embeddedci_openhtf/phases.py +0 -0
  17. {embeddedci_openhtf-2.2.0 → embeddedci_openhtf-2.3.0}/src/embeddedci_openhtf/pins.py +0 -0
  18. {embeddedci_openhtf-2.2.0 → embeddedci_openhtf-2.3.0}/src/embeddedci_openhtf/plug.py +0 -0
  19. {embeddedci_openhtf-2.2.0 → embeddedci_openhtf-2.3.0}/src/embeddedci_openhtf/power.py +0 -0
  20. {embeddedci_openhtf-2.2.0 → embeddedci_openhtf-2.3.0}/tests/_fake.py +0 -0
  21. {embeddedci_openhtf-2.2.0 → embeddedci_openhtf-2.3.0}/tests/test_analog.py +0 -0
  22. {embeddedci_openhtf-2.2.0 → embeddedci_openhtf-2.3.0}/tests/test_docs_coverage.py +0 -0
  23. {embeddedci_openhtf-2.2.0 → embeddedci_openhtf-2.3.0}/tests/test_e2e_openhtf.py +0 -0
  24. {embeddedci_openhtf-2.2.0 → embeddedci_openhtf-2.3.0}/tests/test_measurements.py +0 -0
  25. {embeddedci_openhtf-2.2.0 → embeddedci_openhtf-2.3.0}/tests/test_persistent.py +0 -0
  26. {embeddedci_openhtf-2.2.0 → embeddedci_openhtf-2.3.0}/tests/test_phases.py +0 -0
  27. {embeddedci_openhtf-2.2.0 → embeddedci_openhtf-2.3.0}/tests/test_pins.py +0 -0
  28. {embeddedci_openhtf-2.2.0 → embeddedci_openhtf-2.3.0}/tests/test_plug.py +0 -0
  29. {embeddedci_openhtf-2.2.0 → embeddedci_openhtf-2.3.0}/tests/test_power.py +0 -0
@@ -1,5 +1,12 @@
1
1
  # Changelog — `embeddedci-openhtf`
2
2
 
3
+ ## 2.3.0
4
+
5
+ - Needs `embeddedci` 2.12.0 or later (was 2.4), the SDK whose `usb` connection reaches the USB
6
+ network adapter these docs describe.
7
+ - Docs: connection `usb` reaches the pod's USB network adapter (full API) on firmware 3.9.0 and
8
+ later, through the `embeddedci` SDK of the same release; a serial device path stays the console.
9
+
3
10
  ## 2.2.0
4
11
 
5
12
  - Persistent plugs (`benchpod_plug(..., persistent=True)`) are pooled by their connection
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: embeddedci-openhtf
3
- Version: 2.2.0
3
+ Version: 2.3.0
4
4
  Summary: OpenHTF plug for driving an EmbeddedCI BenchPod directly over TCP or serial (no cloud)
5
5
  Project-URL: Homepage, https://embeddedci.com
6
6
  Project-URL: Repository, https://github.com/embeddedci-com/embeddedci-python
@@ -18,7 +18,7 @@ Classifier: Programming Language :: Python :: 3.12
18
18
  Classifier: Programming Language :: Python :: 3.13
19
19
  Classifier: Topic :: Software Development :: Testing
20
20
  Requires-Python: >=3.10
21
- Requires-Dist: embeddedci<3,>=2.4
21
+ Requires-Dist: embeddedci<3,>=2.12.0
22
22
  Requires-Dist: openhtf>=1.6
23
23
  Provides-Extra: dev
24
24
  Requires-Dist: pytest>=7.0; extra == 'dev'
@@ -79,7 +79,8 @@ Connection forms (all **direct**, never cloud):
79
79
  | Form | Example |
80
80
  | --- | --- |
81
81
  | TCP `host[:port]` | `benchpod_plug("192.168.1.50:8080")` |
82
- | Serial device path | `benchpod_plug("/dev/ttyACM0")` / `benchpod_plug("COM5")` |
82
+ | USB, auto-detected | `benchpod_plug("usb")` (the pod's USB network adapter on firmware 3.9.0+, else its console) |
83
+ | Serial device path | `benchpod_plug("/dev/ttyACM0")` / `benchpod_plug("COM5")` (the console only) |
83
84
  | `BENCHPOD_CONNECTION` env | `benchpod_plug()` (unbound) |
84
85
  | OpenHTF config | `htf.conf.load(benchpod_connection="...")` then `@htf.plug(bench=BenchPodPlug)` |
85
86
 
@@ -120,7 +121,7 @@ unset for analog-only tests that don't touch the LA bank.
120
121
 
121
122
  | Key | Default | Meaning |
122
123
  | --- | --- | --- |
123
- | `benchpod_connection` | `None` → `BENCHPOD_CONNECTION` | `host[:port]`, a serial device path, or `serial` |
124
+ | `benchpod_connection` | `None` → `BENCHPOD_CONNECTION` | `host[:port]`, a serial device path, `usb`, or `serial` |
124
125
  | `benchpod_timeout` | `30.0` | Transport timeout in seconds |
125
126
  | `benchpod_la_voltage` | `None` → `BENCHPOD_LA_VOLTAGE` | LA I/O-bank voltage in volts (`1.8` or `3.3`) |
126
127
 
@@ -262,9 +263,10 @@ Notes:
262
263
  `current_out_phase` switches them off, and a voltage waveform also moves the loop.
263
264
  `signal_generate_phase` and `dac_replay_phase` take `dac_path="current_out"` for a waveform in
264
265
  amps. Needs firmware 3.4.0.
265
- - Use a TCP connection. The STM32 pod's USB serial console is a text shell without a JSON
266
- mode, so over serial only `power_phase`, status and the LA voltage work; flashing, UART,
267
- analog and replay phases need TCP (or the cloud).
266
+ - Use a TCP connection, or `usb` on firmware 3.9.0 and later (it reaches the pod's USB network
267
+ adapter, which carries the full API, unless Wi-Fi is configured on the pod). The STM32 pod's
268
+ USB serial console is a text shell without a JSON mode, so over the console only `power_phase`,
269
+ status and the LA voltage work; flashing, UART, analog and replay phases need TCP (or the cloud).
268
270
 
269
271
  The low-level helpers take a connected `BenchPod` or the injected plug:
270
272
  `signal_generate`, `signal_stop`, `analog_path`, `dac_output`, `current_out`, `adc_read`,
@@ -53,7 +53,8 @@ Connection forms (all **direct**, never cloud):
53
53
  | Form | Example |
54
54
  | --- | --- |
55
55
  | TCP `host[:port]` | `benchpod_plug("192.168.1.50:8080")` |
56
- | Serial device path | `benchpod_plug("/dev/ttyACM0")` / `benchpod_plug("COM5")` |
56
+ | USB, auto-detected | `benchpod_plug("usb")` (the pod's USB network adapter on firmware 3.9.0+, else its console) |
57
+ | Serial device path | `benchpod_plug("/dev/ttyACM0")` / `benchpod_plug("COM5")` (the console only) |
57
58
  | `BENCHPOD_CONNECTION` env | `benchpod_plug()` (unbound) |
58
59
  | OpenHTF config | `htf.conf.load(benchpod_connection="...")` then `@htf.plug(bench=BenchPodPlug)` |
59
60
 
@@ -94,7 +95,7 @@ unset for analog-only tests that don't touch the LA bank.
94
95
 
95
96
  | Key | Default | Meaning |
96
97
  | --- | --- | --- |
97
- | `benchpod_connection` | `None` → `BENCHPOD_CONNECTION` | `host[:port]`, a serial device path, or `serial` |
98
+ | `benchpod_connection` | `None` → `BENCHPOD_CONNECTION` | `host[:port]`, a serial device path, `usb`, or `serial` |
98
99
  | `benchpod_timeout` | `30.0` | Transport timeout in seconds |
99
100
  | `benchpod_la_voltage` | `None` → `BENCHPOD_LA_VOLTAGE` | LA I/O-bank voltage in volts (`1.8` or `3.3`) |
100
101
 
@@ -236,9 +237,10 @@ Notes:
236
237
  `current_out_phase` switches them off, and a voltage waveform also moves the loop.
237
238
  `signal_generate_phase` and `dac_replay_phase` take `dac_path="current_out"` for a waveform in
238
239
  amps. Needs firmware 3.4.0.
239
- - Use a TCP connection. The STM32 pod's USB serial console is a text shell without a JSON
240
- mode, so over serial only `power_phase`, status and the LA voltage work; flashing, UART,
241
- analog and replay phases need TCP (or the cloud).
240
+ - Use a TCP connection, or `usb` on firmware 3.9.0 and later (it reaches the pod's USB network
241
+ adapter, which carries the full API, unless Wi-Fi is configured on the pod). The STM32 pod's
242
+ USB serial console is a text shell without a JSON mode, so over the console only `power_phase`,
243
+ status and the LA voltage work; flashing, UART, analog and replay phases need TCP (or the cloud).
242
244
 
243
245
  The low-level helpers take a connected `BenchPod` or the injected plug:
244
246
  `signal_generate`, `signal_stop`, `analog_path`, `dac_output`, `current_out`, `adc_read`,
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "embeddedci-openhtf"
7
- version = "2.2.0"
7
+ version = "2.3.0"
8
8
  description = "OpenHTF plug for driving an EmbeddedCI BenchPod directly over TCP or serial (no cloud)"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -23,7 +23,7 @@ classifiers = [
23
23
  "Topic :: Software Development :: Testing",
24
24
  ]
25
25
  dependencies = [
26
- "embeddedci>=2.4,<3",
26
+ "embeddedci>=2.12.0,<3",
27
27
  "openhtf>=1.6",
28
28
  ]
29
29
 
@@ -0,0 +1,25 @@
1
+ """Make the package importable when running the tests from a source checkout
2
+ without an editable install.
3
+
4
+ Set EMBEDDEDCI_TEST_INSTALLED=1 to test the installed package instead (e.g. a built wheel)."""
5
+
6
+ import os
7
+ import sys
8
+
9
+ import pytest
10
+
11
+ _SRC = os.path.join(os.path.dirname(os.path.dirname(__file__)), "src")
12
+ if os.environ.get("EMBEDDEDCI_TEST_INSTALLED") != "1" and _SRC not in sys.path:
13
+ sys.path.insert(0, _SRC)
14
+
15
+
16
+ @pytest.fixture(autouse=True)
17
+ def _isolated_benchpod_cli_config(request, tmp_path_factory, monkeypatch):
18
+ """Unit tests never see this machine's benchpod-cli config (its saved connection) or its
19
+ `benchpod login` session: both change what BenchPod() connects to and where its wiring comes
20
+ from. Hardware tests (e2e, examples) keep them."""
21
+ path = str(request.node.fspath)
22
+ if "e2e" in os.path.basename(path) or os.sep + "e2e" + os.sep in path \
23
+ or os.sep + "examples" + os.sep in path:
24
+ return
25
+ monkeypatch.setenv("XDG_CONFIG_HOME", str(tmp_path_factory.mktemp("xdg")))
@@ -1,11 +0,0 @@
1
- """Make the package importable when running the tests from a source checkout
2
- without an editable install.
3
-
4
- Set EMBEDDEDCI_TEST_INSTALLED=1 to test the installed package instead (e.g. a built wheel)."""
5
-
6
- import os
7
- import sys
8
-
9
- _SRC = os.path.join(os.path.dirname(os.path.dirname(__file__)), "src")
10
- if os.environ.get("EMBEDDEDCI_TEST_INSTALLED") != "1" and _SRC not in sys.path:
11
- sys.path.insert(0, _SRC)