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

Add file op tests #2205

Merged
merged 11 commits into from
Apr 22, 2023
Merged

Add file op tests #2205

merged 11 commits into from
Apr 22, 2023

Conversation

rocks6
Copy link
Contributor

@rocks6 rocks6 commented Apr 17, 2023

Background

Added file operations tests, to combat the increasing number of modifications to this file which break file io

Changes

Add and test file ops

Documentation

Lightly documented tests, but mostly self documenting - feel free to call for revisions if necessary

Test Plan

Ran new unit tests

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

@rocks6
Copy link
Contributor Author

rocks6 commented Apr 17, 2023

CI is red due to the use of is_relative_to here https://github.com/Significant-Gravitas/Auto-GPT/blob/5802f17726e69d4a764254c4f3d6a259aa410839/autogpt/workspace.py#L38, which only exists in 3.9+

unsure how to resolve this

@k-boikov
Copy link
Contributor

CI is red due to the use of is_relative_to here

https://github.com/Significant-Gravitas/Auto-GPT/blob/5802f17726e69d4a764254c4f3d6a259aa410839/autogpt/workspace.py#L38

, which only exists in 3.9+
unsure how to resolve this

"Use the Force, Luke"
image

@rocks6
Copy link
Contributor Author

rocks6 commented Apr 17, 2023

I tried that before, but it was rejected as someone didn't like the fact that I was updating to an older method call. Let's try again

@github-actions github-actions bot added the conflicts Automatically applied to PRs with merge conflicts label Apr 17, 2023
@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 removed the conflicts Automatically applied to PRs with merge conflicts label Apr 18, 2023
@github-actions
Copy link
Contributor

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

@github-actions github-actions bot added the conflicts Automatically applied to PRs with merge conflicts label Apr 19, 2023
@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 removed the conflicts Automatically applied to PRs with merge conflicts label Apr 19, 2023
@github-actions
Copy link
Contributor

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

@Pwuts Pwuts added the testing label Apr 20, 2023
@Pwuts
Copy link
Member

Pwuts commented Apr 20, 2023

CI is red due to the use of is_relative_to here, which only exists in 3.9+
unsure how to resolve this

We resolved it by requiring Python 3.10+. Pathlib unfortunately wasn't the only one breaking on older Python versions.

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.

Thanks a lot! A few tweak requests below.

autogpt/workspace.py Outdated Show resolved Hide resolved
tests/unit/test_file_operations.py Outdated Show resolved Hide resolved
autogpt/commands/file_operations.py Outdated Show resolved Hide resolved
@Pwuts Pwuts self-assigned this Apr 20, 2023
@Pwuts Pwuts merged commit 3ab67e7 into Significant-Gravitas:master Apr 22, 2023
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