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

Pass config everywhere in order to get rid of singleton #4666

Conversation

waynehamadi
Copy link
Contributor

@waynehamadi waynehamadi commented Jun 12, 2023

Background

Pass config everywhere in order to get rid of singleton

Changes

  • passed config everywhere
  • docstrings
  • some cleanup with a unittest that is now a pytest test (was necessary to get the config fixture)

Documentation

Test Plan

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

@vercel
Copy link

vercel bot commented Jun 12, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
docs ⬜️ Ignored (Inspect) Visit Preview Jun 12, 2023 3:16pm

@vercel vercel bot temporarily deployed to Preview June 12, 2023 03:16 Inactive
@netlify
Copy link

netlify bot commented Jun 12, 2023

Deploy Preview for auto-gpt-docs ready!

Name Link
🔨 Latest commit ab0075b
🔍 Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/648fb6822d474d000824d76f
😎 Deploy Preview https://deploy-preview-4666--auto-gpt-docs.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@waynehamadi waynehamadi force-pushed the pass-config-everywhere-step-1 branch 2 times, most recently from f101cc8 to 8cec413 Compare June 12, 2023 14:49
@github-actions github-actions bot added size/xl and removed size/l labels Jun 12, 2023
@github-actions
Copy link
Contributor

This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.

@waynehamadi waynehamadi changed the title Pass config everywhere step 1 Pass config everywhere in order to get rid of singleton Jun 12, 2023
Copy link
Member

@ntindle ntindle left a comment

Choose a reason for hiding this comment

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

This is going to sound insane but rename all variables that you update to be passed configs to config from cfg so that they’re easier to identify separately

@waynehamadi waynehamadi force-pushed the pass-config-everywhere-step-1 branch from 8cec413 to 446cfca Compare June 12, 2023 15:01
@github-actions
Copy link
Contributor

This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.

@waynehamadi waynehamadi force-pushed the pass-config-everywhere-step-1 branch from 446cfca to 0c1d57d Compare June 12, 2023 15:12
@github-actions
Copy link
Contributor

This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.

@waynehamadi waynehamadi force-pushed the pass-config-everywhere-step-1 branch from 0c1d57d to 99da272 Compare June 12, 2023 15:16
@github-actions
Copy link
Contributor

This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.

@codecov
Copy link

codecov bot commented Jun 12, 2023

Codecov Report

Patch coverage: 59.09% and project coverage change: -0.20 ⚠️

Comparison is base (0b6fec4) 71.32% compared to head (997f063) 71.12%.

❗ Current head 997f063 differs from pull request most recent head ab0075b. Consider uploading reports for the commit ab0075b to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4666      +/-   ##
==========================================
- Coverage   71.32%   71.12%   -0.20%     
==========================================
  Files          68       68              
  Lines        3309     3235      -74     
  Branches      528      516      -12     
==========================================
- Hits         2360     2301      -59     
+ Misses        787      771      -16     
- Partials      162      163       +1     
Impacted Files Coverage Δ
autogpt/commands/task_statuses.py 100.00% <ø> (ø)
autogpt/json_utils/utilities.py 76.47% <0.00%> (-0.68%) ⬇️
autogpt/llm/utils/__init__.py 49.18% <0.00%> (-0.03%) ⬇️
autogpt/memory/vector/utils.py 83.33% <ø> (-0.54%) ⬇️
autogpt/commands/web_selenium.py 54.20% <12.50%> (ø)
autogpt/prompts/prompt.py 45.65% <15.00%> (-1.16%) ⬇️
autogpt/main.py 22.07% <20.00%> (ø)
autogpt/logs.py 74.23% <33.33%> (+0.15%) ⬆️
autogpt/processing/text.py 33.96% <33.33%> (-0.62%) ⬇️
autogpt/agent/agent.py 58.90% <42.85%> (ø)
... and 24 more

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

@waynehamadi waynehamadi force-pushed the pass-config-everywhere-step-1 branch 2 times, most recently from f4fa70a to 76597c1 Compare June 12, 2023 22:56
@github-actions
Copy link
Contributor

This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.

@waynehamadi waynehamadi force-pushed the pass-config-everywhere-step-1 branch from 76597c1 to 3100d93 Compare June 12, 2023 22:59
@github-actions
Copy link
Contributor

This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.

@waynehamadi waynehamadi force-pushed the pass-config-everywhere-step-1 branch from 3100d93 to 1481737 Compare June 12, 2023 22:59
@github-actions
Copy link
Contributor

This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.

@waynehamadi waynehamadi force-pushed the pass-config-everywhere-step-1 branch from 1481737 to dcc5634 Compare June 12, 2023 23:13
@waynehamadi waynehamadi marked this pull request as draft June 13, 2023 01:07
@github-actions
Copy link
Contributor

This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.

@github-actions github-actions bot added the conflicts Automatically applied to PRs with merge conflicts label Jun 13, 2023
@waynehamadi waynehamadi force-pushed the pass-config-everywhere-step-1 branch from dcc5634 to 15763d8 Compare June 18, 2023 22:49
@github-actions github-actions bot removed the conflicts Automatically applied to PRs with merge conflicts label Jun 18, 2023
@github-actions
Copy link
Contributor

Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly.

@github-actions
Copy link
Contributor

This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.

@waynehamadi waynehamadi force-pushed the pass-config-everywhere-step-1 branch from 15763d8 to 5dc5467 Compare June 18, 2023 23:01
@github-actions
Copy link
Contributor

This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.

@waynehamadi waynehamadi force-pushed the pass-config-everywhere-step-1 branch from 5dc5467 to 2a4f291 Compare June 19, 2023 00:08
@github-actions
Copy link
Contributor

This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.

@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.

@waynehamadi waynehamadi force-pushed the pass-config-everywhere-step-1 branch from 2a4f291 to 997f063 Compare June 19, 2023 00:14
@github-actions
Copy link
Contributor

This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.

@waynehamadi waynehamadi force-pushed the pass-config-everywhere-step-1 branch from 997f063 to 5612d68 Compare June 19, 2023 00:46
@github-actions
Copy link
Contributor

This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.

@waynehamadi waynehamadi force-pushed the pass-config-everywhere-step-1 branch from 5612d68 to 5d41c96 Compare June 19, 2023 00:50
@github-actions
Copy link
Contributor

This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.

@waynehamadi waynehamadi marked this pull request as ready for review June 19, 2023 01:25
Signed-off-by: Merwane Hamadi <merwanehamadi@gmail.com>
@waynehamadi waynehamadi force-pushed the pass-config-everywhere-step-1 branch from 5d41c96 to ab0075b Compare June 19, 2023 01:59
@github-actions
Copy link
Contributor

This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants