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
Weights are being used internally and referenced publicly, but the feature is still a WIP. Any cog weights subcommand now prints a warning before execution, matching the pattern cog doctor uses:
NOTE: cog weights is experimental. Behavior may change in future versions.
Do not rely on it in production workflows.
Uses PersistentPreRun on the weights parent command so all subcommands (import, pull, status) get it automatically. Also updated the help text.
I'm Bonk, and I've done a quick review of your PR.
This PR adds an experimental warning to all cog weights subcommands using PersistentPreRun with proper parent chaining, matching the pattern established by cog doctor.
1 issue found:
Missing warning when run with --help (medium): The warning prints during command execution, but if a user runs cog weights --help, they'll see the experimental notice in the Long description but won't see the runtime warning. This is actually consistent with cog doctor behavior, so this may be intentional. However, consider that users might not realize it's experimental if they only ever use --help.
The implementation correctly chains the parent's PersistentPreRun, ensuring root-level setup (debug, color, update checks) still runs. The help text is properly updated with the experimental notice.
LGTM
The PR correctly implements the experimental warning pattern. The implementation is solid and follows the established convention from cog doctor. The warning is displayed via PersistentPreRun with proper parent command chaining, ensuring it appears for all subcommands (import, pull, status) while preserving the root command's initialization logic.
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
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.
Weights are being used internally and referenced publicly, but the feature is still a WIP. Any
cog weightssubcommand now prints a warning before execution, matching the patterncog doctoruses:Uses
PersistentPreRunon the weights parent command so all subcommands (import, pull, status) get it automatically. Also updated the help text.