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(agent, forge): Move relevant tests from autogpt to forge #7247

Merged
merged 15 commits into from
Jul 4, 2024

Conversation

kcze
Copy link
Contributor

@kcze kcze commented Jun 22, 2024

Background

After refactor #7106, due to coupling tests that should had been moved to forge stayed in autogpt.

Changes 🏗️

  • Move autogpt/tests/vcr_cassettes submodule to forge/tests/vcr_cassettes
  • Remove not needed markers from pyproject.toml: "requires_openai_api_key", "requires_huggingface_api_key"
  • Update relevant GitHub workflows

Moved relevant tests from autogpt/tests to appropiate directories:

  • Component tests to their respective component dirs
  • autogpt/tests/unit/test_web_search.pyforge/components/web/test_search.py
  • autogpt/tests/unit/test_git_commands.pyforge/components/git_operations/test_git_operations.py
  • autogpt/tests/unit/test_file_operations.pyforge/components/file_manager/test_file_manager.py
  • autogpt/tests/integration/test_image_gen.pyforge/components/image_gen/test_image_gen.py
  • autogpt/tests/integration/test_web_selenium.pyforge/components/web/test_selenium.py
  • autogpt/tests/integration/test_execute_code.pyforge/components/code_executor/test_code_executor.py
  • autogpt/tests/unit/test_s3_file_storage.pyforge/file_storage/test_s3_file_storage.py
  • autogpt/tests/unit/test_gcs_file_storage.pyforge/file_storage/test_gcs_file_storage.py
  • autogpt/tests/unit/test_local_file_storage.pyforge/file_storage/test_local_file_storage.py
  • autogpt/tests/unit/test_json.pyforge/json/test_parsing.py
  • autogpt/tests/unit/test_logs.pyforge/logging/test_utils.py
  • autogpt/tests/unit/test_url_validation.pyforge/utils/test_url_validator.py
  • autogpt/tests/unit/test_text_file_parsers.pyforge/utils/test_file_operations.py

Also:

  • Fixed a type error in forge/components/web/test_search.py

PR Quality Scorecard ✨

  • Have you used the PR description template?   +2 pts
  • Is your pull request atomic, focusing on a single change?   +5 pts
  • Have you linked the GitHub issue(s) that this PR addresses?   +5 pts
  • Have you documented your changes clearly and comprehensively?   +5 pts
  • Have you changed or added a feature?   -4 pts
    • Have you added/updated corresponding documentation?   +4 pts
    • Have you added/updated corresponding integration tests?   +5 pts
  • Have you changed the behavior of AutoGPT?   -5 pts
    • Have you also run agbenchmark to verify that these changes do not regress performance?   +10 pts

@kcze kcze requested a review from a team as a code owner June 22, 2024 17:32
@kcze kcze requested review from Bentlybro and aarushik93 and removed request for a team June 22, 2024 17:32
Copy link

netlify bot commented Jun 22, 2024

Deploy Preview for auto-gpt-docs canceled.

Name Link
🔨 Latest commit 114466b
🔍 Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/6685d0be3224ff00085d9588

Copy link

codecov bot commented Jun 22, 2024

Codecov Report

Attention: Patch coverage is 93.44262% with 4 lines in your changes missing coverage. Please review.

Project coverage is 54.21%. Comparing base (7415e24) to head (114466b).

Files Patch % Lines
forge/forge/components/image_gen/test_image_gen.py 66.66% 2 Missing ⚠️
forge/forge/components/web/test_search.py 80.00% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #7247       +/-   ##
===========================================
+ Coverage   25.53%   54.21%   +28.67%     
===========================================
  Files          80      122       +42     
  Lines        4664     6875     +2211     
  Branches      631      881      +250     
===========================================
+ Hits         1191     3727     +2536     
+ Misses       3406     3015      -391     
- Partials       67      133       +66     
Flag Coverage Δ
Linux 53.96% <93.44%> (+28.42%) ⬆️
Windows 50.74% <93.44%> (+25.21%) ⬆️
autogpt-agent 34.01% <ø> (-1.90%) ⬇️
forge 58.63% <93.44%> (+36.95%) ⬆️
macOS 53.26% <93.44%> (+27.72%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kcze kcze requested review from Pwuts and ntindle and removed request for Bentlybro and aarushik93 June 22, 2024 17:34
@github-actions github-actions bot added the conflicts Automatically applied to PRs with merge conflicts label Jun 25, 2024
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 removed the conflicts Automatically applied to PRs with merge conflicts label Jun 25, 2024
Copy link
Contributor

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

forge/forge/components/image_gen/test_image_gen.py Outdated Show resolved Hide resolved
forge/forge/components/web/test_search.py Outdated Show resolved Hide resolved
forge/forge/components/code_executor/__init__.py Outdated Show resolved Hide resolved
autogpt/pyproject.toml Outdated Show resolved Hide resolved
@kcze kcze requested a review from a team as a code owner June 25, 2024 19:11
@github-actions github-actions bot added size/xl and removed size/l labels Jun 25, 2024
@kcze
Copy link
Contributor Author

kcze commented Jun 25, 2024

Server CI build for Ubuntu fails for some reason :(

@kcze kcze requested a review from Pwuts June 25, 2024 20:14
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 27, 2024
@ntindle
Copy link
Member

ntindle commented Jun 27, 2024

Server CI build for Ubuntu fails for some reason :(

That was me sorry! Updating should fix

Copy link
Contributor

github-actions bot commented Jul 3, 2024

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

@github-actions github-actions bot removed the conflicts Automatically applied to PRs with merge conflicts label Jul 3, 2024
@kcze kcze requested a review from Pwuts July 3, 2024 09:26
Copy link
Contributor

github-actions bot commented Jul 3, 2024

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 Jul 3, 2024
Copy link
Contributor

github-actions bot commented Jul 3, 2024

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

@github-actions github-actions bot removed the conflicts Automatically applied to PRs with merge conflicts label Jul 3, 2024
@Pwuts Pwuts enabled auto-merge (squash) July 4, 2024 00:08
@Pwuts Pwuts merged commit 08612cc into master Jul 4, 2024
37 checks passed
@Pwuts Pwuts deleted the kpczerwinski/open-1085-move-tests-to-forge-2 branch July 4, 2024 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants