File tree Expand file tree Collapse file tree 3 files changed +40
-0
lines changed Expand file tree Collapse file tree 3 files changed +40
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Codeflash
2
+ on :
3
+ pull_request :
4
+ paths :
5
+ # So that this workflow only runs when code within the target module is modified
6
+ - ' pydantic_ai_slim/pydantic_ai/**'
7
+ workflow_dispatch :
8
+ concurrency :
9
+ # Any new push to the PR will cancel the previous run, so that only the latest code is optimized
10
+ group : ${{ github.workflow }}-${{ github.ref }}
11
+ cancel-in-progress : true
12
+ jobs :
13
+ optimize :
14
+ name : Optimize new Python code
15
+ # Don't run codeflash on codeflash-ai[bot] commits, prevent duplicate optimizations
16
+ if : ${{ github.actor != 'codeflash-ai[bot]' }}
17
+ runs-on : ubuntu-latest
18
+ env :
19
+ CODEFLASH_API_KEY : ${{ secrets.CODEFLASH_API_KEY }}
20
+ steps :
21
+ - name : 🛎️ Checkout
22
+ uses : actions/checkout@v4
23
+ with :
24
+ fetch-depth : 0
25
+ - name : 🐍 Setup UV
26
+ uses : astral-sh/setup-uv@v6
27
+ with :
28
+ enable-cache : true
29
+ - name : 📦 Install Dependencies
30
+ run : uv sync --package pydantic-ai-slim
31
+ - name : ⚡️Codeflash Optimization
32
+ run : uv run codeflash
Original file line number Diff line number Diff line change @@ -103,6 +103,7 @@ dev = [
103
103
" boto3-stubs[bedrock-runtime]" ,
104
104
" strict-no-cover>=0.1.1" ,
105
105
" pytest-xdist>=3.6.1" ,
106
+ " codeflash>=0.15.4"
106
107
]
107
108
108
109
[tool .hatch .metadata ]
Original file line number Diff line number Diff line change @@ -287,3 +287,10 @@ check-hidden = true
287
287
# Ignore "formatting" like **L**anguage
288
288
ignore-regex = ' \*\*[A-Z]\*\*[a-z]+\b'
289
289
ignore-words-list = ' asend,aci'
290
+
291
+ [tool .codeflash ]
292
+ module-root = " pydantic_ai_slim/pydantic_ai"
293
+ tests-root = " tests"
294
+ test-framework = " pytest"
295
+ ignore-paths = []
296
+ formatter-cmds = [" ruff check --exit-zero --fix $file" , " ruff format $file" ]
You can’t perform that action at this time.
0 commit comments