-
Notifications
You must be signed in to change notification settings - Fork 44.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move all application code to an application subpackage #5026
Conversation
✅ Deploy Preview for auto-gpt-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
We are failing on rate limit errors :-( |
That would mean the PR introduces prompting changes, otherwise it would use the cassettes and not encounter this issue. |
…o refactor/move-app-code-to-app-subpackage
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #5026 +/- ##
=========================================
Coverage ? 51.03%
=========================================
Files ? 119
Lines ? 4961
Branches ? 662
=========================================
Hits ? 2532
Misses ? 2234
Partials ? 195
☔ View full report in Codecov by Sentry. |
This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request. |
Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I think we moved the working_directory again when we moved this file one level down into the app directory
Line 132: working_directory=Path(file).parent.parent
Background
This is a redo of #4962 now that we've merged #4799. I've limited the scope here a bit more so that I'm not introducing any logic changes in this PR. Goals:
autogpt.app
subpackageautogpt.app
references code insideautogpt.app
(The app depends on the library but not the other way around).autogpt.app
referenceslogger.typewriter_log
(our defacto UI tool).This is an almost complete success. The only code that imports from
autogpt.app
is test code (fine, we can segregate test suites later). There is one instance of an invocation oflogger.typewriter_log
in the creation of the default prompt generator which would have required much more in depth changes than moving files or functions between files, so I left it for a separate PR.This doesn't make the app code clean. It's pretty much a disaster in there. But now it's a disaster all in one pile that we can carefully sort through.
Changes
autogpt.cli
->autogpt.app.cli
autogpt.configurator
->autogpt.app.configurator
autogpt.main
->autogpt.app.main
autogpt.main.COMMAND_CATEGORIES
->autogpt.commands.COMMAND_CATEGORIES
autogpt.llm.utils.check_model
->autogpt.app.configurator.check_model
autogpt.logs.utils.*
->autogpt.app.main.*
autogpt.prompts.prompt.construct_main_ai_config
->autogpt.app.main.construct_main_ai_config
main.py
tests.py
Documentation
X
Test Plan
CI + Manual testing
PR Quality Checklist