aseembits93
85ce164d6a
rstrip for comparing strings
2025-06-06 13:41:34 -07:00
aseembits93
6abb3df8ef
1 test failing
2025-06-06 13:24:17 -07:00
Aseem Saxena
62909dbc19
Update tests/test_code_replacement.py
2025-06-06 13:19:39 -07:00
aseembits93
0be74c4d52
Ready to review
2025-06-06 13:18:58 -07:00
aseembits93
c93b80e87b
Ready to review
2025-06-06 13:11:07 -07:00
aseembits93
a65569cfa0
tests
2025-06-06 12:30:30 -07:00
Saurabh Misra
14409f7a23
Revert helper functions definitions when they are not used anymore in the optimized FTO
2025-06-05 22:40:09 -07:00
aseembits93
6db4199cec
quick fix
2025-05-01 16:47:52 -07:00
aseembits93
44d9229eea
assignments with if/else blocks are not modified
2025-05-01 16:02:20 -07:00
aseembits93
b7d01a8f74
more tests
2025-05-01 15:30:41 -07:00
aseembits93
0cbd20451f
more tests with different positions of global variables and multiple reassignments
2025-05-01 15:25:50 -07:00
aseembits93
28596b7b55
refactoring to run only for code replacement before PR/behavior instead of code context extraction
2025-04-30 19:46:29 -07:00
aseembits93
3da7b739de
undoing some test modifications
2025-04-30 19:20:13 -07:00
aseembits93
abbaec3b5e
tests work now
2025-04-30 18:14:00 -07:00
aseembits93
18c989537e
still testing
2025-04-30 16:32:43 -07:00
aseembits93
38f0253c41
duplicate global statements need to be handled
2025-04-29 18:54:54 -07:00
aseembits93
08c8067630
some tests failing now
2025-04-29 18:34:40 -07:00
Alvin Ryanputra
ed55d88d2b
updated other tests
2025-04-17 18:58:28 -04:00
Alvin Ryanputra
274f98b209
changed preexisting objects to be a set. removes duplicates naturally and makes it easier to search for matches when replacing code.
2025-03-13 18:52:11 -07:00
Alvin Ryanputra
302e919941
Modified testgen context to be a codestring instead of markdown
2025-03-10 16:15:34 -07:00
Alvin Ryanputra
17a42a218c
Implemented testgen context retrieval. Context retrieved is the union of read-writable code and read-only code. Did some refactors to remove code_to_optimize_with_helpers, and updated tests.
2025-03-05 16:40:23 -08:00
Alvin Ryanputra
8e8258a99f
shifted PR to new repo. refactors optimizer code into a FunctionOptimizer class
2025-02-13 16:10:53 +08:00
Alvin Ryanputra
69d68bd468
fixes
2025-01-25 07:23:35 +08:00
Alvin Ryanputra
c230a8a4db
fixed tests
2025-01-24 13:10:06 +08:00
Alvin Ryanputra
07d15688eb
now FunctionOptimizer only needs two arguments to set up. much easier for testing
2025-01-24 09:01:26 +08:00
Alvin Ryanputra
741f95ad0a
Changed verification type names, improved tests
2025-01-23 09:10:32 -08:00
Alvin Ryanputra
7e2bc47c13
updated some functions to fix import issue, and minor improvements.
2025-01-14 10:22:27 -08:00
Alvin Ryanputra
8de9cebe90
draft PR for init caching. no instrumentation checks implemented yet
2025-01-13 17:01:52 -08:00
Alvin Ryanputra
c41f710f5f
Modified code replacer to work file by file. now compatible with new code context extractor.
2025-01-08 14:56:53 -08:00
Saurabh Misra
9172c6b9d4
WIP changes
2024-10-29 16:39:47 -07:00
Saurabh Misra
d455cdee1a
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
Saurabh Misra
d8f72da903
fix the tests
2024-10-23 18:55:24 -07:00
RD
07d00ae279
Remove docstrings and all imports before testing for zero diffs.
2024-10-16 22:40:34 -07:00
RD
5c1807c629
Fixing mismatched types, stringifications.
2024-10-14 15:29:01 -07:00
Kevin Turcios
87bfc79f39
ruff's
...
ruff format
ruff run
2024-10-12 19:43:48 -05:00
Kevin Turcios
5cd94cdf64
round 1
2024-10-12 17:29:15 -05:00
RD
ea5f5c490f
Keep optimized decorators.
2024-07-30 16:35:32 -07:00
RD
50be4824e4
Unoptimized signatures restored.
2024-07-30 03:07:21 -07:00
RD
7dbb3fda05
Fix all import zombies.
2024-07-29 05:01:49 -07:00
RD
f993500610
Copy and pickle, fix __future__ aliased imports below docstrings.
2024-07-26 04:46:55 -07:00
RD
dcd93e348c
Merge branch 'main' into fight-the-future
2024-07-11 05:49:50 -07:00
RD
c2e4e03b20
libcst hates aliased __future__ imports
2024-07-11 05:28:56 -07:00
Saurabh Misra
71bcd07be3
- Fix is_zero_diff checker by using ast.unparse rather than ast.dump
...
- If only the imports are different then it is still 0 diff
- add test cases
- Codeflash does not support Python 3.13 yet. I saw pydantic crash while installing codeflash on 3.13 python
2024-07-09 20:38:36 -07:00
Saurabh Misra
6e318049a5
Fix test
2024-07-09 17:26:02 -07:00
Saurabh Misra
be38b46e1e
Fix the logic to get pre-existing objects from the code to optimize
...
Fixes the bug ivan ran into
2024-07-09 17:22:30 -07:00
Saurabh Misra
91eef8337e
Fix helper class code replacement
...
refactor code
2024-07-09 16:32:23 -07:00
RD
b0ba6b384b
Restore and add tests, small fix.
2024-06-22 19:39:15 -07:00
RD
eb5168a3f8
Formatting clean-up.
2024-06-21 17:43:05 -07:00
RD
0fbb09ee1c
Another replacment mole bites the dust.
2024-06-21 16:43:43 -07:00
Saurabh Misra
e669598f1e
try to repro the code replacement bug
2024-06-17 18:27:13 -07:00