Skip to content

quick new comparison that takes the appended uuid into account#17

Merged
pgwillia merged 3 commits intomainfrom
filename_with_uuid_compare
May 8, 2025
Merged

quick new comparison that takes the appended uuid into account#17
pgwillia merged 3 commits intomainfrom
filename_with_uuid_compare

Conversation

@pgwillia
Copy link
Member

@pgwillia pgwillia commented May 7, 2025

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.

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.
Copy link
Collaborator

@jefferya jefferya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The linter is a bit strict here and wants "==" to by "is"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@pgwillia pgwillia force-pushed the filename_with_uuid_compare branch from 8ddd248 to 29b90e6 Compare May 8, 2025 16:27
@pgwillia pgwillia merged commit 8de9952 into main May 8, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants