Bump version to 0.11.2 and update uv version to 0.11.3

- Updated version in pyproject.toml and blender_manifest.toml to 0.11.2.
- Enhanced uv executable path documentation in client.py.
- Added inference_mode parameter to reconstruct_request function in client.py.
- Implemented uv download functionality in install_env.py with improved error handling and checksum verification.
- Modified install_uv function to download and extract uv binary instead of using bundled version.
- Updated job progress handling in operators.py to track progress stages.
- Improved download progress reporting in worker.py and adjusted related tests.
- Refactored tests to accommodate changes in status reporting and model downloading.
- Removed vendor.lock.toml as part of the cleanup process.
This commit is contained in:
2026-08-14 23:43:01 +08:00
parent 102e1bfa9b
commit 0c8d3a8988
22 changed files with 497 additions and 511 deletions

View File

@@ -849,7 +849,7 @@ class AddonTest(unittest.TestCase):
},
"fallback",
),
"3/8 pytorch | 2 downloaded",
"3/8 2 downloaded",
)
self.assertEqual(
operator._format_status(
@@ -886,7 +886,7 @@ class AddonTest(unittest.TestCase):
},
"fallback",
),
"2/3 PyTorch | Downloading packages | About 3 min left",
"2/3 Downloading packages",
)
self.assertEqual(
operator._format_status(
@@ -902,6 +902,30 @@ class AddonTest(unittest.TestCase):
"2/3 PyTorch",
)
def test_update_status_resets_progress_when_stage_changes(self):
operator = self.addon.RunJob()
settings = SimpleNamespace(progress=0.9, status="previous")
context = SimpleNamespace(
scene=SimpleNamespace(snapform_settings=settings)
)
job = SimpleNamespace(status_path=Path("status.json"), progress_stage=1)
with patch.object(
self.addon.client,
"read_status",
return_value={
"progress": 0.1,
"message": "Downloading model",
"stage": 2,
"stages": 4,
"stage_label": "MoGe-2",
},
), patch.object(operator, "_redraw_ui"):
operator._update_status(context, job)
self.assertEqual(job.progress_stage, 2)
self.assertEqual(settings.progress, 0.1)
def test_model_options_mark_only_models_that_are_not_downloaded(self):
items_callback = self.addon.SnapFormSettings.__annotations__["model"][
"items"
@@ -1419,6 +1443,7 @@ class AddonTest(unittest.TestCase):
parameters = request.payload["parameters"]
self.assertEqual(request.payload["command"], "reconstruct")
self.assertEqual(parameters["inference_mode"], "joint")
self.assertEqual(parameters["export_format"], "gs_ply")
for parameter in (
"process_res",
@@ -1660,6 +1685,10 @@ class AddonTest(unittest.TestCase):
self.fake_bpy.data.objects.get = original_get
self.assertEqual(reconstruct.call_args.kwargs["start_frame"], 71)
self.assertEqual(
reconstruct.call_args.kwargs["inference_mode"],
"per_frame",
)
def test_reconstruct_request_accepts_image_depth_overrides(self):
client = importlib.import_module("snapform.client")