Commit graph

127 commits

Author SHA1 Message Date
RD
1e0956e60f Byesian analysis implementation 2025-01-17 17:44:24 -08:00
RD
85f3f9a471 Need Numba 0.61.0rc2 for 3.13 support. 2025-01-08 18:47:25 -08:00
RD
c595e51cff Need Numba 0.61.0rc2 for 3.13 support. 2025-01-08 18:45:21 -08:00
RD
4bd3ade70e Need Numba 0.61.0rc2 for 3.13 support. 2025-01-08 18:20:59 -08:00
RD
c24a69dd26 Something is making github sad. 2025-01-08 17:59:34 -08:00
RD
fbab91ab4f Merge branch 'main' of github.com:codeflash-ai/codeflash into bootstrapped-benchmarking 2025-01-08 17:48:29 -08:00
RD
04febc70f5 Now with Numba, 10X faster. 2025-01-08 17:47:52 -08:00
Kevin Turcios
25f9bade47 ignore magic constants warning. 2025-01-07 01:00:19 -05:00
Kevin Turcios
0e9a6540df move to coverage_critic
add tests & fix typing
add tests to the critic
we don't support unittest yet.
2025-01-07 00:28:00 -05:00
Saurabh Misra
aaa2d25001 remove project dependency on black 2024-12-18 12:53:03 -08:00
RD
2214b55394 Removing Returns dependency. 2024-12-16 15:33:48 -08:00
Saurabh Misra
0e41198264
Update cli/pyproject.toml 2024-12-09 19:18:05 -08:00
Saurabh Misra
53f63faaa5 remove black as a dependency 2024-12-09 14:29:37 -08:00
Saurabh Misra
625349fdd5 fix unit tests 2024-12-09 12:26:40 -08:00
Saurabh Misra
09d28b3803 add codecov integration 2024-12-09 12:17:16 -08:00
RD
0896b95020 Stupid poetry. 2024-11-24 21:13:25 -08:00
RD
ff294c4ebb Changes from review comments. 2024-11-24 19:08:34 -08:00
RD
b7a90cf34e Merge branch 'main' of github.com:codeflash-ai/codeflash into couverture
# Conflicts:
#	cli/pyproject.toml
2024-11-22 13:47:30 -08:00
Kevin Turcios
82b9176bea fix validation
fix tests
nuked exclude accidentally

