reichlab / zoltr

http://reichlab.io/zoltr/
GNU General Public License v3.0
2 stars 4 forks source link

minor updates to create_timezero() #44

Open nickreich opened 1 year ago

nickreich commented 1 year ago

A few minor follow-up issues for the create_timezero() function created in #42 .

  1. There is no documentation/Rd file for this function in the new version of the package. See example output below.
    packageVersion("zoltr")
    #> [1] '0.98'
    ?create_timezero
    #> No documentation for 'create_timezero' in specified packages and libraries:
    #> you could try '??create_timezero'

Created on 2022-11-13 by the reprex package (v2.0.1)

  1. The function itself is not working for me when I don't specify a data version date:
    library("zoltr")
    packageVersion("zoltr")
    #> [1] '0.98'
    zoltar_connection <- new_connection()
    zoltar_authenticate(zoltar_connection, Sys.getenv("Z_USERNAME"), Sys.getenv("Z_PASSWORD"))
    #> get_token(): POST: https://zoltardata.com/api-token-auth/
    create_timezero(zoltar_connection, 
                project_url = "https://zoltardata.com/api/project/328/",
                timezero_date = "2022-11-13")
    #> Error: POST status was not 400. status_code=400, json_response=invalid field 'data_version_date'. exc=TypeError('strptime() argument 1 must be str, not dict')

Created on 2022-11-13 by the reprex package (v2.0.1)

nickreich commented 1 year ago

Noting that I managed to get around the 2nd item above by specifying data_version_date = NA. But I notice that the default is data_version_date = NULL so maybe that would be a quick change that could fix the second item.