- Implement sync_models.py for preparing and uploading ONNX artifacts. - Create build_node.py for building and validating Blender scripts. - Add docs.py for building and previewing documentation with Mike or MkDocs. - Introduce model_exports.py for exporting PyTorch models to ONNX format. - Develop pack.py for packaging the project with dependencies for different platforms. - Add test_sync_models.py to validate sync_models functionality. - Add test_tool_commands.py to ensure repository tools have correct command scripts. - Initialize tools package with __init__.py.
26 lines
827 B
Python
26 lines
827 B
Python
import tomllib
|
|
import unittest
|
|
from pathlib import Path
|
|
|
|
|
|
PROJECT_ROOT = Path(__file__).resolve().parents[1]
|
|
MANIFEST_PATH = PROJECT_ROOT / "src" / "anyimage" / "blender_manifest.toml"
|
|
|
|
|
|
class ExtensionManifestTest(unittest.TestCase):
|
|
@classmethod
|
|
def setUpClass(cls):
|
|
cls.manifest = tomllib.loads(MANIFEST_PATH.read_text(encoding="utf-8"))
|
|
|
|
def test_declares_modern_extension_metadata(self):
|
|
self.assertEqual(self.manifest["schema_version"], "1.0.0")
|
|
self.assertEqual(self.manifest["id"], "anyimage")
|
|
self.assertEqual(self.manifest["type"], "add-on")
|
|
self.assertNotIn("bl_info", self.manifest)
|
|
|
|
def test_declares_required_environment_permissions(self):
|
|
self.assertEqual(
|
|
set(self.manifest["permissions"]),
|
|
{"network", "files"},
|
|
)
|