Refactoring verification module#60
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors the post-download verification workflow by moving checksum generation and download verification helpers out of __main__.py into buddy_check.py, updating references/documentation accordingly, and adding unit tests to cover the moved functionality.
Changes:
- Moved
process_checksums()andverify_downloads()from__main__.pytobuddy_check.py. - Updated tests to patch
get_checksums/BuddyCheckin the new module location and added a new test suite for verification helpers. - Updated
AGENTS.mdto reflect the new module responsibilities and documented the new helper functions.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
tests/test_verify_downloads.py |
Adds unit tests for process_checksums() and verify_downloads() after refactor. |
tests/test_download_images.py |
Updates patch targets to reflect moved checksum/verification code. |
src/cautiousrobot/buddy_check.py |
Adds process_checksums() and verify_downloads() and imports get_checksums. |
src/cautiousrobot/__main__.py |
Removes inlined checksum/verification helpers; imports them from buddy_check.py. |
AGENTS.md |
Updates architecture docs to reflect refactor and new helper functions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Elizabeth Campolongo <38985481+egrace479@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This reverts commit 1a75a3a.
egrace479
left a comment
There was a problem hiding this comment.
Some notes on the test case setups.
Co-authored-by: Elizabeth Campolongo <38985481+egrace479@users.noreply.github.com>
Co-authored-by: Elizabeth Campolongo <38985481+egrace479@users.noreply.github.com>
- change "md5" to "hash" - specify error printouts - remove unused test
egrace479
left a comment
There was a problem hiding this comment.
We should probably add a test that calls verify_downloads with filename_col != "filename" to ensure something like this is caught in the future.
Co-authored-by: Elizabeth Campolongo <38985481+egrace479@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
- Update docstrings from main branch - Update tests according to comments
egrace479
left a comment
There was a problem hiding this comment.
Please revise function descriptions as in the suggestions below.
Co-authored-by: Elizabeth Campolongo <38985481+egrace479@users.noreply.github.com>
Co-authored-by: Elizabeth Campolongo <38985481+egrace479@users.noreply.github.com>
Add more descriptive docstrings Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
egrace479
left a comment
There was a problem hiding this comment.
Copilot autofix was a bit over-eager here
Co-authored-by: Elizabeth Campolongo <38985481+egrace479@users.noreply.github.com>
__main__.pytobuddy_check.py