-
-
Notifications
You must be signed in to change notification settings - Fork 53
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
Update PR regex #960
Update PR regex #960
Conversation
Closes #959 Co-Authored-By: Darren A. Natale <13770634+nataled@users.noreply.github.com>
@nataled it also appears that |
Co-Authored-By: Darren A. Natale <13770634+nataled@users.noreply.github.com>
In addition to the one you already have (a nine-digit string), there are the following four examples: I do not see how P0DP23 fails the regex:
Thus we need to look only at the six-place part:
|
Co-Authored-By: David Linke <2648874+dalito@users.noreply.github.com>
It appears the other ones also fail against this regex |
What's crazy is that I pulled the regex from the OBO Foundry PURL system. In that context they do not fail. |
I just tried it with a small script and they all pass. How are you assessing the pass/fail? |
Co-Authored-By: David Linke <2648874+dalito@users.noreply.github.com>
The test run with Python's builtin
I confirmed that if you run the following, nothing is returned >>> import re
>>> x = re.compile(r'^(?:\\d{9}|[OPQ][0-9][A-Z0-9]{3}0-9?|[A-NR-Z]0-9{1,2}(?:-\\d+)?)$')
>>> x.search('P0DP23') Similarly, |
I see the problem. Somehow my pasted regex is losing lots of characters, so the one you're testing is an inaccurate regex. I'm pasting the regex into a text file (attached) to avoid this issue. Aligning the two, I see that github didn't much care for the (?: notation, plus did a few other odd removals. |
Codecov ReportAll modified lines are covered by tests ✅
... and 12 files with indirect coverage changes 📢 Thoughts on this report? Let us know!. |
@nataled looks like the last message did the trick! Thanks! |
Closes #959
@nataled can you provide a few more example local unique identifiers? I guess that the regex you supplied also includes UniProt isoforms