Skip to content

Commit 181ec33

Browse files
Merge pull request codeflash-ai#527 from codeflash-ai/fix-cmd-init
Fix cmd init
2 parents fd6c969 + cf536dc commit 181ec33

File tree

1 file changed

+6
-13
lines changed

1 file changed

+6
-13
lines changed

codeflash/cli_cmds/cmd_init.py

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,8 @@ def init_codeflash() -> None:
105105
usage_table.add_row(
106106
"codeflash --file <path-to-file> --function <function-name>", "Optimize a specific function within a file"
107107
)
108-
usage_table.add_row("codeflash --file <path-to-file>", "Optimize all functions in a file")
109-
usage_table.add_row(
110-
f"codeflash --all{module_string if module_string else ''}", "Optimize all functions in all files"
111-
)
108+
usage_table.add_row("codeflash optimize <myscript.py>", "Trace and find the best optimizations for a script")
109+
usage_table.add_row("codeflash --all", "Optimize all functions in all files")
112110
usage_table.add_row("codeflash --help", "See all available options")
113111

114112
completion_message = "⚡️ Codeflash is now set up!\n\nYou can now run any of these commands:"
@@ -239,7 +237,6 @@ def collect_setup_info() -> SetupInfo:
239237
)
240238
console.print(info_panel)
241239
console.print()
242-
243240
questions = [
244241
inquirer.List(
245242
"module_root",
@@ -274,7 +271,6 @@ def collect_setup_info() -> SetupInfo:
274271
message="Enter the path to your module directory",
275272
path_type=inquirer.Path.DIRECTORY,
276273
exists=True,
277-
normalize_to_absolute_path=False,
278274
)
279275
]
280276

@@ -331,7 +327,7 @@ def collect_setup_info() -> SetupInfo:
331327
elif tests_root_answer == custom_dir_option:
332328
custom_tests_panel = Panel(
333329
Text(
334-
"🧪 Enter a custom test directory path.\n\nPlease provide the path to your test directory.",
330+
"🧪 Enter a custom test directory path.\n\nPlease provide the path to your test directory, relative to the current directory.",
335331
style="yellow",
336332
),
337333
title="🧪 Custom Test Directory",
@@ -342,11 +338,7 @@ def collect_setup_info() -> SetupInfo:
342338

343339
custom_tests_questions = [
344340
inquirer.Path(
345-
"custom_tests_path",
346-
message="Enter the path to your tests directory",
347-
path_type=inquirer.Path.DIRECTORY,
348-
exists=False, # Allow creating new directories
349-
normalize_to_absolute_path=False,
341+
"custom_tests_path", message="Enter the path to your tests directory", path_type=inquirer.Path.DIRECTORY
350342
)
351343
]
352344

@@ -936,7 +928,8 @@ def configure_pyproject_toml(setup_info: SetupInfo) -> None:
936928
codeflash_section["tests-root"] = setup_info.tests_root
937929
codeflash_section["test-framework"] = setup_info.test_framework
938930
codeflash_section["ignore-paths"] = setup_info.ignore_paths
939-
codeflash_section["disable-telemetry"] = not enable_telemetry
931+
if not enable_telemetry:
932+
codeflash_section["disable-telemetry"] = not enable_telemetry
940933
if setup_info.git_remote not in ["", "origin"]:
941934
codeflash_section["git-remote"] = setup_info.git_remote
942935
formatter = setup_info.formatter

0 commit comments

Comments
 (0)