Commit graph

14 commits

Author SHA1 Message Date
Kevin Turcios
eceac13fc3 Merge remote-tracking branch 'origin/main' into omni-java
# Conflicts:
#	.claude/rules/architecture.md
#	.claude/rules/code-style.md
#	.github/workflows/claude.yml
#	.github/workflows/duplicate-code-detector.yml
#	codeflash/api/aiservice.py
#	codeflash/cli_cmds/console.py
#	codeflash/cli_cmds/logging_config.py
#	codeflash/code_utils/deduplicate_code.py
#	codeflash/discovery/discover_unit_tests.py
#	codeflash/languages/base.py
#	codeflash/languages/code_replacer.py
#	codeflash/languages/javascript/mocha_runner.py
#	codeflash/languages/javascript/support.py
#	codeflash/languages/python/support.py
#	codeflash/optimization/function_optimizer.py
#	codeflash/verification/parse_test_output.py
#	codeflash/verification/verification_utils.py
#	codeflash/verification/verifier.py
#	packages/codeflash/package-lock.json
#	packages/codeflash/package.json
#	tests/languages/javascript/test_support_dispatch.py
#	tests/test_codeflash_capture.py
#	tests/test_languages/test_javascript_test_runner.py
#	tests/test_multi_file_code_replacement.py
2026-03-04 01:52:32 -05:00
Kevin Turcios
b5fab57499 fix: preserve comment position by passing CST module directly to import adder
parse_code_and_prune_cst now returns cst.Module instead of str.
add_needed_imports_from_module accepts cst.Module | str, skipping re-parse
when a Module is passed. This eliminates the string round-trip that caused
comments to migrate from statement leading_lines to Module.header,
resulting in comments appearing above imports instead of at their
original position.
2026-03-03 20:36:52 -05:00
Kevin Turcios
6c4378db51 fix: preserve comment position by passing CST module directly to import adder
parse_code_and_prune_cst now returns cst.Module instead of str.
add_needed_imports_from_module accepts cst.Module | str, skipping re-parse
when a Module is passed. This eliminates the string round-trip that caused
comments to migrate from statement leading_lines to Module.header,
resulting in comments appearing above imports instead of at their
original position.
2026-02-23 01:08:39 -05:00
Kevin Turcios
547c02e8bc refactor: move context extraction modules to languages/python/context/
Move code_context_extractor.py and unused_definition_remover.py from
codeflash/context/ to codeflash/languages/python/context/ and update
all import sites.
2026-02-16 14:49:04 -05:00
misrasaurabh1
198487bf81 format and lint all 2026-01-29 01:39:48 -08: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
8de9cebe90 draft PR for init caching. no instrumentation checks implemented yet 2025-01-13 17:01:52 -08:00
Alvin Ryanputra
a10b399dbe added helpers of helpers into readonly context, and refactored code slightly 2024-12-31 17:19:09 -08:00
Alvin Ryanputra
e10f13a83a added docstring removal 2024-12-26 14:06:05 -08:00
Alvin Ryanputra
693c150262 some refactoring 2024-12-23 12:27:31 -08:00
Alvin Ryanputra
ff3ee74fa6 slight changes, more tests 2024-12-18 10:56:27 -08:00
Alvin Ryanputra
d430d02166 left with mypy for tests 2024-12-18 10:31:47 -08:00
Alvin Ryanputra
14a51d5f1b changed the approach to manipulate the csts directly. still have some mypy errors, will push changes to fix them soon. 2024-12-17 18:27:59 -08:00
Renamed from tests/test_create_ro_context.py (Browse further)