{"action":"created","issue":{"url":"https://api.github.com/repos/USGS-R/mda.streams/issues/218","repository_url":"https://api.github.com/repos/USGS-R/mda.streams","labels_url":"https://api.github.com/repos/USGS-R/mda.streams/issues/218/labels{/name}","comments_url":"https://api.github.com/repos/USGS-R/mda.streams/issues/218/comments","events_url":"https://api.github.com/repos/USGS-R/mda.streams/issues/218/events","html_url":"https://github.com/USGS-R/mda.streams/issues/218","id":136438781,"number":218,"title":"update SB & mda.streams synchronously to handle solar.time switch","user":{"login":"aappling-usgs","id":12039957,"avatar_url":"https://avatars.githubusercontent.com/u/12039957?v=3","gravatar_id":"","url":"https://api.github.com/users/aappling-usgs","html_url":"https://github.com/aappling-usgs","followers_url":"https://api.github.com/users/aappling-usgs/followers","following_url":"https://api.github.com/users/aappling-usgs/following{/other_user}","gists_url":"https://api.github.com/users/aappling-usgs/gists{/gist_id}","starred_url":"https://api.github.com/users/aappling-usgs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aappling-usgs/subscriptions","organizations_url":"https://api.github.com/users/aappling-usgs/orgs","repos_url":"https://api.github.com/users/aappling-usgs/repos","events_url":"https://api.github.com/users/aappling-usgs/events{/privacy}","received_events_url":"https://api.github.com/users/aappling-usgs/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/USGS-R/mda.streams/labels/in%20progress","name":"in progress","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/USGS-R/mda.streams/milestones/1","html_url":"https://github.com/USGS-R/mda.streams/milestones/Carr-Read%20Team","labels_url":"https://api.github.com/repos/USGS-R/mda.streams/milestones/1/labels","id":1594139,"number":1,"title":"Carr-Read Team","description":"Tasks to save for Lindsay & Jordan","creator":{"login":"aappling-usgs","id":12039957,"avatar_url":"https://avatars.githubusercontent.com/u/12039957?v=3","gravatar_id":"","url":"https://api.github.com/users/aappling-usgs","html_url":"https://github.com/aappling-usgs","followers_url":"https://api.github.com/users/aappling-usgs/followers","following_url":"https://api.github.com/users/aappling-usgs/following{/other_user}","gists_url":"https://api.github.com/users/aappling-usgs/gists{/gist_id}","starred_url":"https://api.github.com/users/aappling-usgs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aappling-usgs/subscriptions","organizations_url":"https://api.github.com/users/aappling-usgs/orgs","repos_url":"https://api.github.com/users/aappling-usgs/repos","events_url":"https://api.github.com/users/aappling-usgs/events{/privacy}","received_events_url":"https://api.github.com/users/aappling-usgs/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":0,"state":"open","created_at":"2016-02-19T22:19:08Z","updated_at":"2016-03-04T17:54:00Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2016-02-25T16:32:26Z","updated_at":"2016-03-21T16:29:43Z","closed_at":null,"body":"streamMetabolizer now/soon uses `solar.time` instead of `local.time` to describe the date-time column. and this value - local solar mean time in nominal UTC timezone - is what we've been passing to streamMetabolizer models all along. however:\r\n\r\n1. old models on SB will have stored the column as `local.time` and have model fits labeled with `local.date` (instead of the new `date`). we should probably add column renaming to `modernize_metab_model`\r\n2. the table relating `mda.streams` variables to `streamMetabolizer` variables ([tsmeta_varsrccodes.tsv](https://github.com/USGS-R/mda.streams/blob/develop/inst/extdata/tsmeta_varsrccodes.tsv#L56), which also gets posted to SB & used from there) still has `sitetime`==`local.date`. what will break when we switch that? what will break if we don't?\r\n3. do the functions to create and apply config files need to be changed to accommodate the new streamMetabolizer variable name, or are we good because we already/still call it `sitetime` in `mda.streams`?\r\n4. what do we need to do, and in what order, to keep things like `explore_model()` and `predict_metab(get_metab_model(...))` from breaking? or are we willing to let these less-used features not work for some announced period?\r\n5. are there any risks more worrisome than broken `explore_model` and `predict_metab`? If not, maybe this isn't a big deal and we should just try to do all updates pretty much at once."},"comment":{"url":"https://api.github.com/repos/USGS-R/mda.streams/issues/comments/199367409","html_url":"https://github.com/USGS-R/mda.streams/issues/218#issuecomment-199367409","issue_url":"https://api.github.com/repos/USGS-R/mda.streams/issues/218","id":199367409,"user":{"login":"aappling-usgs","id":12039957,"avatar_url":"https://avatars.githubusercontent.com/u/12039957?v=3","gravatar_id":"","url":"https://api.github.com/users/aappling-usgs","html_url":"https://github.com/aappling-usgs","followers_url":"https://api.github.com/users/aappling-usgs/followers","following_url":"https://api.github.com/users/aappling-usgs/following{/other_user}","gists_url":"https://api.github.com/users/aappling-usgs/gists{/gist_id}","starred_url":"https://api.github.com/users/aappling-usgs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aappling-usgs/subscriptions","organizations_url":"https://api.github.com/users/aappling-usgs/orgs","repos_url":"https://api.github.com/users/aappling-usgs/repos","events_url":"https://api.github.com/users/aappling-usgs/events{/privacy}","received_events_url":"https://api.github.com/users/aappling-usgs/received_events","type":"User","site_admin":false},"created_at":"2016-03-21T16:29:43Z","updated_at":"2016-03-21T16:29:43Z","body":"I think the trick is to\r\n1) get us devs on the same page ASAP for using new mda.streams and new streamMetabolizer, and\r\n2) NOT post the new var_src_codes on SB until the GRAN build of these new versions\r\ntherefore, we need a patch to have mda.streams look locally instead of remotely for var_src_codes for now.\r\n\r\nthe patch will be in `get_var_src_codes.R`, line 26-36, as follows:\r\n```r\r\n    # TEMPORARY CHANGE WHILE SWITCHING TO solar.time IN streamMetabolizer AND mda.streams. switch back on GRAN build\r\n    # var_src_codes <- tryCatch({\r\n    #   code_item <- locate_ts_meta('varsrccodes')\r\n    #   code_file <- file.path(tempdir(), 'varsrccodes.tsv')\r\n    #   sbtools::item_file_download(sb_id=code_item, names='tsmeta_varsrccodes.tsv', destinations=code_file, overwrite_file = TRUE)\r\n    #   read.table(file=code_file, header=TRUE, sep='\\t', colClasses='character', stringsAsFactors=FALSE, fill=TRUE, quote=\"\\\"\")\r\n    # }, error=function(e) {\r\n    #   warning(\"had trouble downloading tsmeta_varsrccodes; using local copy\")\r\n    #   build_sysdata(post=FALSE)\r\n    # })\r\n    var_src_codes <- build_sysdata(post=FALSE)\r\n```"}}