-
Notifications
You must be signed in to change notification settings - Fork 17
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
[v1.27.0] Tests: IPFS download #502
Conversation
|
||
if is_dir: | ||
assert len(all_new_paths) == 4 | ||
assert not any(self.some_ipfs_hash in str(p) for p in all_new_paths) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because we default to fix_path = True
"shutil.copytree" | ||
"shutil.copy" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this mock was hiding an issue
Codecov ReportBase: 90.29% // Head: 90.30% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #502 +/- ##
=======================================
Coverage 90.29% 90.30%
=======================================
Files 352 352
Lines 28700 28702 +2
=======================================
+ Hits 25916 25920 +4
+ Misses 2784 2782 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
shutil.copytree(download_path, downloaded_path) | ||
if download_path.is_dir(): | ||
shutil.copytree(download_path, downloaded_path) | ||
else: | ||
shutil.copy(download_path, downloaded_path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
immediate fix, cleaned up in #480
if fix_path: | ||
if fix_path and Path(downloaded_path).is_dir(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Proposed changes
Added test (and fix) for handling a IPFS that points to a single file rather than a directory.
partially addresses #501
#480 will be revisited and stacked on top of this PR.
Fixes
If it fixes a bug or resolves a feature request, be sure to link to that issue.
Types of changes
What types of changes does your code introduce to agents-aea?
Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that apply.develop
branch (left side). Also you should start your branch off ourdevelop
.Further comments
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...