-
Notifications
You must be signed in to change notification settings - Fork 5
Combine timetype wiki twitter #236
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
Merged
nmdefries
merged 5 commits into
ndefries/endpt-defaults
from
ndefries/combine-timetype-wiki-twitter
Jan 18, 2024
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
d1db445
combine epiweek and date into time_type and time_value for pub_wiki
nmdefries 83e7ce3
combine epiweek and date into time_type and time_value for pvt_twitter
nmdefries 5311e0c
test wildcard and day/week support
nmdefries 61e5742
changelog
nmdefries 3ae82e2
Merge branch 'ndefries/endpt-defaults' into ndefries/combine-timetype…
nmdefries File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I'm not entirely sure this is necessary, or else
pub_covidcast
is missing something important, since it doesn't do this. I would maybe make a function for this bit of logic if it is necessary, since it (should?) be included 3 times.(I mean this and
if
statements below)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.
Here it's necessary because the default value is
c("day", "week")
, but you can only have onetime_type
.match.arg()
takes the first if the default is not overridden. It's a common convention in R that if the argument can be one of several string values, you make the default list all of them, andmatch.arg()
takes care of picking the first (if none is provided) or ensuring the provided value is valid otherwise.pub_covidcast()
doesn't set a default for this argument, so it's not strictly necessary. However,pub_covidcast()
could domatch.arg(time_type, c("day", "week"))
to enforce that the type must be one or the other but not both.