Overlay native taxonomy JSON and local DeepSeek skills.
repo_paths and compose mount src/taxonomy first. Docker copies dependency then src for taxonomy and skills. SKILL.md prose is rewritten; schema IDs and validate contracts stay. Manifest 1.14.0. Do not run upload_skills.py.
This commit is contained in:
+1
-1
@@ -6,4 +6,4 @@ from pathlib import Path
|
||||
|
||||
REPO_ROOT = Path(__file__).resolve().parents[1]
|
||||
SIMPLE_PROJECT = REPO_ROOT / "periscope" / "dependency" / "simple_project"
|
||||
TAXONOMY = REPO_ROOT / "periscope" / "dependency" / "taxonomy"
|
||||
TAXONOMY = REPO_ROOT / "periscope" / "src" / "taxonomy"
|
||||
|
||||
@@ -28,12 +28,11 @@ def test_taxonomy_module_is_src():
|
||||
assert "Native Periscope overlay" not in text
|
||||
|
||||
|
||||
def test_taxonomy_dir_points_at_dependency_json():
|
||||
def test_taxonomy_dir_points_at_src_json():
|
||||
d = taxonomy_dir()
|
||||
assert d.parts[-2:] == ("dependency", "taxonomy")
|
||||
assert d.parts[-2:] == ("src", "taxonomy")
|
||||
assert (d / "ic.json").is_file()
|
||||
assert taxonomy.TAXONOMY_DIR == d
|
||||
assert not (Path(taxonomy.__file__).resolve().parent.parent.parent / "taxonomy" / "ic.json").is_file()
|
||||
|
||||
|
||||
def test_emmaforo_ref_prefixes():
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
"""Native taxonomy JSON and local DeepSeek skills live under periscope/src."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
from backend.repo_paths import skills_dir, taxonomy_dir
|
||||
from backend.services.llm.local_skill import load_skill_markdown, load_skill_validator
|
||||
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
|
||||
|
||||
def test_taxonomy_json_is_src():
|
||||
d = taxonomy_dir()
|
||||
assert d.parts[-2:] == ("src", "taxonomy")
|
||||
for name in (
|
||||
"ic.json",
|
||||
"passive.json",
|
||||
"discrete.json",
|
||||
"connector.json",
|
||||
"crystal.json",
|
||||
"fuse.json",
|
||||
"switch.json",
|
||||
"test_point.json",
|
||||
"transformer.json",
|
||||
):
|
||||
assert (d / name).is_file(), name
|
||||
|
||||
|
||||
def test_skills_dir_is_src_and_local():
|
||||
d = skills_dir()
|
||||
assert d.parts[-2:] == ("src", "skills")
|
||||
for name in ("extract-pintable", "extract-pattern", "extract-specs"):
|
||||
assert (d / name / "SKILL.md").is_file()
|
||||
assert (d / name / "validate.py").is_file()
|
||||
assert (d / name / "schema.json").is_file()
|
||||
text = (d / name / "SKILL.md").read_text(encoding="utf-8")
|
||||
assert "Native Periscope overlay" not in text[:400]
|
||||
assert "upload_skills" not in text
|
||||
|
||||
|
||||
def test_pintable_skill_mentions_save_tool_and_wroom():
|
||||
md = load_skill_markdown("extract-pintable")
|
||||
assert "save_pintable" in md
|
||||
assert "layout_rules" in md
|
||||
assert "WROOM" in md
|
||||
assert "net_class" in md
|
||||
|
||||
|
||||
def test_docker_copies_src_taxonomy_and_skills():
|
||||
docker = (ROOT / "periscope" / "src" / "backend" / "Dockerfile").read_text(encoding="utf-8")
|
||||
assert "COPY periscope/src/taxonomy/ /app/taxonomy/" in docker
|
||||
assert "COPY periscope/src/skills/ /app/skills/" in docker
|
||||
compose = (ROOT / "docker-compose.yml").read_text(encoding="utf-8")
|
||||
assert "./periscope/src/taxonomy:/app/taxonomy" in compose
|
||||
assert "dependency/taxonomy:/app/taxonomy" not in compose
|
||||
|
||||
|
||||
def test_skills_manifest_bumped_for_prompt_change():
|
||||
text = (ROOT / "periscope" / "src" / "backend" / "skills_manifest.json").read_text(
|
||||
encoding="utf-8"
|
||||
)
|
||||
assert '"default_model_version": "1.14.0"' in text
|
||||
validate = load_skill_validator("extract-pintable")
|
||||
assert validate is not None
|
||||
Reference in New Issue
Block a user