Skip to content

Commit e3054d6

Browse files
Refactor Codebase to Use Abstract Syntax Trees for Code Changes (#19)
* good start * Using AST to change files * passing 25 tests * update * Adding some UX fixes to persist configuration settings * Migrating to openai 1.0 * wtf * Working through testing * update * update * Ugly but working * Returns the correct response from function call. Still nee to refactor and impliment the execute methods * Almost there * This is why we test * add CHANGELOG.md * Update CHANGELOG.md * Delete file --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent e462511 commit e3054d6

27 files changed

+2020
-851
lines changed

.github/workflows/pytest_ubuntu.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,5 @@ jobs:
3030
- name: Run pytest
3131
run: cd backend && python -m pytest
3232
env:
33-
PROJECT_DIRECTORY: ${{ github.workspace }}
33+
PROJECT_DIRECTORY: ${{ github.workspace }}
34+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} # Add this line

.vscode/settings.json

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,16 @@
22
"[python]": {
33
"editor.defaultFormatter": "ms-python.black-formatter"
44
},
5-
"python.linting.flake8Args": [
5+
"python.linting.Flake8": [
66
"--max-line-length=150",
77
"--ignore=E203,F841,F401,E302,E305,W503",
88
],
9-
"python.formatting.provider": "none"
10-
}
9+
"flake8.ignorePatterns": [
10+
"**/site-packages/**/*.py",
11+
".vscode/*.py"
12+
],
13+
"flake8.args": [
14+
"--max-line-length=150",
15+
"--ignore=E203,F841,F401,E302,E305,W503",
16+
],
17+
}

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
## 2023-11-16
2+
3+
### Added
4+
- Introduced Abstract Syntax Trees (ASTs) for making code changes.
5+
- Added a comprehensive suite of unit tests for testing the functionality of the AST operations.
6+
- Added new classes and methods for handling AST operations.
7+
8+
### Changed
9+
- Refactored the main.py file to handle different configuration settings and improve the user experience.
10+
11+
### Removed
12+
- Deleted some old files that are no longer needed due to the refactor.

backend/agent/agent_functions/_shell_commands.py

Lines changed: 0 additions & 152 deletions
This file was deleted.

0 commit comments

Comments
 (0)