Add tools and tests for AnyImage model management and documentation

- 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.
This commit is contained in:
2026-08-31 15:15:33 +08:00
parent 377eee43f5
commit e7aeeb21d4
99 changed files with 1953 additions and 1676 deletions

View File

@@ -0,0 +1,26 @@
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()