-
Notifications
You must be signed in to change notification settings - Fork 40
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
Make some string comparisons case insensitive #707
Comments
Thanks for catching this @ysuarez , I'll when you're ready. |
I just put in the PR, but I realized my code was not 100% ready so I reverted a few things from this first PR. Though I seem to be correctly catching an Need to work more to account for uppercase http prefix in 1) "file" values and 2) Google Sheets URLs. I will create another PR(s) next week. |
@mjordan I just pushed a new commit to PR #708 to make the check of an URL in I will need another week or so to work on making the various metadata.csv Would you like to merge these changes so far and I can make another PR, or should I keep working on making more 'http' check case-insensitive and then we merge? Thanks |
Thanks, I'll review. |
noticed some bits of code using the Python built-in string methods of .startswith() and .endswith() that are case sensitive. Though for some of those situations it may be better the checks were case insensitive.
The check are mostly related to checking if a “file” field value starts with “http” and at least one situation were we check if a file suffix ends in “.xslx.” Usually these strings will be lowercase, but we may find situations where the incoming data is upper case or mix case.
For example,
islandora_workbench/workbench
Lines 2123 to 2126 in b38d37e
I have a WIP PR that just adds a call to
.lower()
in the method chaining, to address this issues. Let me know this is a change that I should implement to all the relevant.startswith()
and.endswith()
uses.The text was updated successfully, but these errors were encountered: