Open
Conversation
Implement `vws generate-vumark` command for generating VuMark instances from VuMark targets. The command accepts a target ID, instance ID, and output format (SVG/PNG/PDF), and writes the generated VuMark to a file. Includes comprehensive error handling for invalid instance IDs, quota limits, and missing targets, plus full test coverage and help text regression files. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Use VWS.generate_vumark_instance() instead of a separate VuMarkService, align the VuMarkAccept enum and exception names with the actual API (InvalidInstanceIdError, TargetStatusNotSuccessError), and update tests to use existing MockVWS fixtures rather than a hypothetical MockVuMarkWS. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
320a02f to
eab90e0
Compare
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The `vumark` command is now its own binary/entrypoint, following the same pattern as `vuforia-cloud-reco`. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
mock-vws does not yet handle unknown targets or target status validation for VuMark generation. Mark those tests as expected failures and exclude untestable error paths from coverage. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… calls Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| if error_message is not None: | ||
| return error_message | ||
|
|
||
| return "Error: There was an unexpected error from Vuforia." |
There was a problem hiding this comment.
Missing InvalidTargetTypeError handler in error message function
High Severity
InvalidTargetTypeError is neither imported nor handled in _get_vumark_error_message. The test expects the message "Error: The target is not a VuMark template target." for this exception type, but the code falls through to the generic "Error: There was an unexpected error from Vuforia." message. The exception type needs to be imported from vws.exceptions.vws_exceptions and added to the exc_type_to_message mapping (or as an isinstance check).
Additional Locations (1)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
Adds a
vws generate-vumarkCLI command that wrapsVWS.generate_vumark_instance()from vws-python (VWS-Python/vws-python#2858). The command accepts a target ID, instance ID, and output format (PNG/SVG/PDF, defaulting to PNG), and writes the generated VuMark image bytes to a file.Error handling covers invalid instance IDs, targets not in the success state, unknown targets, and authentication failures. Tests use the existing
MockVWS/VuforiaDatabasefixtures and will pass once the vws-python PR is merged and the dependency is updated.🤖 Generated with Claude Code
Note
Medium Risk
Adds a new CLI surface and modifies the release workflow to publish additional binaries, which can affect packaging/release reliability. Core VWS command behavior is largely unchanged aside from factoring the
--base-vws-urloption into a shared module.Overview
Introduces a new standalone
vumarkCLI command (vws_cli.vumark:generate_vumark) that callsvws-python’s VuMark generation API, supports--instance-id,--format(png/svg/pdf), and writes the returned bytes to an output file with mapped, user-friendly error messages.Plumbs the new command through distribution and release tooling: adds the
vumarkconsole script andbin/vumark.pyentrypoint, updates Sphinx docs/README/install guides, and extends the GitHub release workflow to build/upload Linux/Windows/macOS binaries forvumark(while explicitly deferring WinGet automation for it).Refactors the shared
--base-vws-urlClick option intosrc/vws_cli/options/vws.py, bumpsvws-python-mockto2026.2.21, migrates tests toCloudDatabase, and adds new help-regression and command behavior/error-mapping tests forvumark.Written by Cursor Bugbot for commit d0be9d6. This will update automatically on new commits. Configure here.