embeddedci-openhtf 2.3.1__tar.gz → 2.4.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 (28) hide show
  1. {embeddedci_openhtf-2.3.1 → embeddedci_openhtf-2.4.0}/CHANGELOG.md +6 -0
  2. {embeddedci_openhtf-2.3.1 → embeddedci_openhtf-2.4.0}/PKG-INFO +3 -3
  3. {embeddedci_openhtf-2.3.1 → embeddedci_openhtf-2.4.0}/README.md +1 -1
  4. {embeddedci_openhtf-2.3.1 → embeddedci_openhtf-2.4.0}/pyproject.toml +2 -2
  5. {embeddedci_openhtf-2.3.1 → embeddedci_openhtf-2.4.0}/src/embeddedci_openhtf/plug.py +2 -2
  6. {embeddedci_openhtf-2.3.1 → embeddedci_openhtf-2.4.0}/tests/test_power.py +8 -8
  7. {embeddedci_openhtf-2.3.1 → embeddedci_openhtf-2.4.0}/.gitignore +0 -0
  8. {embeddedci_openhtf-2.3.1 → embeddedci_openhtf-2.4.0}/LICENSE +0 -0
  9. {embeddedci_openhtf-2.3.1 → embeddedci_openhtf-2.4.0}/examples/analog_loopback.py +0 -0
  10. {embeddedci_openhtf-2.3.1 → embeddedci_openhtf-2.4.0}/examples/flash_and_boot.py +0 -0
  11. {embeddedci_openhtf-2.3.1 → embeddedci_openhtf-2.4.0}/examples/serial_smoke.py +0 -0
  12. {embeddedci_openhtf-2.3.1 → embeddedci_openhtf-2.4.0}/examples/station.py +0 -0
  13. {embeddedci_openhtf-2.3.1 → embeddedci_openhtf-2.4.0}/src/embeddedci_openhtf/__init__.py +0 -0
  14. {embeddedci_openhtf-2.3.1 → embeddedci_openhtf-2.4.0}/src/embeddedci_openhtf/analog.py +0 -0
  15. {embeddedci_openhtf-2.3.1 → embeddedci_openhtf-2.4.0}/src/embeddedci_openhtf/measurements.py +0 -0
  16. {embeddedci_openhtf-2.3.1 → embeddedci_openhtf-2.4.0}/src/embeddedci_openhtf/phases.py +0 -0
  17. {embeddedci_openhtf-2.3.1 → embeddedci_openhtf-2.4.0}/src/embeddedci_openhtf/pins.py +0 -0
  18. {embeddedci_openhtf-2.3.1 → embeddedci_openhtf-2.4.0}/src/embeddedci_openhtf/power.py +0 -0
  19. {embeddedci_openhtf-2.3.1 → embeddedci_openhtf-2.4.0}/tests/_fake.py +0 -0
  20. {embeddedci_openhtf-2.3.1 → embeddedci_openhtf-2.4.0}/tests/conftest.py +0 -0
  21. {embeddedci_openhtf-2.3.1 → embeddedci_openhtf-2.4.0}/tests/test_analog.py +0 -0
  22. {embeddedci_openhtf-2.3.1 → embeddedci_openhtf-2.4.0}/tests/test_docs_coverage.py +0 -0
  23. {embeddedci_openhtf-2.3.1 → embeddedci_openhtf-2.4.0}/tests/test_e2e_openhtf.py +0 -0
  24. {embeddedci_openhtf-2.3.1 → embeddedci_openhtf-2.4.0}/tests/test_measurements.py +0 -0
  25. {embeddedci_openhtf-2.3.1 → embeddedci_openhtf-2.4.0}/tests/test_persistent.py +0 -0
  26. {embeddedci_openhtf-2.3.1 → embeddedci_openhtf-2.4.0}/tests/test_phases.py +0 -0
  27. {embeddedci_openhtf-2.3.1 → embeddedci_openhtf-2.4.0}/tests/test_pins.py +0 -0
  28. {embeddedci_openhtf-2.3.1 → embeddedci_openhtf-2.4.0}/tests/test_plug.py +0 -0
@@ -1,5 +1,11 @@
1
1
  # Changelog — `embeddedci-openhtf`
2
2
 
3
+ ## 2.4.0
4
+
5
+ - Needs embeddedci 3.0: wiring profiles live on the pod and nothing is wired by default. A plug
6
+ without a wiring profile needs `efuse=` for power calls; pass `wiring=` or save the bench's
7
+ profile on the pod.
8
+
3
9
  ## 2.3.1
4
10
 
5
11
  - `signal_generate`, `signal_generate_phase` and `loopback_measure_phase` default to
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: embeddedci-openhtf
3
- Version: 2.3.1
3
+ Version: 2.4.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.12.0
21
+ Requires-Dist: embeddedci<4,>=3.0.0
22
22
  Requires-Dist: openhtf>=1.6
23
23
  Provides-Extra: dev
24
24
  Requires-Dist: pytest>=7.0; extra == 'dev'
@@ -111,7 +111,7 @@ def pulse_and_wait(test, bench):
111
111
  ### LA voltage
112
112
 
113
113
  The pod refuses every LA-bank operation — **flashing, the UART proxy, LA capture,
114
- pull resistors, I2C-sensor emulation** — until the LA I/O-bank voltage is selected.
114
+ pull resistors, sensor emulation** — until the LA I/O-bank voltage is selected.
115
115
  Set it to your DUT's I/O voltage (`1.8` or `3.3` volts); the plug applies it right
116
116
  after connecting. Resolution order: `benchpod_plug(..., la_voltage=)`, then the
117
117
  `benchpod_la_voltage` conf key, then the `BENCHPOD_LA_VOLTAGE` env var. Leave all three
@@ -85,7 +85,7 @@ def pulse_and_wait(test, bench):
85
85
  ### LA voltage
86
86
 
87
87
  The pod refuses every LA-bank operation — **flashing, the UART proxy, LA capture,
88
- pull resistors, I2C-sensor emulation** — until the LA I/O-bank voltage is selected.
88
+ pull resistors, sensor emulation** — until the LA I/O-bank voltage is selected.
89
89
  Set it to your DUT's I/O voltage (`1.8` or `3.3` volts); the plug applies it right
90
90
  after connecting. Resolution order: `benchpod_plug(..., la_voltage=)`, then the
91
91
  `benchpod_la_voltage` conf key, then the `BENCHPOD_LA_VOLTAGE` env var. Leave all three
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "embeddedci-openhtf"
7
- version = "2.3.1"
7
+ version = "2.4.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.12.0,<3",
26
+ "embeddedci>=3.0.0,<4",
27
27
  "openhtf>=1.6",
28
28
  ]
29
29
 
@@ -43,7 +43,7 @@ wherever a channel does::
43
43
  gpio(bench, "TRIGGER").pulse(0.001) # the channel the profile names TRIGGER
44
44
 
45
45
  **LA voltage.** The pod refuses every LA-bank operation — flashing, the UART
46
- proxy, LA capture, pull resistors, I2C-sensor emulation — until the LA I/O-bank
46
+ proxy, LA capture, pull resistors, sensor emulation — until the LA I/O-bank
47
47
  voltage (1.8 or 3.3 V) is selected. Pass ``la_voltage=`` to :func:`benchpod_plug`,
48
48
  set the ``benchpod_la_voltage`` conf key, or export ``BENCHPOD_LA_VOLTAGE``; it is
49
49
  applied right after connecting.
@@ -100,7 +100,7 @@ htf.conf.declare(
100
100
  "benchpod_la_voltage",
101
101
  description=(
102
102
  "LA I/O-bank voltage in volts (1.8 or 3.3), selected right after connecting. The pod "
103
- "refuses flashing, UART, LA capture, pull resistors and I2C-sensor emulation until one "
103
+ "refuses flashing, UART, LA capture, pull resistors and sensor emulation until one "
104
104
  f"is set. Falls back to the {LA_VOLTAGE_ENV_VAR} env var."
105
105
  ),
106
106
  default_value=None,
@@ -37,7 +37,7 @@ def _request(tx, cmd="power_profile"):
37
37
 
38
38
  def test_measure_power_returns_si_units():
39
39
  tx = FakeTransport()
40
- plug = benchpod_plug(transport=tx)()
40
+ plug = benchpod_plug(transport=tx, wiring={"version": 2, "efuse": 1})()
41
41
  profile = measure_power(plug, 1.0)
42
42
  assert isinstance(profile, PowerProfile)
43
43
  assert _request(tx) == {"cmd": "power_profile", "efuse": 1, "rate_hz": 500,
@@ -51,7 +51,7 @@ def test_measure_power_returns_si_units():
51
51
 
52
52
  def test_measure_power_passes_its_keywords_through():
53
53
  tx = FakeTransport()
54
- plug = benchpod_plug(transport=tx)()
54
+ plug = benchpod_plug(transport=tx, wiring={"version": 2, "efuse": 1})()
55
55
  profile = measure_power(plug, 0.5, efuse=2, rate_hz=500, keep_samples=2)
56
56
  req = _request(tx)
57
57
  assert req["efuse"] == 2 and req["rate_hz"] == 500.0 and req["keep_samples"] == 2
@@ -70,7 +70,7 @@ def test_measure_power_uses_the_wiring_profile_rail():
70
70
 
71
71
  def test_measure_power_phase_records_current_voltage_and_energy():
72
72
  tx = FakeTransport()
73
- rec = _run(measure_power_phase(benchpod_plug(transport=tx), duration=1.0))
73
+ rec = _run(measure_power_phase(benchpod_plug(transport=tx, wiring={"version": 2, "efuse": 1}), duration=1.0))
74
74
  assert rec.outcome == tr.Outcome.PASS
75
75
  phase = _phase(rec, "measure_power")
76
76
  assert _value(phase, "power_avg_current_a") == pytest.approx(0.052)
@@ -85,20 +85,20 @@ def test_measure_power_phase_records_current_voltage_and_energy():
85
85
 
86
86
  def test_measure_power_phase_limits_pass_and_fail():
87
87
  tx = FakeTransport()
88
- rec = _run(measure_power_phase(benchpod_plug(transport=tx), duration=1.0,
88
+ rec = _run(measure_power_phase(benchpod_plug(transport=tx, wiring={"version": 2, "efuse": 1}), duration=1.0,
89
89
  avg_current_range=(0, 0.1), peak_current_range=(0, 0.2),
90
90
  energy_range=(0, 1.0)))
91
91
  assert rec.outcome == tr.Outcome.PASS
92
92
 
93
93
  tx = FakeTransport()
94
- rec = _run(measure_power_phase(benchpod_plug(transport=tx), duration=1.0,
94
+ rec = _run(measure_power_phase(benchpod_plug(transport=tx, wiring={"version": 2, "efuse": 1}), duration=1.0,
95
95
  avg_current_range=(0, 0.01))) # a 10 mA budget it blows
96
96
  assert rec.outcome == tr.Outcome.FAIL
97
97
 
98
98
 
99
99
  def test_measure_power_phase_attaches_the_kept_samples():
100
100
  tx = FakeTransport()
101
- rec = _run(measure_power_phase(benchpod_plug(transport=tx), duration=1.0, keep_samples=2,
101
+ rec = _run(measure_power_phase(benchpod_plug(transport=tx, wiring={"version": 2, "efuse": 1}), duration=1.0, keep_samples=2,
102
102
  efuse=2, rate_hz=500, prefix="sleep"))
103
103
  phase = _phase(rec, "measure_power")
104
104
  assert _value(phase, "sleep_avg_current_a") == pytest.approx(0.052)
@@ -109,7 +109,7 @@ def test_measure_power_phase_attaches_the_kept_samples():
109
109
 
110
110
  def test_measure_power_phase_can_skip_the_attachment():
111
111
  tx = FakeTransport()
112
- rec = _run(measure_power_phase(benchpod_plug(transport=tx), duration=1.0, keep_samples=2,
112
+ rec = _run(measure_power_phase(benchpod_plug(transport=tx, wiring={"version": 2, "efuse": 1}), duration=1.0, keep_samples=2,
113
113
  attachment=None))
114
114
  assert "power.json" not in _phase(rec, "measure_power").attachments
115
115
 
@@ -117,7 +117,7 @@ def test_measure_power_phase_can_skip_the_attachment():
117
117
  def test_measure_power_phase_reports_a_fault_and_a_truncated_profile():
118
118
  tx = FakeTransport()
119
119
  tx.power_stats = dict(tx.power_stats, fault=True, truncated=True)
120
- rec = _run(measure_power_phase(benchpod_plug(transport=tx), duration=1.0))
120
+ rec = _run(measure_power_phase(benchpod_plug(transport=tx, wiring={"version": 2, "efuse": 1}), duration=1.0))
121
121
  assert rec.outcome == tr.Outcome.PASS # no limits were given; the log carries the warning
122
122
  assert _value(_phase(rec, "measure_power"), "power_peak_current_a") == pytest.approx(0.18)
123
123