Skip to content

cf_install for all dep managers #71

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions codeflash/cli_cmds/cmd_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ def check_for_toml_or_setup_file() -> str | None:
return cast(str, project_name)


def install_github_actions(override_formatter_check: bool=False) -> None:
def install_github_actions(override_formatter_check: bool = False) -> None:
try:
config, config_file_path = parse_config_file(override_formatter_check=override_formatter_check)

Expand Down Expand Up @@ -490,9 +490,12 @@ def get_dependency_installation_commands(dep_manager: DependencyManager) -> tupl
return """|
python -m pip install --upgrade pip
pip install poetry
poetry install --all-extras"""
poetry install --all-extras
poetry add codeflash"""
Copy link
Contributor

Choose a reason for hiding this comment

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

this modifies the dependencies spec, and adds codeflash in the required set of dependencies. This is wrong to do in the CI

Copy link
Contributor

Choose a reason for hiding this comment

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

why is it wrong to do so?

if dep_manager == DependencyManager.UV:
return "uv sync --all-extras"
return """|
uv sync --all-extras
uv pip install codeflash"""
Copy link
Contributor

Choose a reason for hiding this comment

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

it is expected that codeflash is already added in the dev time dependency. We should not re-install codeflash...

Copy link
Contributor

@aseembits93 aseembits93 Mar 25, 2025

Choose a reason for hiding this comment

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

try doing 'uv run' with absolute path? the path you get after running which codeflash

# PIP or UNKNOWN
return """|
python -m pip install --upgrade pip
Expand Down
Loading