-
Notifications
You must be signed in to change notification settings - Fork 37
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
Feat/api 315 all caps new projects and programs #218
base: develop
Are you sure you want to change the base?
Feat/api 315 all caps new projects and programs #218
Conversation
gdcdictionary/schemas/program.yaml
Outdated
@@ -36,6 +36,7 @@ properties: | |||
name: | |||
type: string | |||
description: "Full name/title of the program." | |||
pattern: "^[A-Z0-9]+|[0-9]+|[A-Z]+$" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this saying the name should start with uppercase alphabetical or number and end with only uppercase alphabetical? that's a weird requirement
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Phillis, it is saying that we can have project names with numbers or uppercase characters only, it is hard to see but there are pipes (or's) in between. Probably there is a better why of structuring this. I am open to suggestions :)
import re
pattern = "^[A-Z0-9]+|[0-9]+|[A-Z]+$"
re.match(pattern, "A")
<_sre.SRE_Match object at 0x7efea15d9370>
re.match(pattern, "9")
<_sre.SRE_Match object at 0x7efea15d93d8>
re.match(pattern, "999")
<_sre.SRE_Match object at 0x7efea15d9370>
re.match(pattern, "AAAA")
<_sre.SRE_Match object at 0x7efea15d93d8>
re.match(pattern, "9AAAA")
<_sre.SRE_Match object at 0x7efea15d9370>
re.match(pattern, "A9AAAA")
<_sre.SRE_Match object at 0x7efea15d93d8>
However I just found another bug, thanks for asking!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to clarify, I need to add the $ symbol to the other 2 options, to signify that no other trailing characters are allowed.
Got munged in update, moved back to proper block.
Renamed branch.