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

Fix type of Config.plugins as AutoGPTPluginTemplate #4924

Merged

Conversation

Pwuts
Copy link
Member

@Pwuts Pwuts commented Jul 8, 2023

Background

Part of #4799

The plugins attribute of the Config object is incorrectly typed as list[str].

Changes

  • Change type of Config.plugins from list[str] to list[AutoGPTPluginTemplate]
  • Add arbitrary_types_allowed=True to Config
  • Add validator for plugins attribute

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

@github-actions github-actions bot added the size/m label Jul 8, 2023
@netlify
Copy link

netlify bot commented Jul 8, 2023

Deploy Preview for auto-gpt-docs canceled.

Name Link
🔨 Latest commit 40ee6f0
🔍 Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/64aaf5824c8f1500082a7fc5

@Pwuts Pwuts added the code quality ⬆️ PRs that improve code quality label Jul 8, 2023
@Pwuts Pwuts requested a review from collijk July 8, 2023 21:18
@Pwuts Pwuts added this to the v0.4.5 Release milestone Jul 8, 2023
@codecov
Copy link

codecov bot commented Jul 8, 2023

Codecov Report

Patch coverage: 72.72% and no project coverage change.

Comparison is base (f6da992) 50.55% compared to head (2b21929) 50.56%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4924   +/-   ##
=======================================
  Coverage   50.55%   50.56%           
=======================================
  Files         116      115    -1     
  Lines        4860     4796   -64     
  Branches      657      636   -21     
=======================================
- Hits         2457     2425   -32     
+ Misses       2219     2195   -24     
+ Partials      184      176    -8     
Impacted Files Coverage Δ
autogpt/config/config.py 81.76% <70.00%> (-1.25%) ⬇️
autogpt/agent/__init__.py 100.00% <100.00%> (ø)

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

@Auto-GPT-Bot
Copy link
Contributor

You changed AutoGPT's behaviour. The cassettes have been updated and will be merged to the submodule when this Pull Request gets merged.

@Auto-GPT-Bot
Copy link
Contributor

You changed AutoGPT's behaviour. The cassettes have been updated and will be merged to the submodule when this Pull Request gets merged.

@collijk collijk merged commit 1e756ed into Significant-Gravitas:master Jul 9, 2023
@Pwuts Pwuts deleted the cq/fix-config-plugins-type branch July 9, 2023 18:05
Alaaelmziat pushed a commit to Alaaelmziat/Auto-GPT that referenced this pull request Jul 12, 2023
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.

3 participants