nickh007 commited on
Commit
eac8c48
·
verified ·
1 Parent(s): 93a7f97

Mark the figures the release cannot reproduce

Browse files
Files changed (1) hide show
  1. tests/test_conformance.py +17 -0
tests/test_conformance.py CHANGED
@@ -213,3 +213,20 @@ def test_index_matches_the_manifest_exactly():
213
  subprocess.run([_sys.executable, str(here / "build_index.py")],
214
  capture_output=True, check=True)
215
  assert idx.read_bytes() == before, "index.jsonl is stale vs the manifest"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
213
  subprocess.run([_sys.executable, str(here / "build_index.py")],
214
  capture_output=True, check=True)
215
  assert idx.read_bytes() == before, "index.jsonl is stale vs the manifest"
216
+
217
+
218
+ def test_readme_flags_the_one_figure_it_cannot_reproduce():
219
+ """1.2441 is a pre-fix value from a superseded generator revision.
220
+
221
+ Every other number on the card re-derives from the committed corpus. This
222
+ one does not, so the card has to say so -- and the resonator it describes
223
+ must actually be passive today, or the anecdote is worse than the bug.
224
+ """
225
+ readme = (HERE / "README.md").read_text()
226
+ assert "1.2441" in readme, "drop this guard along with the figure"
227
+ assert "cannot reproduce from the" in readme
228
+ assert "superseded generator revision" in readme
229
+
230
+ net = read_touchstone(str(HERE / "data" / "passive_resonator.s2p"))
231
+ sigma = float(np.max(np.linalg.svd(net.s, compute_uv=False)))
232
+ assert sigma <= 1.0 + 1e-9, f"shipped resonator is not passive: {sigma}"