- 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.
27 lines
681 B
Python
27 lines
681 B
Python
import tomllib
|
|
import unittest
|
|
from pathlib import Path
|
|
|
|
|
|
PROJECT_ROOT = Path(__file__).resolve().parents[1]
|
|
|
|
|
|
class ToolCommandsTests(unittest.TestCase):
|
|
def test_repository_tools_have_uv_commands(self):
|
|
project = tomllib.loads(
|
|
(PROJECT_ROOT / "pyproject.toml").read_text(encoding="utf-8")
|
|
)["project"]
|
|
self.assertEqual(
|
|
project["scripts"],
|
|
{
|
|
"pack": "tools.pack:main",
|
|
"build_node": "tools.build_node:main",
|
|
"sync_models": "tools.sync_models:main",
|
|
"docs": "tools.docs:main",
|
|
},
|
|
)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main()
|