diff --git a/pyproject.toml b/pyproject.toml index 6892d71..b6064b1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,7 @@ requires-python = ">=3.10" dependencies = ["pydantic>=2.7", "pyyaml>=6.0"] [project.scripts] -didactopus-demo-run = "didactopus.demo_run:main" +didactopus-pack-to-frontend = "didactopus.pack_to_frontend:main" [tool.setuptools.packages.find] where = ["src"] diff --git a/tests/test_pack_export.py b/tests/test_pack_export.py index 0d0704f..85670f5 100644 --- a/tests/test_pack_export.py +++ b/tests/test_pack_export.py @@ -2,9 +2,16 @@ from pathlib import Path from didactopus.pack_to_frontend import convert_pack def test_convert_pack(tmp_path: Path): - (tmp_path / "pack.yaml").write_text("name: p1\ndisplay_name: Pack 1\ndescription: Demo pack\n", encoding="utf-8") - (tmp_path / "concepts.yaml").write_text("concepts:\n - id: c1\n title: Concept 1\n prerequisites: []\n", encoding="utf-8") - (tmp_path / "pack_compliance_manifest.json").write_text('{"derived_from_sources":["s1"],"attribution_required":true,"share_alike_required":false,"noncommercial_only":false,"restrictive_flags":[]}', encoding="utf-8") + (tmp_path / "pack.yaml").write_text( + "name: p1\ndisplay_name: Pack 1\ndescription: Demo pack\n", encoding="utf-8" + ) + (tmp_path / "concepts.yaml").write_text( + "concepts:\n - id: c1\n title: Concept 1\n prerequisites: []\n", encoding="utf-8" + ) + (tmp_path / "pack_compliance_manifest.json").write_text( + '{"derived_from_sources":["s1"],"attribution_required":true,"share_alike_required":false,"noncommercial_only":false,"restrictive_flags":[]}', + encoding="utf-8" + ) payload = convert_pack(tmp_path) assert payload["id"] == "p1" assert payload["concepts"][0]["id"] == "c1" diff --git a/tests/test_ui_files.py b/tests/test_ui_files.py index ceba475..7a06f82 100644 --- a/tests/test_ui_files.py +++ b/tests/test_ui_files.py @@ -2,5 +2,5 @@ from pathlib import Path def test_ui_files_exist(): assert Path("webui/src/App.jsx").exists() - assert Path("webui/src/domainData.js").exists() - assert Path("webui/src/engine.js").exists() + assert Path("webui/src/storage.js").exists() + assert Path("webui/public/packs/bayes-pack.json").exists() diff --git a/webui/index.html b/webui/index.html index 453c3ca..45716ea 100644 --- a/webui/index.html +++ b/webui/index.html @@ -3,8 +3,10 @@
-