Skip to content

Comments

Add vws generate-vumark command#1968

Open
adamtheturtle wants to merge 16 commits intomainfrom
adamtheturtle/add-vumark-support
Open

Add vws generate-vumark command#1968
adamtheturtle wants to merge 16 commits intomainfrom
adamtheturtle/add-vumark-support

Conversation

@adamtheturtle
Copy link
Member

@adamtheturtle adamtheturtle commented Feb 19, 2026

Summary

Adds a vws generate-vumark CLI command that wraps VWS.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/VuforiaDatabase fixtures 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-url option into a shared module.

Overview
Introduces a new standalone vumark CLI command (vws_cli.vumark:generate_vumark) that calls vws-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 vumark console script and bin/vumark.py entrypoint, updates Sphinx docs/README/install guides, and extends the GitHub release workflow to build/upload Linux/Windows/macOS binaries for vumark (while explicitly deferring WinGet automation for it).

Refactors the shared --base-vws-url Click option into src/vws_cli/options/vws.py, bumps vws-python-mock to 2026.2.21, migrates tests to CloudDatabase, and adds new help-regression and command behavior/error-mapping tests for vumark.

Written by Cursor Bugbot for commit d0be9d6. This will update automatically on new commits. Configure here.

adamtheturtle and others added 3 commits February 21, 2026 09:06
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>
@adamtheturtle adamtheturtle force-pushed the adamtheturtle/add-vumark-support branch from 320a02f to eab90e0 Compare February 21, 2026 09:06
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>
adamtheturtle and others added 2 commits February 21, 2026 17:08
… calls

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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."
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant