You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add database and target type support with VuMark validation (#2963)
* Add database type and target type support with VuMark validation (#2962)
Add DatabaseType enum (CLOUD_RECO, VUMARK) to distinguish database types and TargetType enum (IMAGE, VUMARK_TEMPLATE) for target classification. Implement InvalidTargetTypeError in VuMark generation endpoints to validate that VuMark instance generation only works on VUMARK-type databases. Update database and target serialization to include type information, and allow pre-population of VuMark targets in VuMark-type databases.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
* Document DatabaseType and TargetType in API reference; clarify Target class
Add autoenum entries for DatabaseType and TargetType to the API reference
docs. Add a docstring note to Target clarifying that some attributes are
primarily meaningful for image targets rather than VuMark template targets.
Add vulture whitelist entries for the new TypedDict field and enum value.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
* [pre-commit.ci lite] apply automatic fixes
* Refactor Target into ImageTarget and VuMarkTarget classes
- Rename Target → ImageTarget and TargetDict → ImageTargetDict
- Add VuMarkTarget dataclass for VuMark template targets (name, active_flag,
processing_time_seconds, target_id, dates; status always succeeds after processing)
- Remove TargetType enum (target_type.py deleted); class type is now the discriminator
- VuforiaDatabase.targets holds set[ImageTarget | VuMarkTarget]
- Image-only operations (duplicates, query matching, width/reco fields) guarded
with isinstance(target, ImageTarget) checks
- Update docs API reference and CHANGELOG
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Add VuMark to spelling dictionary
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Fix InvalidTargetType response status code to 422
Real Vuforia returns 422 Unprocessable Entity (not 403 Forbidden) when
attempting VuMark generation on a non-VuMark database.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Fix mypy errors and stale 'databases' attribute reference
- Change new_target type annotations from ImageTarget | VuMarkTarget to
ImageTarget in delete_target and update_target, since CloudDatabase.targets
is set[ImageTarget]
- Remove dead else branches in update_target (target is always ImageTarget
in cloud databases)
- Remove unused type: ignore[assignment] comments
- Fix generate_vumark_instance to use all_databases instead of stale
self._target_manager.databases attribute
- Remove unused VuMarkTarget import from mock_web_services_api
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Remove unnecessary isinstance checks for ImageTarget
Since CloudDatabase.targets is set[ImageTarget], targets are always
ImageTarget — isinstance checks are redundant and pyright flags them.
Remove all unnecessary isinstance(target, ImageTarget) guards and their
dead else branches.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
0 commit comments