Skip to content
Merged
Show file tree
Hide file tree
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
11 changes: 6 additions & 5 deletions .github/workflows/codeflash-optimize.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ concurrency:

jobs:
optimize:
name: Optimize new code in this PR
name: Optimize new Python code
if: ${{ github.actor != 'codeflash-ai[bot]' }}
runs-on: ubuntu-latest
env:
Expand All @@ -22,23 +22,24 @@ jobs:
CODEFLASH_PR_NUMBER: ${{ github.event.number }}
COLUMNS: 110
steps:
- uses: actions/checkout@v4
- name: 🛎️ Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python 3.11 for CLI
- name: 🐍 Set up Python 3.11 for CLI
uses: astral-sh/setup-uv@v5
with:
python-version: 3.11.6

- name: Install dependencies (CLI)
- name: 📦 Install dependencies (CLI)
run: |
uv tool install poetry
uv venv
source .venv/bin/activate
poetry install --with dev

- name: Run Codeflash to optimize code
- name: ⚡️Codeflash Optimization
id: optimize_code
run: |
source .venv/bin/activate
Expand Down
4 changes: 2 additions & 2 deletions codeflash/cli_cmds/cmd_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -504,11 +504,11 @@ def get_dependency_manager_installation_string(dep_manager: DependencyManager) -
py_version = sys.version_info
python_version_string = f"'{py_version.major}.{py_version.minor}'"
if dep_manager == DependencyManager.UV:
return """name: Setup UV
return """name: 🐍 Setup UV
uses: astral-sh/setup-uv@v4
with:
enable-cache: true"""
return f"""name: Set up Python
return f"""name: 🐍 Set up Python
uses: actions/setup-python@v5
with:
python-version: {python_version_string}"""
Expand Down
9 changes: 5 additions & 4 deletions codeflash/cli_cmds/workflows/codeflash-optimize.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ concurrency:

jobs:
optimize:
name: Optimize new Python code in this PR
name: Optimize new Python code
# Don't run codeflash on codeflash-ai[bot] commits, prevent duplicate optimizations
if: ${{ github.actor != 'codeflash-ai[bot]' }}
runs-on: ubuntu-latest
Expand All @@ -24,11 +24,12 @@ jobs:
CODEFLASH_PR_NUMBER: ${{ github.event.number }}
{{ working_directory }}
steps:
- uses: actions/checkout@v4
- name: 🛎️ Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- {{ setup_python_dependency_manager }}
- name: Install Project Dependencies
- name: 📦 Install Dependencies
run: {{ install_dependencies_command }}
- name: Run Codeflash to optimize code
- name: ⚡️Codeflash Optimization
run: {{ codeflash_command }}
Loading