utils, resolve_passives, derating, bom_summary, pin_mux, LED current, pin-function tokens, plus live analysis validate/validation_tools/pipeline/ validation/extraction, skills, and taxonomy JSON now resolve from periscope/src. Inherited copies stay in dependency/. repo_paths prefers src then /app; Docker copies src taxonomy/skills last.
36 lines
1.1 KiB
Python
36 lines
1.1 KiB
Python
"""Native overlay: graph, parsers, models, taxonomy resolve from periscope/src."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from pathlib import Path
|
|
|
|
import backend.periscopex.graph as graph
|
|
import backend.periscopex.models as models
|
|
import backend.periscopex.parsers as parsers
|
|
import backend.periscopex.parsers_edif as parsers_edif
|
|
import backend.periscopex.taxonomy as taxonomy
|
|
|
|
|
|
def _src_file(mod) -> Path:
|
|
return Path(mod.__file__).resolve()
|
|
|
|
|
|
def test_graph_parsers_models_taxonomy_load_from_src():
|
|
root = Path(__file__).resolve().parents[1]
|
|
src = (root / "periscope" / "src" / "backend" / "periscopex").resolve()
|
|
for mod, name in (
|
|
(graph, "graph.py"),
|
|
(models, "models.py"),
|
|
(parsers, "parsers.py"),
|
|
(parsers_edif, "parsers_edif.py"),
|
|
(taxonomy, "taxonomy.py"),
|
|
):
|
|
path = _src_file(mod)
|
|
assert path == src / name, path
|
|
assert "Native Periscope overlay" in path.read_text(encoding="utf-8")[:400]
|
|
|
|
|
|
def test_taxonomy_dir_points_at_json_tree():
|
|
ic = taxonomy.TAXONOMY_DIR / "ic.json"
|
|
assert ic.is_file(), taxonomy.TAXONOMY_DIR
|