AutoGPT icon indicating copy to clipboard operation
AutoGPT copied to clipboard

Add file op tests

Open rocks6 opened this issue 1 year ago • 8 comments

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

  • [x] My pull request is atomic and focuses on a single change.
  • [x] I have thoroughly tested my changes with multiple different prompts.
  • [x] I have considered potential risks and mitigations for my changes.
  • [x] I have documented my changes clearly and comprehensively.
  • [x] I have not snuck in any "extra" small tweaks changes

rocks6 avatar Apr 17 '23 16:04 rocks6

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

rocks6 avatar Apr 17 '23 16:04 rocks6

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

k-boikov avatar Apr 17 '23 17:04 k-boikov

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

rocks6 avatar Apr 17 '23 21:04 rocks6

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

github-actions[bot] avatar Apr 17 '23 22:04 github-actions[bot]

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

github-actions[bot] avatar Apr 18 '23 14:04 github-actions[bot]

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

github-actions[bot] avatar Apr 19 '23 00:04 github-actions[bot]

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

github-actions[bot] avatar Apr 19 '23 03:04 github-actions[bot]

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.

Pwuts avatar Apr 20 '23 23:04 Pwuts