Skip to content

Commit f2d9445

Browse files
authored
Merge pull request #109 from chipfoundry/feature/oeb-report-structured
feat(oeb): parse cvc.oeb.report into structured CheckResult.report
2 parents 69b2d3f + 7d1df94 commit f2d9445

11 files changed

Lines changed: 720 additions & 7 deletions

File tree

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,7 @@ path = "src/cf_precheck/__init__.py"
2727

2828
[tool.hatch.build.targets.wheel]
2929
packages = ["src/cf_precheck"]
30+
31+
[tool.pytest.ini_options]
32+
pythonpath = ["src"]
33+
testpaths = ["tests"]

src/cf_precheck/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.2.0"
1+
__version__ = "1.3.1"
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
"""Classifiers for the captured-warning fallback used by runner.py.
2+
3+
Lives in its own tiny module so unit tests can import the classifier without
4+
pulling in the full check stack (which transitively imports pya/KLayout and
5+
only works inside the precheck Docker image).
6+
"""
7+
8+
from __future__ import annotations
9+
10+
11+
# Warnings emitted during setup that must stay visible in the log but must
12+
# NOT become the one-line FAIL summary for a check. Each entry is a plain
13+
# substring match against the captured log message.
14+
#
15+
# Example: "Missing LVS configuration variable EXTRACT_CREATE_SUBCUT" fires
16+
# for almost every user project whose lvs_config.*.json doesn't populate the
17+
# optional LVS optimisation keys, and it always fires before the real OEB
18+
# or LVS failure reason. Without this filter the real error gets masked.
19+
BENIGN_WARNING_SUBSTRINGS: tuple[str, ...] = (
20+
"Missing LVS configuration variable ",
21+
)
22+
23+
24+
def is_benign_warning(message: str) -> bool:
25+
"""Return True if a captured WARNING shouldn't be surfaced as fail detail."""
26+
return any(needle in message for needle in BENIGN_WARNING_SUBSTRINGS)

0 commit comments

Comments
 (0)