Commit graph

240 commits

Author SHA1 Message Date
Saurabh Misra
f45477d0be add a missing comment 2024-10-25 16:00:14 -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
RD
610a136955 Pypi lies, need to downgrade one more time. 2024-10-24 14:58:09 -07:00
RD
b1f103d208 Need to downgrade pandas-stub since we are forced to run on Python 3.9. 2024-10-24 14:48:55 -07:00
RD
8dd27522b7 Ruff cleanup of code replacer, new stub files added by mypy. 2024-10-24 14:34:07 -07:00
RD
19b214cf0f Merge branch 'main' into ruffmypyupdates 2024-10-24 03:03:50 -07:00
RD
84e56e02ee Updating mypy, ruff, libcst. 2024-10-23 14:51:27 -07:00
RD
fabb9872ae Some fixes to PR branch 2024-10-21 02:46:15 -07:00
Saurabh Misra
babad9c593 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
431548f8ea Fixing error processing for baseline function. 2024-10-03 19:10:57 -07:00
RD
85fcde06c0 Fixing more types and argument mismatch (Result can only be used to return a single argument). 2024-10-01 17:27:02 -07:00
RD
127ee4aafe Going through OS env. 2024-09-30 11:03:42 -07:00
Kevin Turcios
19aacc347e rich hello world 2024-09-26 15:17:16 -07:00
RD
4fbab691b1 Various changes 2024-09-16 12:25:27 -07:00
Saurabh Misra
732f7fc17a Update the dependency spec 2024-08-11 21:04:35 -07:00
Saurabh Misra
6b92abdd67 add a max version 3.14 2024-08-11 17:08:21 -07:00
Saurabh Misra
8b2fc74ccd remove the max python version 2024-08-11 17:01:49 -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
Afik
b1cd6d4d21 Relax returns dep requirement 2024-07-01 12:00:54 -07:00
dependabot[bot]
153a7f5b6e Update returns requirement from ^0.22.0 to >=0.22,<0.24 in /cli
---
updated-dependencies:
- dependency-name: returns
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-01 18:58:40 +00:00
Afik
0dff50b23c Merge branch 'main' into dependabot/pip/cli/ruff-gte-0.5.0-and-lt-0.6.0 2024-07-01 11:57:27 -07:00
dependabot[bot]
00850619bf Update ruff-lsp requirement from ^0.0.53 to >=0.0.53,<0.0.55 in /cli
Updates the requirements on [ruff-lsp](https://github.com/astral-sh/ruff-lsp) to permit the latest version.
- [Release notes](https://github.com/astral-sh/ruff-lsp/releases)
- [Commits](https://github.com/astral-sh/ruff-lsp/compare/v0.0.53...v0.0.54)

---
updated-dependencies:
- dependency-name: ruff-lsp
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-01 13:51:26 +00:00
dependabot[bot]
91be6d9801 Update ruff requirement from >=0.3.5,<0.5.0 to >=0.5.0,<0.6.0 in /cli
Updates the requirements on [ruff](https://github.com/astral-sh/ruff) to permit the latest version.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/v0.3.5...0.5.0)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-01 13:49:35 +00:00
Saurabh Misra
740162e4a6 Factor out the use of sort_imports away from format_code 2024-06-06 13:45:23 -07:00
Saurabh Misra
585a78829f imports sorting always defaults to isort or is disabled 2024-06-04 19:23:11 -07:00
Saurabh Misra
42c44f2575 try poetry run ruff 2024-06-04 17:02:42 -07:00
Saurabh Misra
aaeccd21f8 Allow more complete support for running linters/formatters
We should now support ruff
2024-06-04 16:53:23 -07:00
renaud
05f2fa9f23 Reverting LL to 110. 2024-06-04 13:55:14 -07:00
renaud
006aaa325a licst crash fixin 2024-06-04 12:13:33 -07:00
afik.cohen
ad89bc6a05 Add note about installing poetry plugins 2024-05-31 11:36:06 -07:00
afik.cohen
f4d7896b09 Removed trailing slashes from AI service URLs 2024-05-13 18:12:12 -07:00
Afik
7555d02f16 Merge branch 'main' into optimize-experimentation 2024-05-06 19:42:18 -07:00
afik.cohen
14ec8017c7 Standardize qualified function name keys in functions_to_tests using the format: module_name.nested_module_name.class_name.function.name 2024-05-06 19:32:16 -07:00
Afik
7c4cd23476 Merge branch 'main' into dependabot/pip/cli/ruff-gte-0.3.5-and-lt-0.5.0 2024-05-06 15:41:10 -07:00
dependabot[bot]
74af96c049 Update ruff requirement from ^0.3.5 to >=0.3.5,<0.5.0 in /cli
Updates the requirements on [ruff](https://github.com/astral-sh/ruff) to permit the latest version.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/v0.3.5...v0.4.2)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-01 13:35:15 +00:00
dependabot[bot]
2da929f37c Update sentry-sdk requirement from ^1.40.6 to >=1.40.6,<3.0.0 in /cli
Updates the requirements on [sentry-sdk](https://github.com/getsentry/sentry-python) to permit the latest version.
- [Release notes](https://github.com/getsentry/sentry-python/releases)
- [Changelog](https://github.com/getsentry/sentry-python/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-python/compare/1.40.6...2.0.1)

---
updated-dependencies:
- dependency-name: sentry-sdk
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-01 13:34:05 +00:00
Saurabh Misra
b87db93290 more permissive isort version 2024-04-17 19:07:22 -07:00
Saurabh Misra
ed641f37f0 Use dill as the default serializer 2024-04-17 18:57:43 -07:00
afik.cohen
f3301532d4 Make generate_tests_and_optimizations return a dataclass, simplify Optimization dataclass, update ruff settings 2024-04-11 17:38:34 -07:00
Saurabh Misra
74286b6044 better ruff settings 2024-04-10 14:49:57 -07:00
RD
06e0fe322e Merge branch 'main' into dont-replace-magic 2024-04-09 06:21:14 -07:00
renaud
b092d1b84f WIP, blocked by debugger from fixing last failing test (bubble sort in class). 2024-04-09 05:36:43 -07:00
Saurabh Misra
096c8091d6 Revert to pytest as codeflash's test framework 2024-04-07 17:05:36 -07:00
renaud
d5f1aca9fc Ruff, stop deleting new imports as I type them. 2024-04-05 11:31:22 -07:00
renaud
e2417dfdf3 Workable strictness settings for mypy and ruff, ruff will also format 2024-04-03 15:23:49 -07:00
ihitamandal
781cc7637e Merge remote-tracking branch 'origin/main' into deduplicate-imports 2024-03-28 14:05:39 -07:00
ihitamandal
fa62286fb6 Reformat import sorting code 2024-03-28 12:04:37 -07:00
renaud
f960f63b7d Reverting pytest to 2021 version. 2024-03-26 10:08:03 -07:00
renaud
2009bc3142 Add support for all dunder methods for method to optimize. Clean up more types annotations. 2024-03-25 23:59:29 -07:00
RD
2e54a42b41 Merge branch 'main' into better-main-typing 2024-03-23 19:27:26 -07:00
renaud
1998ffc99f Fix some main typing annotations, include stricter ruff settings. 2024-03-23 19:25:58 -07:00
renaud
0baef1cc43 Fix some main typing annotations, include stricter ruff settings. 2024-03-23 18:59:26 -07:00
afik.cohen
aed187ce34 Add description and license and keywords to toml CF-174 2024-03-21 13:39:36 -07:00
afik.cohen
30544839b4 Reorganize shell operations into shell_utils.py, add returns library for Result monad, fix our python compatibility version line in our toml 2024-03-07 16:33:18 -08:00
afik.cohen
eb2f458fcf Beef up typing for cli init and make things more robust 2024-03-07 12:24:47 -08:00
RD
ad6451da31 Merge branch 'main' into strictest-mypy-settings 2024-03-05 23:27:12 -08:00
renaud
c56372ddba The type annotations must flow. 2024-03-05 22:56:10 -08:00
afik.cohen
002475a39a Merge remote-tracking branch 'origin/main' into afik/more_posthog_for_cli
# Conflicts:
#	cli/codeflash/main.py
2024-03-05 16:39:19 -08:00
afik.cohen
7dd85db06b Enable analytics whoops 2024-03-04 16:50:24 -08:00
afik.cohen
61571f8edb Add an enable_analytics option and respect it. 2024-03-04 16:15:12 -08:00
ihitamandal
8b85759ba9 Resolve merge conflicts 2024-03-04 15:29:50 -08:00
afik.cohen
40d3ae6204 Add sentry to cli 2024-02-29 17:59:34 -08:00
ihitamandal
bd35282b6b Add package and remove extra logging 2024-02-23 10:29:17 -08:00
Saurabh Misra
0b6744c6f3 Make pydantic 1.10 the lowest supported Pydantic version 2024-02-05 19:57:08 -08:00
afik.cohen
48dca8ff50 Stnadardize json parsing to use pydantic json encoder in all cases (in pydantic 1 RootModel does not exist, we use pydantic's json encoder instead.) 2024-02-05 18:47:44 -08:00
afik.cohen
c3d5a07249 Require slightly higher minimum versions for junitparser (because we use junitparser.xunit2) and Black 22.3.0, because versions before that won't work with click 8.1.0. 2024-01-31 17:43:01 -08:00
Saurabh Misra
8400b28c38 Update dependencies 2024-01-31 11:33:31 -08:00
Saurabh Misra
76004e5237 tiktoken more permissive 2024-01-30 20:35:57 -08:00
Saurabh Misra
0ca087a173 WIP dependencies versioning 2024-01-30 19:29:36 -08:00
Saurabh Misra
03e09d7019 Remove tomli as a dependency.
Fix some toml parsing code
2024-01-30 17:00:10 -08:00
afik.cohen
cd93906d7c Use inquirer for module root and test framework questions 2024-01-29 18:16:14 -08:00
Saurabh Misra
e0a255c935 remove unnecessary dependencies 2024-01-26 22:17:07 -08:00
afik.cohen
8fb59512e6 Merge remote-tracking branch 'origin/main' into optimize-all-validation 2024-01-26 16:36:03 -08:00
renaud
97b236015f Remove the definition of the function to optimize from the generated test file, replacing it with a statement. 2024-01-26 05:52:22 -08:00
Saurabh Misra
3847675cc4 Remove the dependency astunparse-fixed 2024-01-25 16:20:27 -08:00
afik.cohen
493d1e8692 Standardize on module-root and tests-root everywhere 2024-01-25 12:51:51 -08:00
Saurabh Misra
6f91d27306 Rename "root" to "module-root" 2024-01-25 12:28:16 -08:00
Saurabh Misra
7e2370024b Fix a long standing pyproject.toml parsing problem.
Some minor improvements
2024-01-24 19:39:08 -08:00
Saurabh Misra
3c725c8b86 Use 1 level up path as the real project root internally 2024-01-24 18:04:08 -08:00
afik.cohen
dd7240775a Autodetect test dir and test framework, also fix black target version 2024-01-24 15:57:50 -08:00
afik.cohen
3309274156 Don't proxy posthog in cfapi after all; just use posthog directly. Get user id from cfapi though, and cache it after the cli gets it once. 2024-01-22 16:59:25 -08:00
ihitamandal
35efc91dbb Add humanize package to pyproject.toml file 2024-01-17 11:44:24 -08:00
Saurabh Misra
6e6096a9b9 Merge pull request #89 from codeflash-ai/unit-test-python-matrix
Add a matrix version of unit-tests and fix Python 3.9
2024-01-13 17:04:28 -08:00
Saurabh Misra
3368f2e9d3 Bump minimum supported Python Version to 3.9 2024-01-13 16:57:16 -08:00
afik.cohen
e7fa798bd5 Rm posthog from cli for now 2024-01-12 19:55:53 -08:00
afik.cohen
54026ce562 Implement Posthog and userid for apikey for aiservice, pass userid down to endpoints, add analytics to /optimize endpoint 2024-01-12 19:27:38 -08:00
afik.cohen
052042e4a2 Add homepage and authors 2024-01-12 17:26:51 -08:00
afik.cohen
d55d9cde1f Dynamically update LICENSE version number 2024-01-12 14:42:42 -08:00
afik.cohen
f2b2f90de1 Fix versioning plugin and syntax warnings for init 2024-01-11 17:58:05 -08:00
afik.cohen
bc50e0d8cb Move codeflash python code base to cli/ 2023-12-29 18:37:49 -08:00