Open
Conversation
…ed to return a SHA from the metrics-api container image. In most other instances, the function will simply return 'SHA information not available'
…single_value class to add creation time-stamps and SHAs.
Contributor
|
I don't have a lot of context for this, why do we need these pieces of information? Are we planning to display them in the UI somehow? |
mkornblum
reviewed
Jul 12, 2017
| sha_file <- tryCatch(paste0(readLines("/app/R/install-packages.R"), collapse = "") | ||
| ,warning=function(w) 1) | ||
| if(sha_file==1) { | ||
| sha_value <- 'SHA information not available' |
Contributor
There was a problem hiding this comment.
if we just return from inside the if/else here we could eliminate the assignment to sha_value as well as line 8
Contributor
|
Confirmed So functionality is verified and I am fine to 🚢 but still curious what the intent of the change is |
Contributor
|
Another idea is that we could include these at a higher level of the response, like up where |
Collaborator
Author
|
Matt can chime in here with other uses, but the idea as I understand it is
to provide us some contextual information that can help us confirm that PPM
has indeed been updated on a given day, and the build of oliveR from which
it was updated.
I would be fine moving both of these pieces of information up so that the
metrics are all organizationally nested within metadata. I could envision
future metric layouts that would have variable update schedules, but this
will certainly work for PPM as designed.
I'll work on that tonight unless I hear otherwise.
…On Wed, Jul 12, 2017, 12:21 PM Mark Kornblum ***@***.***> wrote:
Confirmed calc_date and calc_sha are present in responses to the
get_metric_list endpoint:
% curl -i -k -X POST 'http://localhost:443/ocpu/library/oliveR/R/get_metric_list/json' -H "Content-Type: application/json" -d '{"group_id":"7"}' :( 1 17-07-12 - 12:13:07
HTTP/1.1 200 OK
Date: Wed, 12 Jul 2017 19:21:16 GMT
Server: libwww-perl-daemon/6.01
Content-Type: text/plain
Content-Length: 1377
Last-Modified: Wed, 12 Jul 2017 19:21:16 GMT
[{"id":"7","acceptance_to_schedule":{"characteristic":"Days Until Visit is Scheduled","characteristic_label":"Expected Days to Schedule","measurement_missing":true,"label":"Expected Days to Schedule","threshold":false,"template":"default","calc_date":"2017-07-12","calc_sha":"bfbc2c690012d934bd12267780cb7e2e3f96b5c7"},"acceptance_to_first_visit":{"characteristic":"Days Until First Visit, as Planned","characteristic_label":"Expected Days to First Planned Visit","measurement_missing":true,"label":"Expected Days to First Planned Visit","threshold":false,"template":"default","calc_date":"2017-07-12","calc_sha":"bfbc2c690012d934bd12267780cb7e2e3f96b5c7"},"child_count_value":{"characteristic":"Children per Referral","characteristic_label":"Children per Referral","characteristic_summary_value":1.7,"measurement_missing":false,"value":1.7,"label":"Children per Referral","threshold":false,"template":"default","calc_date":"2017-07-12","calc_sha":"bfbc2c690012d934bd12267780cb7e2e3f96b5c7"},"attendance_per_scheduled_visit":{"characteristic":"Percentage of Scheduled Visits, which Were Attended","characteristic_label":"Visit Attendance Rate","characteristic_summary_value":"23%","measurement_missing":false,"value":"23%","label":"Visit Attendance Rate","threshold":false,"template":"default","calc_date":"2017-07-12","calc_sha":"bfbc2c690012d934bd12267780cb7e2e3f96b5c7"}}]
So functionality is verified and I am fine to 🚢 but still curious what
the intent of the change is
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#24 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AF0tRc-sNDwuf7Q4BOJoEG5nCL9otwDAks5sNRy6gaJpZM4OVw-G>
.
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
These commits implement several changes to provide 2 new keys to the output of
get_metric_list():calc_date, andcalc_sha.calc_datewill provide a timestamp (vialubridate::today()) indicating the time that a measurement object was initialized (e.g. viabuild_all_metrics()).calc_shawill provide any text within/app/R/install-packages.Rwhich matches the following REGEX expression:(?<=oliveR@).*(?=\\"). In principle, this should only be the SHA listed in theinstall-packages.Rscript within the oliver-metrics-api image. If this script does not exist in a given environment (e.g. due to running oliveR locally), the key should return'SHA information not available'.