quick new comparison that takes the appended uuid into account#17
Merged
quick new comparison that takes the appended uuid into account#17
Conversation
During SAF package creation, if a bitstream filename was duplicated then an identifier was added (e.g., a.pdf ==> `a_uuid.pdf`` thus a direct comparison from ERA to Scholaris on the filename fails.
jefferya
approved these changes
May 7, 2025
Collaborator
jefferya
left a comment
There was a problem hiding this comment.
Look good. The linter has a few suggestions mentioned here:
https://github.com/ualbertalib/dspace_api_tools/actions/runs/14894586928/job/41834438574#step:4:29
src/tests/test_integration.py
Outdated
Comment on lines
153
to
158
| assert compare.filename_with_uuid_compare("a.pdf", "a.pdf") == True | ||
| assert compare.filename_with_uuid_compare("a.pdf", "b.pdf") == False | ||
| assert compare.filename_with_uuid_compare("a.pdf", "a_12345.pdf") == True | ||
| assert compare.filename_with_uuid_compare("a.pdf", "a.pdf_extra") == False | ||
| assert compare.filename_with_uuid_compare("a.pdf", None) == False | ||
| assert compare.filename_with_uuid_compare(None, "a_uuid.pdf") == False |
Collaborator
There was a problem hiding this comment.
The linter is a bit strict here and wants "==" to by "is"
Member
Author
There was a problem hiding this comment.
The linter is still complaining about something. I think my IDE and pylint are contradictory over whitespace because my editor keeps adding it, and the linter keeps complaining about it.
8ddd248 to
29b90e6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
During SAF package creation, if a bitstream filename was duplicated then an identifier was added (e.g., a.pdf ==> `a_uuid.pdf`` thus a direct comparison from ERA to Scholaris on the filename fails.