From 9e8125ccb714780ca7915eec7a4d90a07d3a9308 Mon Sep 17 00:00:00 2001 From: Kevin Turcios Date: Wed, 5 Mar 2025 11:53:57 -0800 Subject: [PATCH 1/4] migrate to uv --- codeflash/version.py | 2 +- pyproject.toml | 162 ++++++++++++++++++++----------------------- 2 files changed, 76 insertions(+), 88 deletions(-) diff --git a/codeflash/version.py b/codeflash/version.py index 075de2843..f606c63ad 100644 --- a/codeflash/version.py +++ b/codeflash/version.py @@ -1,3 +1,3 @@ -# These version placeholders will be replaced by poetry-dynamic-versioning during `poetry build`. +# These version placeholders will be replaced by hatch-vcs during build. __version__ = "0.10.3" __version_tuple__ = (0, 10, 3) diff --git a/pyproject.toml b/pyproject.toml index 2e71f2a0a..d6a18c87e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,13 +1,10 @@ -[tool] -[tool.poetry] +[project] name = "codeflash" -version = "0.0.0" # Determined by poetry-dynamic-versioning during `poetry build` description = "Client for codeflash.ai - automatic code performance optimization, powered by AI" -license = "BSL-1.1" -authors = ["CodeFlash Inc. "] -homepage = "https://codeflash.ai" +authors = [{ name = "CodeFlash Inc.", email = "contact@codeflash.ai" }] +requires-python = ">=3.9" readme = "README.md" -packages = [{ include = "codeflash", format = ["sdist"] }] +license = "BUSL-1.1 " keywords = [ "codeflash", "performance", @@ -17,6 +14,68 @@ keywords = [ "machine learning", "LLM", ] +dependencies = [ + "unidiff>=0.7.4", + "pytest>=7.0.0,<8.3.4", + "gitpython>=3.1.31", + "libcst>=1.0.1", + "jedi>=0.19.1", + "tiktoken>=0.3.2", + "timeout-decorator>=0.5.0", + "pytest-timeout>=2.1.0", + "tomlkit>=0.11.7", + "unittest-xml-reporting>=3.2.0", + "junitparser>=3.1.0", + "pydantic>=1.10.1", + "humanize>=4.0.0", + "posthog>=3.0.0,<=3.11.0", + "click>=8.1.0", + "inquirer>=3.0.0", + "sentry-sdk>=1.40.6,<3.0.0", + "parameterized>=0.9.0", + "isort>=5.11.0", + "dill>=0.3.8", + "rich>=13.8.1", + "lxml>=5.3.0", + "crosshair-tool>=0.0.78", + "coverage>=7.6.4", +] + +dynamic = ["version"] # Determined by uv-dynamic-versioning during `uv build`. + +[project.urls] +Homepage = "https://codeflash.ai" + +[project.scripts] +codeflash = "codeflash.main:main" + +[dependency-groups] +dev = [ + "ipython>=8.12.0", + "mypy>=1.13", + "ruff>=0.7.0", + "lxml-stubs>=0.5.1", + "pandas-stubs>=2.2.2.240807, <2.2.3.241009", + "types-Pygments>=2.18.0.20240506", + "types-colorama>=0.4.15.20240311", + "types-decorator>=5.1.8.20240310", + "types-jsonschema>=4.23.0.20240813", + "types-requests>=2.32.0.20241016", + "types-six>=1.16.21.20241009", + "types-cffi>=1.16.0.20240331", + "types-openpyxl>=3.1.5.20241020", + "types-regex>=2024.9.11.20240912", + "types-python-dateutil>=2.9.0.20241003", + "pytest-cov>=6.0.0,<7", + "types-gevent>=24.11.0.20241230,<25", + "types-greenlet>=3.1.0.20241221,<4", + "types-pexpect>=4.9.0.20241208,<5", + "types-unidiff>=0.7.0.20240505,<0.8", + "uv>=0.6.2", +] + +[tool.hatch.build] +include = ["codeflash"] exclude = [ "docs/*", "experiments/*", @@ -65,68 +124,6 @@ exclude = [ "env", ] -# Versions here the minimum required versions for the project. These should be as loose as possible. -[tool.poetry.dependencies] -python = ">=3.9" -unidiff = ">=0.7.4" -pytest = ">=7.0.0,<8.3.4" -gitpython = ">=3.1.31" -libcst = ">=1.0.1" -jedi = ">=0.19.1" -tiktoken = ">=0.3.2" -timeout-decorator = ">=0.5.0" -pytest-timeout = ">=2.1.0" -tomlkit = ">=0.11.7" -unittest-xml-reporting = ">=3.2.0" -junitparser = ">=3.1.0" -pydantic = ">=1.10.1" -humanize = ">=4.0.0" -posthog = ">=3.0.0,<=3.11.0" -click = ">=8.1.0" -inquirer = ">=3.0.0" -sentry-sdk = ">=1.40.6,<3.0.0" -parameterized = ">=0.9.0" -isort = ">=5.11.0" -dill = ">=0.3.8" -rich = ">=13.8.1" -lxml = ">=5.3.0" -crosshair-tool = ">=0.0.78" -coverage = ">=7.6.4" -[tool.poetry.group.dev] -optional = true - -# Don't forget to install the poetry plugins we use too: -# poetry self add poetry-dynamic-versioning - -[tool.poetry.group.dev.dependencies] -ipython = ">=8.12.0" -mypy = ">=1.13" -ruff = ">=0.7.0" -lxml-stubs = ">=0.5.1" -pandas-stubs = ">=2.2.2.240807, <2.2.3.241009" -types-Pygments = ">=2.18.0.20240506" -types-colorama = ">=0.4.15.20240311" -types-decorator = ">=5.1.8.20240310" -types-jsonschema = ">=4.23.0.20240813" -types-requests = ">=2.32.0.20241016" -types-six = ">=1.16.21.20241009" -types-cffi = ">=1.16.0.20240331" -types-openpyxl = ">=3.1.5.20241020" -types-regex = ">=2024.9.11.20240912" -types-python-dateutil = ">=2.9.0.20241003" -pytest-cov = "^6.0.0" -types-gevent = "^24.11.0.20241230" -types-greenlet = "^3.1.0.20241221" -types-pexpect = "^4.9.0.20241208" -types-unidiff = "^0.7.0.20240505" -uv = ">=0.6.2" - -[tool.poetry.build] -script = "codeflash/update_license_version.py" - -[tool.poetry.scripts] -codeflash = "codeflash.main:main" - [tool.mypy] show_error_code_links = true pretty = true @@ -198,22 +195,6 @@ split-on-trailing-comma = false docstring-code-format = true skip-magic-trailing-comma = true -[tool.poetry-dynamic-versioning] -enable = true -style = "pep440" -vcs = "git" - -[tool.poetry-dynamic-versioning.substitution] -files = ["codeflash/version.py"] - -[tool.poetry-dynamic-versioning.files."codeflash/version.py"] -persistent-substitution = true -initial-content = """ - # These version placeholders will be replaced by poetry-dynamic-versioning during `poetry build`. - __version__ = "0.0.0" - __version_tuple__ = (0, 0, 0) -""" - [tool.codeflash] module-root = "codeflash" @@ -224,7 +205,14 @@ formatter-cmds = [ "uvx ruff format $file", ] +[tool.hatch.build.hooks.vcs] +version-file = "codeflash/version.py" + +[tool.hatch.version] +source = "vcs" +tag-pattern = "(?:^|^v|^release/)(?P[0-9]+\\.[0-9]+\\.[0-9]+)$" + [build-system] -requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning>=1.2.0,<2.0.0"] -build-backend = "poetry_dynamic_versioning.backend" +requires = ["hatchling", "hatch-vcs"] +build-backend = "hatchling.build" From d2982cc50b06362b99c28ac8164ac83fed2f4b39 Mon Sep 17 00:00:00 2001 From: Kevin Turcios Date: Mon, 17 Mar 2025 14:33:15 -0700 Subject: [PATCH 2/4] bubble sort --- ...-to-end-test-bubblesort-pytest-no-git.yaml | 23 +++++++++---------- .../end-to-end-test-bubblesort-unittest.yaml | 15 ++++++------ 2 files changed, 18 insertions(+), 20 deletions(-) diff --git a/.github/workflows/end-to-end-test-bubblesort-pytest-no-git.yaml b/.github/workflows/end-to-end-test-bubblesort-pytest-no-git.yaml index 793c07860..305ae88ef 100644 --- a/.github/workflows/end-to-end-test-bubblesort-pytest-no-git.yaml +++ b/.github/workflows/end-to-end-test-bubblesort-pytest-no-git.yaml @@ -22,17 +22,17 @@ jobs: fetch-depth: 0 token: ${{ secrets.GITHUB_TOKEN }} - - name: Set up Python 3.11 for CLI - uses: astral-sh/setup-uv@v5 - with: - python-version: 3.11.6 + # - name: Set up Python 3.11 for CLI + # uses: astral-sh/setup-uv@v5 + # with: + # python-version: 3.11.6 - - name: Install dependencies (CLI) - run: | - uv tool install poetry - uv venv - source .venv/bin/activate - poetry install --with dev + # - name: Install dependencies (CLI) + # run: | + # uv tool install poetry + # uv venv + # source .venv/bin/activate + # poetry install --with dev - name: Remove .git run: | @@ -53,5 +53,4 @@ jobs: - name: Run Codeflash to optimize code id: optimize_code run: | - source .venv/bin/activate - poetry run python tests/scripts/end_to_end_test_bubblesort_pytest.py + uv run -p 3.11 python tests/scripts/end_to_end_test_bubblesort_pytest.py \ No newline at end of file diff --git a/.github/workflows/end-to-end-test-bubblesort-unittest.yaml b/.github/workflows/end-to-end-test-bubblesort-unittest.yaml index 9fcf04f7d..6b7c233b6 100644 --- a/.github/workflows/end-to-end-test-bubblesort-unittest.yaml +++ b/.github/workflows/end-to-end-test-bubblesort-unittest.yaml @@ -27,15 +27,14 @@ jobs: with: python-version: 3.11.6 - - name: Install dependencies (CLI) - run: | - uv tool install poetry - uv venv - source .venv/bin/activate - poetry install --with dev + # - 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 id: optimize_code run: | - source .venv/bin/activate - poetry run python tests/scripts/end_to_end_test_bubblesort_unittest.py \ No newline at end of file + uv run -p 3.11 python tests/scripts/end_to_end_test_bubblesort_unittest.py \ No newline at end of file From 2497c4a1372a93ccb021b3eb95e14f3b54dceba0 Mon Sep 17 00:00:00 2001 From: Kevin Turcios Date: Mon, 17 Mar 2025 14:40:12 -0700 Subject: [PATCH 3/4] all in on uv --- .github/workflows/codeflash-optimize.yaml | 10 +----- ...-to-end-test-bubblesort-pytest-no-git.yaml | 31 +++---------------- .../end-to-end-test-bubblesort-unittest.yaml | 9 +----- .../workflows/end-to-end-test-coverage.yaml | 11 +------ .../end-to-end-test-futurehouse.yaml | 9 +----- .../workflows/end-to-end-test-init-optim.yaml | 9 +----- .../end-to-end-test-tracer-replay.yaml | 10 +----- .../end-to-end-topological-sort-test.yaml | 10 +----- .github/workflows/mypy.yml | 10 +----- .github/workflows/unit-tests.yaml | 8 +---- 10 files changed, 13 insertions(+), 104 deletions(-) diff --git a/.github/workflows/codeflash-optimize.yaml b/.github/workflows/codeflash-optimize.yaml index d08fed61e..1861378bd 100644 --- a/.github/workflows/codeflash-optimize.yaml +++ b/.github/workflows/codeflash-optimize.yaml @@ -31,15 +31,7 @@ jobs: with: python-version: 3.11.6 - - 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 id: optimize_code run: | - source .venv/bin/activate - poetry run codeflash \ No newline at end of file + uv run codeflash \ No newline at end of file diff --git a/.github/workflows/end-to-end-test-bubblesort-pytest-no-git.yaml b/.github/workflows/end-to-end-test-bubblesort-pytest-no-git.yaml index 305ae88ef..29a5a6a9c 100644 --- a/.github/workflows/end-to-end-test-bubblesort-pytest-no-git.yaml +++ b/.github/workflows/end-to-end-test-bubblesort-pytest-no-git.yaml @@ -22,33 +22,10 @@ jobs: fetch-depth: 0 token: ${{ secrets.GITHUB_TOKEN }} - # - name: Set up Python 3.11 for CLI - # uses: astral-sh/setup-uv@v5 - # with: - # python-version: 3.11.6 - - # - name: Install dependencies (CLI) - # run: | - # uv tool install poetry - # uv venv - # source .venv/bin/activate - # poetry install --with dev - - - name: Remove .git - run: | - if [ -d ".git" ]; then - echo ".git directory exists!" - sudo rm -rf .git - if [ -d ".git" ]; then - echo ".git directory still exists after removal attempt!" - exit 1 - else - echo ".git directory successfully removed." - fi - else - echo ".git directory does not exist. Nothing to remove." - exit 1 - fi + - name: Set up uv Python 3.11 for CLI + uses: astral-sh/setup-uv@v5 + with: + python-version: 3.11.6 - name: Run Codeflash to optimize code id: optimize_code diff --git a/.github/workflows/end-to-end-test-bubblesort-unittest.yaml b/.github/workflows/end-to-end-test-bubblesort-unittest.yaml index 6b7c233b6..1ac5c4740 100644 --- a/.github/workflows/end-to-end-test-bubblesort-unittest.yaml +++ b/.github/workflows/end-to-end-test-bubblesort-unittest.yaml @@ -22,18 +22,11 @@ jobs: fetch-depth: 0 token: ${{ secrets.GITHUB_TOKEN }} - - name: Set up Python 3.11 for CLI + - name: Set up uv Python 3.11 for CLI uses: astral-sh/setup-uv@v5 with: python-version: 3.11.6 - # - 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 id: optimize_code run: | diff --git a/.github/workflows/end-to-end-test-coverage.yaml b/.github/workflows/end-to-end-test-coverage.yaml index 91a3faf2d..335143a7f 100644 --- a/.github/workflows/end-to-end-test-coverage.yaml +++ b/.github/workflows/end-to-end-test-coverage.yaml @@ -25,16 +25,7 @@ jobs: with: python-version: 3.11.6 - - name: Install dependencies (CLI) - run: | - uv tool install poetry - uv venv - source .venv/bin/activate - poetry install --with dev - poetry add black # my-best-repo in end_to_end_test_coverage.py is configured to use black - - name: Run Codeflash to optimize code id: optimize_code run: | - source .venv/bin/activate - poetry run python tests/scripts/end_to_end_test_coverage.py \ No newline at end of file + uv run --with black -p 3.11 python tests/scripts/end_to_end_test_coverage.py \ No newline at end of file diff --git a/.github/workflows/end-to-end-test-futurehouse.yaml b/.github/workflows/end-to-end-test-futurehouse.yaml index f0c3ae409..5f492a023 100644 --- a/.github/workflows/end-to-end-test-futurehouse.yaml +++ b/.github/workflows/end-to-end-test-futurehouse.yaml @@ -27,15 +27,8 @@ jobs: with: python-version: 3.11.6 - - 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 id: optimize_code run: | source .venv/bin/activate - poetry run python tests/scripts/end_to_end_test_futurehouse.py \ No newline at end of file + uv run -p 3.11 python tests/scripts/end_to_end_test_futurehouse.py \ No newline at end of file diff --git a/.github/workflows/end-to-end-test-init-optim.yaml b/.github/workflows/end-to-end-test-init-optim.yaml index 5d6bded10..04d06ed5c 100644 --- a/.github/workflows/end-to-end-test-init-optim.yaml +++ b/.github/workflows/end-to-end-test-init-optim.yaml @@ -27,15 +27,8 @@ jobs: with: python-version: 3.11.6 - - 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 id: optimize_code run: | source .venv/bin/activate - poetry run python tests/scripts/end_to_end_test_init_optimization.py \ No newline at end of file + uv run -p 3.11 python tests/scripts/end_to_end_test_init_optimization.py \ No newline at end of file diff --git a/.github/workflows/end-to-end-test-tracer-replay.yaml b/.github/workflows/end-to-end-test-tracer-replay.yaml index 2902575b1..9a8e3502f 100644 --- a/.github/workflows/end-to-end-test-tracer-replay.yaml +++ b/.github/workflows/end-to-end-test-tracer-replay.yaml @@ -27,15 +27,7 @@ jobs: with: python-version: 3.11.6 - - 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 id: optimize_code run: | - source .venv/bin/activate - poetry run python tests/scripts/end_to_end_test_tracer_replay.py \ No newline at end of file + uv run -p 3.11 python tests/scripts/end_to_end_test_tracer_replay.py \ No newline at end of file diff --git a/.github/workflows/end-to-end-topological-sort-test.yaml b/.github/workflows/end-to-end-topological-sort-test.yaml index 76d28b858..7a231db15 100644 --- a/.github/workflows/end-to-end-topological-sort-test.yaml +++ b/.github/workflows/end-to-end-topological-sort-test.yaml @@ -27,15 +27,7 @@ jobs: with: python-version: 3.11.6 - - 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 id: optimize_code run: | - source .venv/bin/activate - poetry run python tests/scripts/end_to_end_test_topological_sort.py \ No newline at end of file + uv run -p 3.11 python tests/scripts/end_to_end_test_topological_sort.py \ No newline at end of file diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml index 83b85d86c..4bf5ebe5e 100644 --- a/.github/workflows/mypy.yml +++ b/.github/workflows/mypy.yml @@ -18,14 +18,6 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v5 - with: - version: "0.5.30" - - - name: install poetry as a tool - run: uv tool install poetry - - - name: install dependencies - run: uvx poetry install --with dev - name: Run mypy on allowlist - run: uvx poetry run mypy --non-interactive --config-file pyproject.toml @mypy_allowlist.txt + run: uv run --all-groups mypy --non-interactive --config-file pyproject.toml @mypy_allowlist.txt diff --git a/.github/workflows/unit-tests.yaml b/.github/workflows/unit-tests.yaml index a1e7da8ea..3d6ff68ca 100644 --- a/.github/workflows/unit-tests.yaml +++ b/.github/workflows/unit-tests.yaml @@ -24,15 +24,9 @@ jobs: uses: astral-sh/setup-uv@v5 with: python-version: ${{ matrix.python-version }} - version: "0.5.30" - - name: install poetry as a tool - run: uv tool install poetry - - - name: install dependencies - run: uvx poetry install --with dev - name: Unit tests - run: uvx poetry run pytest tests/ --cov --cov-report=xml + run: uv run pytest tests/ --cov --cov-report=xml - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v5 From 814c0965e2a41d609c2471d46518248a6f4aba0e Mon Sep 17 00:00:00 2001 From: Kevin Turcios Date: Fri, 4 Apr 2025 01:18:36 -0500 Subject: [PATCH 4/4] all in on uv --- .github/workflows/codeflash-optimize.yaml | 10 +--------- ...end-to-end-test-bubblesort-pytest-no-git.yaml | 16 ++++------------ .../end-to-end-test-bubblesort-unittest.yaml | 9 +-------- .github/workflows/end-to-end-test-coverage.yaml | 11 +---------- .../workflows/end-to-end-test-futurehouse.yaml | 9 +-------- .../workflows/end-to-end-test-init-optim.yaml | 9 +-------- .../workflows/end-to-end-test-tracer-replay.yaml | 10 +--------- .../end-to-end-topological-sort-test.yaml | 10 +--------- .github/workflows/mypy.yml | 10 +--------- .github/workflows/unit-tests.yaml | 8 +------- pyproject.toml | 10 +++------- 11 files changed, 16 insertions(+), 96 deletions(-) diff --git a/.github/workflows/codeflash-optimize.yaml b/.github/workflows/codeflash-optimize.yaml index d08fed61e..1861378bd 100644 --- a/.github/workflows/codeflash-optimize.yaml +++ b/.github/workflows/codeflash-optimize.yaml @@ -31,15 +31,7 @@ jobs: with: python-version: 3.11.6 - - 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 id: optimize_code run: | - source .venv/bin/activate - poetry run codeflash \ No newline at end of file + uv run codeflash \ No newline at end of file diff --git a/.github/workflows/end-to-end-test-bubblesort-pytest-no-git.yaml b/.github/workflows/end-to-end-test-bubblesort-pytest-no-git.yaml index 305ae88ef..2d93df41b 100644 --- a/.github/workflows/end-to-end-test-bubblesort-pytest-no-git.yaml +++ b/.github/workflows/end-to-end-test-bubblesort-pytest-no-git.yaml @@ -22,18 +22,6 @@ jobs: fetch-depth: 0 token: ${{ secrets.GITHUB_TOKEN }} - # - name: Set up Python 3.11 for CLI - # uses: astral-sh/setup-uv@v5 - # with: - # python-version: 3.11.6 - - # - name: Install dependencies (CLI) - # run: | - # uv tool install poetry - # uv venv - # source .venv/bin/activate - # poetry install --with dev - - name: Remove .git run: | if [ -d ".git" ]; then @@ -49,6 +37,10 @@ jobs: echo ".git directory does not exist. Nothing to remove." exit 1 fi + - name: Set up uv Python 3.11 for CLI + uses: astral-sh/setup-uv@v5 + with: + python-version: 3.11.6 - name: Run Codeflash to optimize code id: optimize_code diff --git a/.github/workflows/end-to-end-test-bubblesort-unittest.yaml b/.github/workflows/end-to-end-test-bubblesort-unittest.yaml index 6b7c233b6..1ac5c4740 100644 --- a/.github/workflows/end-to-end-test-bubblesort-unittest.yaml +++ b/.github/workflows/end-to-end-test-bubblesort-unittest.yaml @@ -22,18 +22,11 @@ jobs: fetch-depth: 0 token: ${{ secrets.GITHUB_TOKEN }} - - name: Set up Python 3.11 for CLI + - name: Set up uv Python 3.11 for CLI uses: astral-sh/setup-uv@v5 with: python-version: 3.11.6 - # - 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 id: optimize_code run: | diff --git a/.github/workflows/end-to-end-test-coverage.yaml b/.github/workflows/end-to-end-test-coverage.yaml index 91a3faf2d..335143a7f 100644 --- a/.github/workflows/end-to-end-test-coverage.yaml +++ b/.github/workflows/end-to-end-test-coverage.yaml @@ -25,16 +25,7 @@ jobs: with: python-version: 3.11.6 - - name: Install dependencies (CLI) - run: | - uv tool install poetry - uv venv - source .venv/bin/activate - poetry install --with dev - poetry add black # my-best-repo in end_to_end_test_coverage.py is configured to use black - - name: Run Codeflash to optimize code id: optimize_code run: | - source .venv/bin/activate - poetry run python tests/scripts/end_to_end_test_coverage.py \ No newline at end of file + uv run --with black -p 3.11 python tests/scripts/end_to_end_test_coverage.py \ No newline at end of file diff --git a/.github/workflows/end-to-end-test-futurehouse.yaml b/.github/workflows/end-to-end-test-futurehouse.yaml index f0c3ae409..5f492a023 100644 --- a/.github/workflows/end-to-end-test-futurehouse.yaml +++ b/.github/workflows/end-to-end-test-futurehouse.yaml @@ -27,15 +27,8 @@ jobs: with: python-version: 3.11.6 - - 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 id: optimize_code run: | source .venv/bin/activate - poetry run python tests/scripts/end_to_end_test_futurehouse.py \ No newline at end of file + uv run -p 3.11 python tests/scripts/end_to_end_test_futurehouse.py \ No newline at end of file diff --git a/.github/workflows/end-to-end-test-init-optim.yaml b/.github/workflows/end-to-end-test-init-optim.yaml index 5d6bded10..04d06ed5c 100644 --- a/.github/workflows/end-to-end-test-init-optim.yaml +++ b/.github/workflows/end-to-end-test-init-optim.yaml @@ -27,15 +27,8 @@ jobs: with: python-version: 3.11.6 - - 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 id: optimize_code run: | source .venv/bin/activate - poetry run python tests/scripts/end_to_end_test_init_optimization.py \ No newline at end of file + uv run -p 3.11 python tests/scripts/end_to_end_test_init_optimization.py \ No newline at end of file diff --git a/.github/workflows/end-to-end-test-tracer-replay.yaml b/.github/workflows/end-to-end-test-tracer-replay.yaml index 2902575b1..9a8e3502f 100644 --- a/.github/workflows/end-to-end-test-tracer-replay.yaml +++ b/.github/workflows/end-to-end-test-tracer-replay.yaml @@ -27,15 +27,7 @@ jobs: with: python-version: 3.11.6 - - 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 id: optimize_code run: | - source .venv/bin/activate - poetry run python tests/scripts/end_to_end_test_tracer_replay.py \ No newline at end of file + uv run -p 3.11 python tests/scripts/end_to_end_test_tracer_replay.py \ No newline at end of file diff --git a/.github/workflows/end-to-end-topological-sort-test.yaml b/.github/workflows/end-to-end-topological-sort-test.yaml index 76d28b858..7a231db15 100644 --- a/.github/workflows/end-to-end-topological-sort-test.yaml +++ b/.github/workflows/end-to-end-topological-sort-test.yaml @@ -27,15 +27,7 @@ jobs: with: python-version: 3.11.6 - - 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 id: optimize_code run: | - source .venv/bin/activate - poetry run python tests/scripts/end_to_end_test_topological_sort.py \ No newline at end of file + uv run -p 3.11 python tests/scripts/end_to_end_test_topological_sort.py \ No newline at end of file diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml index 83b85d86c..4bf5ebe5e 100644 --- a/.github/workflows/mypy.yml +++ b/.github/workflows/mypy.yml @@ -18,14 +18,6 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v5 - with: - version: "0.5.30" - - - name: install poetry as a tool - run: uv tool install poetry - - - name: install dependencies - run: uvx poetry install --with dev - name: Run mypy on allowlist - run: uvx poetry run mypy --non-interactive --config-file pyproject.toml @mypy_allowlist.txt + run: uv run --all-groups mypy --non-interactive --config-file pyproject.toml @mypy_allowlist.txt diff --git a/.github/workflows/unit-tests.yaml b/.github/workflows/unit-tests.yaml index a1e7da8ea..3d6ff68ca 100644 --- a/.github/workflows/unit-tests.yaml +++ b/.github/workflows/unit-tests.yaml @@ -24,15 +24,9 @@ jobs: uses: astral-sh/setup-uv@v5 with: python-version: ${{ matrix.python-version }} - version: "0.5.30" - - name: install poetry as a tool - run: uv tool install poetry - - - name: install dependencies - run: uvx poetry install --with dev - name: Unit tests - run: uvx poetry run pytest tests/ --cov --cov-report=xml + run: uv run pytest tests/ --cov --cov-report=xml - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v5 diff --git a/pyproject.toml b/pyproject.toml index d6a18c87e..057bfea0b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,14 +40,10 @@ dependencies = [ "crosshair-tool>=0.0.78", "coverage>=7.6.4", ] +urls = { "Homepage" = "https://codeflash.ai" } +scripts = { codeflash = "codeflash.main:main" } -dynamic = ["version"] # Determined by uv-dynamic-versioning during `uv build`. - -[project.urls] -Homepage = "https://codeflash.ai" - -[project.scripts] -codeflash = "codeflash.main:main" +dynamic = ["version"] # Determined by uv-dynamic-versioning during `uv build` [dependency-groups] dev = [