Skip to content

Add verbose parameter#5

Merged
eyalzh merged 1 commit intomainfrom
add-verbose-cli-option
Aug 10, 2025
Merged

Add verbose parameter#5
eyalzh merged 1 commit intomainfrom
add-verbose-cli-option

Conversation

@eyalzh
Copy link
Owner

@eyalzh eyalzh commented Aug 10, 2025

No description provided.

@eyalzh eyalzh requested a review from Copilot August 10, 2025 13:36
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a verbose parameter (--verbose or -v) to the create-spec command to enable detailed logging output. The change allows users to control the verbosity of the command's output, replacing direct print statements with configurable logging.

  • Add --verbose flag to the create-spec command line interface
  • Replace print statements with logging calls that respect the verbose setting
  • Update all test cases to use the --verbose flag for consistent test behavior

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
cxk.py Adds the --verbose argument to the CLI parser and passes it to the handler
commands/create_spec.py Implements verbose logging functionality using Python's logging module
tests/e2e/test_e2e.py Updates all test cases to include the --verbose flag and adjusts output parsing logic
tests/README.md Adds example usage documentation for the new verbose flag
Comments suppressed due to low confidence (2)

tests/e2e/test_e2e.py:409

  • Similar to the previous case, the assertion for 'Rendered template saved to:' message was removed, reducing test coverage for the verbose output functionality with relative output paths.
        assert output_file.exists()

logging.info(f"Rendered template saved to: {output_path}")
else:
print("\nRendered template:")
logging.debug("\nRendered template:")
Copy link

Copilot AI Aug 10, 2025

Choose a reason for hiding this comment

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

The logging.debug call will not output anything when verbose=True because the log level is set to DEBUG, but this specific message uses debug level. This should be logging.info to be visible in verbose mode, or the rendered content should be output directly to stdout without a label when not in verbose mode.

Suggested change
logging.debug("\nRendered template:")
logging.info("\nRendered template:")

Copilot uses AI. Check for mistakes.
@eyalzh eyalzh merged commit d74cbb3 into main Aug 10, 2025
1 check passed
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