Skip to content
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

Refactor/move functions in app to agent #4957

Conversation

collijk
Copy link
Contributor

@collijk collijk commented Jul 12, 2023

Background

We have some functions in autogpt.app that are literally only called by the Agent. I want the autogpt.app namespace for like actual application code.

Changes

  • Moves the two functions that handle commands to the agent module
  • Updates tests
  • Removes an agent fixture that was just used test_agent.py and use the agent fixture defined in the main conftest.py

Documentation

X

Test Plan

CI

PR Quality Checklist

  • My pull request is atomic and focuses on a single change.
  • I have thoroughly tested my changes with multiple different prompts.
  • I have considered potential risks and mitigations for my changes.
  • I have documented my changes clearly and comprehensively.
  • I have not snuck in any "extra" small tweaks changes.
  • I have run the following commands against my code to ensure it passes our linters:
    black .
    isort .
    mypy
    autoflake --remove-all-unused-imports --recursive --ignore-init-module-imports --ignore-pass-after-docstring autogpt tests --in-place

@netlify
Copy link

netlify bot commented Jul 12, 2023

Deploy Preview for auto-gpt-docs canceled.

Name Link
🔨 Latest commit 26343e8
🔍 Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/64af588610d03700084e72cb

@codecov
Copy link

codecov bot commented Jul 13, 2023

Codecov Report

Patch coverage: 39.39% and project coverage change: -0.01 ⚠️

Comparison is base (077e143) 51.01% compared to head (26343e8) 51.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4957      +/-   ##
==========================================
- Coverage   51.01%   51.00%   -0.01%     
==========================================
  Files         119      118       -1     
  Lines        4895     4884      -11     
  Branches      643      643              
==========================================
- Hits         2497     2491       -6     
+ Misses       2217     2212       -5     
  Partials      181      181              
Impacted Files Coverage Δ
autogpt/main.py 23.68% <ø> (ø)
autogpt/agent/agent.py 54.11% <39.39%> (-3.86%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@Pwuts Pwuts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine, aside from the merge conflict it's going to give me on #4799 :P

@collijk collijk merged commit 4177c37 into Significant-Gravitas:master Jul 13, 2023
15 of 16 checks passed
@collijk collijk deleted the refactor/move-functions-in-app-to-agent branch July 13, 2023 02:36
@lc0rp lc0rp added this to the v0.4.5 Release milestone Jul 14, 2023
dayofthedave pushed a commit to dayofthedave/Auto-GPT that referenced this pull request Jul 17, 2023
* Add links to github issues in the README and clarify run instructions

* Move things only used by the agent out of app.py and into the agent module

* Fix busted dynamic import
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants