-
Notifications
You must be signed in to change notification settings - Fork 67
Leonlu2/time values and issues #1065
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
Conversation
…dcast.py 2. add time_values=* handler in parse_date as validation 3. add test_time_values_wildcard in test_covidcast.py
2. add unittest for placeholder on issues
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.
Looks good! Small adjustments.
Co-authored-by: Katie Mazaitis <[email protected]>
Co-authored-by: Katie Mazaitis <[email protected]>
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.
👍
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.
its a little late now since this was already merged, but i had a couple style points...
try: | ||
return int(s.replace("-", "")) | ||
if s == "*": | ||
return s | ||
else: | ||
return int(s.replace("-", "")) |
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.
try: | |
return int(s.replace("-", "")) | |
if s == "*": | |
return s | |
else: | |
return int(s.replace("-", "")) | |
if s == "*": | |
return s | |
try: | |
return int(s.replace("-", "")) |
the if "*"
doesnt need to be in the try
block (which is there to make sure s
is made up of numbers (and dashes)), and the else
is superfluous since the return
happens right above it.
if issues == ["*"]: | ||
self.retable(history_table) | ||
else: | ||
self.retable(history_table) | ||
self.where_integers("issue", issues) |
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.
if issues == ["*"]: | |
self.retable(history_table) | |
else: | |
self.retable(history_table) | |
self.where_integers("issue", issues) | |
self.retable(history_table) | |
if issues != ["*"]: | |
self.where_integers("issue", issues) |
you dont have to repeat the retable()
line, and the where_integers()
call is better done under the if
instead of the else
(by reversing the comparison).
closes #672
Prerequisites:
dev
branchdev
Summary