Repository navigation
Conversation
| raise RuntimeConditionsError("no installed generated binding imports found in workload") | ||
| raise RuntimeConditionsError( | ||
| "no installed generated binding imports found in workload. " | ||
| "Install the generated binding package and import it in your Python source files." |
There was a problem hiding this comment.
I would take this extra line off. Or rephrase it. The way it’s written now it indicates that there is one specific binding package they should install when in reality it could be several
There was a problem hiding this comment.
Agreed! I'll rephrase it to make it clear that multiple generated binding packages may be required.
| "verify-bindings", | ||
| help="verify installed generated bindings without running application or binding code", | ||
| usage=( | ||
| f"{get_command_prefix()} [profile] " |
There was a problem hiding this comment.
I think what you’re trying to convey here is that they may or may not have used the profile command. But this gives the impression that it’s generally optional. In the context of the RC-CLI, it’s not. I wonder if if there is cleaner logic that we could apply here.
There was a problem hiding this comment.
I added it to support both standalone and rc-cli-style invocation, but looking at the integration more closely, profile is already part of the parent CLI command. Apologies, accidentally duplicated something the parent CLI already handles. Will simplify it to accept only its own subcommands and retain RC_COMMAND_PREFIX.
|
I guess I'm confused on the optional use of I'm also curious if this has been tested with the https://github.com/runtimeconditions/rc-cli to see how it impacts those commands, since this is meant to work both independently and as a sub-process called by the CLI. The Testing block doesn't mention that. |
So far, I tested the profiler independently and checked the command-prefix behaviour. I'll test it through the actual rc-cli workflow and update the Testing section with the results. |
Summary
This PR aligns the Python profiler CLI with the shared command conventions requested in
runtimeconditions/rc-cli#16.Changes Made
generateandprofile generatecommand formats.verify-bindingsandprofile verify-bindingscommand formats.--versionand--version --jsonsupport.--workload-versionoptional.--nameand--workload-urias required arguments for profile generation.--jsonsupport for structured errors during generation.runtimeconditions:prefix.RC_COMMAND_PREFIXenvironment variable to provide invocation-aware usage messages.Testing
--version --jsonoutput.generateandverify-bindingshelp.python -m pytest -qgit diff --checkpassed.Related Issue
Aligns with
runtimeconditions/rc-cli#16.Notes
Successful profile generation continues to produce YAML output. The
--jsonoption provides structured error output.