Move all three skills into skills/; add root README; fix paths
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
312742cfef
commit
d95e5d452d
84 files changed
+97
-31
No files matched your search
+1
-1
@@ -72,4 +72,4 @@ uv run --with pytest --with playwright pytest tests
|
||||
passwords, checkpoints driving steps/boxes/progress, green/amber/red endings, the no-input
|
||||
mode, the dark toggle and no horizontal scroll, each in light, dark and narrow mode. The
|
||||
Python side covers line parsing, endings, the sample workbook and `palette.py --write`.
|
||||
The end-to-end fake-bot check lives in the skill itself: `python rpa-run-tab/templates/run_tab.py --selfcheck`.
|
||||
The end-to-end fake-bot check lives in the skill itself: `python skills/rpa-run-tab/templates/run_tab.py --selfcheck`.
|
||||
@@ -202,7 +202,7 @@ def main(fixture):
|
||||
shutil.copy(pages[0], results / f"{fixture}.dashboard.html")
|
||||
checks["no placeholders left"] = "{{" not in html
|
||||
if cfg.get("brand"):
|
||||
spec = importlib.util.spec_from_file_location("palette", ROOT / "rpa-dashboard-no-ai/templates/palette.py")
|
||||
spec = importlib.util.spec_from_file_location("palette", ROOT / "skills/rpa-dashboard-no-ai/templates/palette.py")
|
||||
palette = importlib.util.module_from_spec(spec)
|
||||
spec.loader.exec_module(palette)
|
||||
t = palette.derive(cfg["brand"])
|
||||
|
||||
@@ -16,7 +16,7 @@ import pytest
|
||||
from page_check_common import FAKE_BRIDGE, MODES, TEST_FILL, WIRED, open_page
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[2]
|
||||
TEMPLATE = ROOT / "rpa-dashboard-no-ai" / "templates" / "dashboard.html"
|
||||
TEMPLATE = ROOT / "skills" / "rpa-dashboard-no-ai" / "templates" / "dashboard.html"
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
|
||||
@@ -23,7 +23,7 @@ import pytest
|
||||
from page_check_common import MODES, TEST_FILL, load_stub, open_page
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[2]
|
||||
TEMPLATE = ROOT / "rpa-dashboard-ai" / "templates" / "web"
|
||||
TEMPLATE = ROOT / "skills" / "rpa-dashboard-ai" / "templates" / "web"
|
||||
TEST_FILL = {**TEST_FILL, "APP_NAME": "Test Extractor", "API_BASE": "/api"}
|
||||
RECORD_ACTIONS = """
|
||||
window.__calls = [];
|
||||
|
||||
@@ -22,8 +22,8 @@ import pytest
|
||||
from page_check_common import FAKE_BRIDGE, MODES, TEST_FILL, WIRED, load_stub, open_page
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[2]
|
||||
NO_AI = ROOT / "rpa-dashboard-no-ai" / "templates" / "dashboard.html"
|
||||
AI = ROOT / "rpa-dashboard-ai" / "templates"
|
||||
NO_AI = ROOT / "skills" / "rpa-dashboard-no-ai" / "templates" / "dashboard.html"
|
||||
AI = ROOT / "skills" / "rpa-dashboard-ai" / "templates"
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
|
||||
@@ -9,7 +9,7 @@ import pytest
|
||||
from page_check_common import FAKE_BRIDGE, MODES, open_page
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[2]
|
||||
TEMPLATE = ROOT / "rpa-run-tab" / "templates" / "run_tab.html"
|
||||
TEMPLATE = ROOT / "skills" / "rpa-run-tab" / "templates" / "run_tab.html"
|
||||
CFG = {"title": "Test Bot", "sub": "Page check", "input": True, "inputHint": "Test workbook",
|
||||
"sample": True, "darkKey": "test_dark",
|
||||
"checkpoints": [{"name": "Sign in", "max": 300}, {"name": "Process rows", "max": 0},
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ import importlib.util
|
||||
import re
|
||||
from pathlib import Path
|
||||
|
||||
BANDS = Path(__file__).resolve().parents[1] / "rpa-dashboard-ai" / "templates" / "web" / "bands.py"
|
||||
BANDS = Path(__file__).resolve().parents[1] / "skills" / "rpa-dashboard-ai" / "templates" / "web" / "bands.py"
|
||||
spec = importlib.util.spec_from_file_location("bands", BANDS)
|
||||
bands = importlib.util.module_from_spec(spec)
|
||||
spec.loader.exec_module(bands)
|
||||
|
||||
@@ -7,7 +7,7 @@ from pathlib import Path
|
||||
|
||||
import pytest
|
||||
|
||||
RUNNER = Path(__file__).resolve().parents[1] / "rpa-dashboard-no-ai" / "templates" / "bot_runner.py"
|
||||
RUNNER = Path(__file__).resolve().parents[1] / "skills" / "rpa-dashboard-no-ai" / "templates" / "bot_runner.py"
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
||||
@@ -5,7 +5,7 @@ import subprocess
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
DETECT = Path(__file__).resolve().parents[1] / "rpa-dashboard-no-ai" / "templates" / "detect_frontend.py"
|
||||
DETECT = Path(__file__).resolve().parents[1] / "skills" / "rpa-dashboard-no-ai" / "templates" / "detect_frontend.py"
|
||||
spec = importlib.util.spec_from_file_location("detect_frontend", DETECT)
|
||||
detect_frontend = importlib.util.module_from_spec(spec)
|
||||
spec.loader.exec_module(detect_frontend)
|
||||
|
||||
@@ -4,7 +4,7 @@ import subprocess
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
PALETTE = Path(__file__).resolve().parents[1] / "rpa-dashboard-no-ai" / "templates" / "palette.py"
|
||||
PALETTE = Path(__file__).resolve().parents[1] / "skills" / "rpa-dashboard-no-ai" / "templates" / "palette.py"
|
||||
spec = importlib.util.spec_from_file_location("palette", PALETTE)
|
||||
palette = importlib.util.module_from_spec(spec)
|
||||
spec.loader.exec_module(palette)
|
||||
|
||||
@@ -5,7 +5,7 @@ from pathlib import Path
|
||||
|
||||
import pytest
|
||||
|
||||
SRC = Path(__file__).resolve().parents[1] / "rpa-dashboard-ai" / "templates" / "web" / "pricing.py"
|
||||
SRC = Path(__file__).resolve().parents[1] / "skills" / "rpa-dashboard-ai" / "templates" / "web" / "pricing.py"
|
||||
spec = importlib.util.spec_from_file_location("pricing", SRC)
|
||||
pricing = importlib.util.module_from_spec(spec)
|
||||
spec.loader.exec_module(pricing)
|
||||
|
||||
@@ -6,8 +6,8 @@ from pathlib import Path
|
||||
import pytest
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
SKILLS = [ROOT / "rpa-dashboard-ai", ROOT / "rpa-dashboard-no-ai"]
|
||||
AI_REFERENCE = ROOT / "rpa-dashboard-ai" / "templates" / "reference"
|
||||
SKILLS = [ROOT / "skills" / "rpa-dashboard-ai", ROOT / "skills" / "rpa-dashboard-no-ai"]
|
||||
AI_REFERENCE = ROOT / "skills" / "rpa-dashboard-ai" / "templates" / "reference"
|
||||
FORBIDDEN = {
|
||||
"internal IP": r"\b(10\.\d{1,3}|192\.168|172\.(1[6-9]|2\d|3[01]))\.\d{1,3}\.\d{1,3}\b",
|
||||
"Google API key": r"AIza[0-9A-Za-z_-]{30,}",
|
||||
|
||||
@@ -4,7 +4,7 @@ import sys
|
||||
from pathlib import Path
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
T = ROOT / "rpa-run-tab" / "templates"
|
||||
T = ROOT / "skills" / "rpa-run-tab" / "templates"
|
||||
sys.path.insert(0, str(T))
|
||||
import runner # noqa: E402
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ from pathlib import Path
|
||||
import pytest
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
TEMPLATES = ROOT / "rpa-dashboard-no-ai" / "templates"
|
||||
TEMPLATES = ROOT / "skills" / "rpa-dashboard-no-ai" / "templates"
|
||||
spec = importlib.util.spec_from_file_location("sections", TEMPLATES / "sections.py")
|
||||
sections = importlib.util.module_from_spec(spec)
|
||||
spec.loader.exec_module(sections)
|
||||
|
||||
@@ -10,9 +10,9 @@ ROOT = Path(__file__).resolve().parents[1]
|
||||
HOOK_RULES = "E9,F63,F7,F82,F811" # same rule set as the PostToolUse lint hook
|
||||
|
||||
|
||||
@pytest.mark.parametrize("template", ["rpa-dashboard-no-ai/templates/bridge.py",
|
||||
"rpa-dashboard-no-ai/templates/bot_runner.py",
|
||||
"rpa-dashboard-ai/templates/desktop/ai_bridge.py"])
|
||||
@pytest.mark.parametrize("template", ["skills/rpa-dashboard-no-ai/templates/bridge.py",
|
||||
"skills/rpa-dashboard-no-ai/templates/bot_runner.py",
|
||||
"skills/rpa-dashboard-ai/templates/desktop/ai_bridge.py"])
|
||||
def test_template_passes_lint_hook_unfilled(template):
|
||||
ruff = shutil.which("ruff") or pytest.skip("ruff not on PATH")
|
||||
r = subprocess.run([ruff, "check", "--select", HOOK_RULES, "--no-cache", str(ROOT / template)],
|
||||
@@ -21,7 +21,7 @@ def test_template_passes_lint_hook_unfilled(template):
|
||||
|
||||
|
||||
def test_tebra_sky_preset_is_the_template_default():
|
||||
templates = ROOT / "rpa-dashboard-no-ai" / "templates"
|
||||
templates = ROOT / "skills" / "rpa-dashboard-no-ai" / "templates"
|
||||
themes = (templates / "themes.md").read_text(encoding="utf-8")
|
||||
sky = themes.split("## 1. Tebra Sky")[1].split("```css\n")[1].split("```")[0]
|
||||
assert sky in (templates / "dashboard.html").read_text(encoding="utf-8")
|
||||
@@ -29,13 +29,13 @@ def test_tebra_sky_preset_is_the_template_default():
|
||||
|
||||
@pytest.mark.parametrize("skill", ["rpa-dashboard-no-ai", "rpa-dashboard-ai"])
|
||||
def test_skill_description_fits_the_1024_char_limit(skill):
|
||||
text = (ROOT / skill / "SKILL.md").read_text(encoding="utf-8")
|
||||
text = (ROOT / "skills" / skill / "SKILL.md").read_text(encoding="utf-8")
|
||||
description = re.search(r"^description: (.+)$", text, re.MULTILINE)[1]
|
||||
assert len(description) <= 1024, len(description)
|
||||
|
||||
|
||||
def test_ai_skill_references_files_that_exist():
|
||||
skill = ROOT / "rpa-dashboard-ai"
|
||||
skill = ROOT / "skills" / "rpa-dashboard-ai"
|
||||
text = (skill / "SKILL.md").read_text(encoding="utf-8")
|
||||
paths = re.findall(r"`((?:templates/|<no-ai>)[\w./-]+)`", text)
|
||||
assert len(paths) > 5
|
||||
|
||||
Reference in new issue
Block a user