ropensci / awardFindR

Scan multiple online grant databases for relevant awards
https://docs.ropensci.org/awardFindR
Other
16 stars 7 forks source link

Choose working defaults for function #7

Closed adam3smith closed 3 years ago

adam3smith commented 3 years ago

e.g. awardsBot(keywords = NULL, sources = NULL, from = NULL, to = NULL)

OK to leave keywords blank, but let's set sources to all currently available, from to reasonable start date (something covered by most APIs perhaps) and to to today's date).

Also, if we require keywords (which I think we would) not setting a default treats it as required which I think is right here. Apply similarly to other functions

mccallc commented 3 years ago

Sources already set to all available by default, and current date default is previous two years (which is pretty heavy on results for some source-query combos, really light for others, but returns ~10k results in total). See https://github.com/PESData/awardsBot/blob/fb72b6f7809408199e2070769a2724d8a61e0083/R/main.R#L41 to line 53

Definitely agree on not having a default keyword

adam3smith commented 3 years ago

Sources already set to all available by default, and current date default is previous two years (which is pretty heavy on results for some source-query combos, really light for others, but returns ~10k results in total). See

Ah yes, I missed that. Problem is that doing it this way doesn't expose the defaults in the function documentation (which is where I was looking), which I think is useful and also considered best practice

mccallc commented 3 years ago

Ah, yes that is a very good point, that would have been where I would have looked too.

Sys.Date() as a default ending date, and Jan 1 2019 as a default starting date?

adam3smith commented 3 years ago

Yes, that's good for date, thanks

mccallc commented 3 years ago

These defaults included as of commit 7664e9bdd2b8660b9bc33d10d27607c2d52be5f0, documentation should reflect that too