debug, not info
initial cov
add mbr
revert custom test
separate coverage parsing from test run
cleanup
fix return
2024-11-19 01:23:04 -04:00
RD
15028ef126 Initial version change 2024-11-14 16:52:55 -08:00
Kevin Turcios
6b01a8eb05 Merge branch 'main' of https://github.com/codeflash-ai/codeflash into coverage_clean 2024-11-14 14:41:50 -04:00
Kevin Turcios
c1a904aeb6 Merge branch 'main' of https://github.com/codeflash-ai/codeflash into coverage_clean 2024-11-14 12:52:24 -04:00
RD
cbd1b5b97a
Merge branch 'main' into mypy-gha 2024-11-13 15:35:48 -08:00
Saurabh Misra
4a2681f8b9 remove crosshair as a dependency 2024-11-13 14:34:40 -08:00
Sarthak Agarwal
4e01932148
seeding random (#1165)
### **User description**

Closes #
https://linear.app/codeflash-ai/issue/CF-175/account-for-numpyrandom-calls-by-setting-a-seed


___

### **PR Type**
Enhancement, Tests


___

### **Description**
- Enhanced the handling of random number generator (RNG) modules by
adding a dictionary to map modules to their seed-setting functions.
- Improved the visitor pattern to detect RNG imports and set seeds
accordingly in the test instrumentation process.
- Updated existing test cases and added new ones to cover various
scenarios of RNG usage and seed setting.
- Adjusted the indentation and added a caution comment in the optimizer
code regarding loop index handling.



___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>optimizer.py</strong><dd><code>Adjust indentation and
add caution comment in optimizer</code>&nbsp; &nbsp; </dd></summary>
<hr>

cli/codeflash/optimization/optimizer.py

<li>Adjusted the indentation of <code>total_timing</code>
assignment.<br> <li> Added a caution comment about loop index
handling.<br>


</details>


  </td>
<td><a
href="https://github.com/codeflash-ai/codeflash/pull/1165/files#diff-9bbfdc23f4fbf008e5c7d80d4ac3dbb36e757835ef7f868b42d86aad0b29a77b">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>instrument_new_tests.py</strong><dd><code>Enhance RNG
handling and seed setting in test instrumentation</code></dd></summary>
<hr>

django/aiservice/testgen/instrumentation/instrument_new_tests.py

<li>Added a dictionary for RNG modules and their seed functions.<br>
<li> Enhanced the visitor pattern to handle RNG imports and set
seeds.<br> <li> Implemented methods to create seed statements and
process statements <br>recursively.<br>


</details>


  </td>
<td><a
href="https://github.com/codeflash-ai/codeflash/pull/1165/files#diff-b174c49c3e090435474a9548d4d2522d0ac073fc1a2658d6ca97c4c85e9c5adc">+131/-81</a></td>

</tr>
</table></td></tr><tr><td><strong>Tests</strong></td><td><table>
<tr>
  <td>
    <details>

<summary><strong>test_instrument_generated_tests.py</strong><dd><code>Update
and expand test cases for RNG seed handling</code>&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>


django/aiservice/testgen/instrumentation/tests/test_instrument_generated_tests.py

<li>Updated test cases to use new seed setting logic.<br> <li> Added
multiple test cases for different RNG import scenarios.<br> <li>
Modified assertions to reflect changes in seed handling.<br>


</details>


  </td>
<td><a
href="https://github.com/codeflash-ai/codeflash/pull/1165/files#diff-27560015a80c8a9bdf30c40c8e57b65b82312f452a51c11b65ffe2b38ac4bb79">+1113/-8</a></td>

</tr>
</table></td></tr></tr></tbody></table>

___

> 💡 **PR-Agent usage**: Comment `/help "your question"` on any pull
request to receive relevant information

---------

Co-authored-by: Saurabh Misra <misra.saurabh1@gmail.com>
2024-11-13 15:08:33 -05:00
RD
fb3256f317 This is promising. 2024-11-12 22:27:56 -08:00
RD
775e712725 Refactoring to prepare for CrossHair Cover implementation, removing DiffBehavior from processing path. 2024-11-11 18:54:28 -08:00
Kevin Turcios
eed3bd7b65 review impl 2024-11-10 07:34:57 -05:00
Kevin Turcios
59d6724ba0 hello world 2024-11-10 07:34:57 -05:00
RD
8a8cc7f91b Merge branch 'main' of github.com:codeflash-ai/codeflash into Concolicity 2024-11-07 11:33:35 -08:00
Sarthak Agarwal
0aade97af4
add exclude sensitive files from package build (#1190)
### **User description**
Adding files to be excluded while building pypi project or avoiding
sensitive files like .env from check in


___

### **PR Type**
enhancement, configuration changes


___

### **Description**
- Added exclusion rules in `pyproject.toml` files to prevent sensitive
and unnecessary files from being included in the package build.
- Excluded files include sensitive files like `.env` and `.pem`,
development files like `.git` and `Dockerfile`, and unnecessary file
types like `*.log` and `*.db`.
- This enhancement improves the security and cleanliness of the package
distribution.



___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Configuration
changes</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>pyproject.toml</strong><dd><code>Add exclusion rules
for sensitive and unnecessary files</code>&nbsp; &nbsp; </dd></summary>
<hr>

cli/pyproject.toml

<li>Added an <code>exclude</code> section to specify files and
directories to be <br>excluded from the package build.<br> <li> Included
patterns for sensitive files like <code>.env</code>, <code>.pem</code>,
and <code>secrets.*</code>.<br> <li> Excluded common development and
configuration files such as <code>.git</code>,
<br><code>Dockerfile</code>, and <code>.vscode</code>.<br> <li> Excluded
unnecessary file types like <code>*.log</code>, <code>*.tmp</code>, and
<code>*.db</code>.<br>


</details>


  </td>
<td><a
href="https://github.com/codeflash-ai/codeflash/pull/1190/files#diff-0c21298b23605dcadf25950579e3ada906093fa49e7c5f98eaa7f3d816c29d28">+47/-0</a>&nbsp;
&nbsp; </td>

</tr>                    

<tr>
  <td>
    <details>
<summary><strong>pyproject.toml</strong><dd><code>Add exclusion rules
for sensitive and unnecessary files</code>&nbsp; &nbsp; </dd></summary>
<hr>

django/aiservice/pyproject.toml

<li>Added an <code>exclude</code> section to specify files and
directories to be <br>excluded from the package build.<br> <li> Included
patterns for sensitive files like <code>.env</code>, <code>.pem</code>,
and <code>secrets.*</code>.<br> <li> Excluded common development and
configuration files such as <code>.git</code>,
<br><code>Dockerfile</code>, and <code>.vscode</code>.<br> <li> Excluded
unnecessary file types like <code>*.log</code>, <code>*.tmp</code>, and
<code>*.db</code>.<br>


</details>


  </td>
<td><a
href="https://github.com/codeflash-ai/codeflash/pull/1190/files#diff-1cd1f75beb8e70c006a688caffdd71f14a3babb13cc499ca48f499bd530fca1e">+45/-1</a>&nbsp;
&nbsp; </td>

</tr>                    
</table></td></tr></tr></tbody></table>

___

> 💡 **PR-Agent usage**: Comment `/help "your question"` on any pull
request to receive relevant information
2024-11-06 20:44:55 +00:00
RD
c56828ccef Lots of various fixes. 2024-11-01 02:23:59 -07:00
RD
5c3a2e18d0 End-to-end done. 2024-10-31 19:08:20 -07:00
RD
973ae53052 Merge branch 'main' of github.com:codeflash-ai/codeflash into Concolicity
# Conflicts:
#	cli/codeflash/optimization/function_context.py
#	cli/codeflash/optimization/optimizer.py
2024-10-30 01:46:59 -07:00
RD
5259ae3822 WIP diffbehavior support, up to and including full replacement module code for each optimization candidate. Remaining: writing module code to each git worktree, running diffbehavior vs each candidate worktree, collecting results. TODO comment driven programming at its finest. 2024-10-30 01:30:10 -07:00
Kevin Turcios
d9b24d1b84 revert recent django changes
This reverts commit c87ed40c0c.

Revert "add logical retrying for the openai client"

This reverts commit 94a9e8efbf.
2024-10-28 23:22:58 -05:00
Kevin Turcios
c87ed40c0c poetry oof 2024-10-28 23:21:03 -05:00
KRRT7
108aa2ea0d part two 2024-10-28 05:59:24 +00:00
Saurabh Misra
7bfb3dfa4f update formatting rules 2024-10-25 16:24:24 -07:00
Saurabh Misra
29541456f3 add a missing comment 2024-10-25 16:00:14 -07:00
Saurabh Misra
b42c270f9a Ruff reformat and fix all the python files
Set minimum libcst version to be 1.0.1
move the stub files to dev dependencies
2024-10-25 15:45:44 -07:00
RD
f9b1e7e65b Pypi lies, need to downgrade one more time. 2024-10-24 14:58:09 -07:00
RD
2ae14e1d7b Need to downgrade pandas-stub since we are forced to run on Python 3.9. 2024-10-24 14:48:55 -07:00
RD
f65aa08878 Ruff cleanup of code replacer, new stub files added by mypy. 2024-10-24 14:34:07 -07:00
RD
5d48a8807f
Merge branch 'main' into ruffmypyupdates 2024-10-24 03:03:50 -07:00
RD
4c44dba3dd Updating mypy, ruff, libcst. 2024-10-23 14:51:27 -07:00
RD
c9218a1030 Some fixes to PR branch 2024-10-21 02:46:15 -07:00
Saurabh Misra
b1ae593742 Merge branch 'refs/heads/main' into repeat-fast
# Conflicts:
#	cli/codeflash/code_utils/instrument_existing_tests.py
#	cli/codeflash/discovery/functions_to_optimize.py
#	cli/codeflash/optimization/optimizer.py
#	cli/codeflash/verification/parse_test_output.py
#	cli/codeflash/verification/test_results.py
2024-10-07 10:30:52 -07:00
RD
b5283f2cb3 Fixing error processing for baseline function. 2024-10-03 19:10:57 -07:00
RD
d452340560 Fixing more types and argument mismatch (Result can only be used to return a single argument). 2024-10-01 17:27:02 -07:00