-
Notifications
You must be signed in to change notification settings - Fork 22
Add option to enable/disable telemetry in codeflash init (CF-623) #185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
The PR adds an option to enable or disable telemetry during the Codeflash initialization process and updates versioning information.
- Updates version strings in codeflash/version.py
- Imports and integrates a new telemetry prompt in main.py and cmd_init.py
- Stores the telemetry choice in pyproject.toml via a new configuration key
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| codeflash/version.py | Updates version strings and version tuple format |
| codeflash/main.py | Imports the new telemetry prompt function |
| codeflash/cli_cmds/cmd_init.py | Adds telemetry prompt call and writes telemetry setting to toml |
Comments suppressed due to low confidence (2)
codeflash/cli_cmds/cmd_init.py:688
- [nitpick] Using the key 'disable-telemetry' with a negated value may be confusing. Consider renaming the key to 'telemetry-enabled' to directly reflect the user's choice.
codeflash_section["disable-telemetry"] = not enable_telemetry
codeflash/version.py:3
- Changing version_tuple to include non-integer values may impact consumers that expect a numeric tuple. Consider documenting this change in the changelog or confirming that all version consumers handle the new format properly.
__version_tuple__ = (0, 12, 2, "post2", "dev0", "b6bbeecc")
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
User description
Prompt the user to turn telemetry on or off, and store setting in pyproject.toml.
PR Type
Enhancement
Description
Prompt user to enable or disable telemetry
Store
disable-telemetrysetting inpyproject.tomlAdd
ask_for_telemetryhelper function using Rich ConfirmBump version to
0.12.2.post2.dev0+b6bbeeccChanges walkthrough 📝
cmd_init.py
Add telemetry prompt and config storagecodeflash/cli_cmds/cmd_init.py
ask_for_telemetryfunction prompting via Richask_for_telemetryinconfigure_pyproject_tomldisable-telemetryflag inpyproject.tomlmain.py
Import telemetry prompt in maincodeflash/main.py
ask_for_telemetryin entrypointversion.py
Bump version to post2.dev0+b6bbeecccodeflash/version.py
__version__string to include post2.dev0__version_tuple__accordingly