{"action":"created","issue":{"url":"https://api.github.com/repos/ASA-DIA-InteractiveSafetyGraphics/ReDish/issues/25","repository_url":"https://api.github.com/repos/ASA-DIA-InteractiveSafetyGraphics/ReDish","labels_url":"https://api.github.com/repos/ASA-DIA-InteractiveSafetyGraphics/ReDish/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/ASA-DIA-InteractiveSafetyGraphics/ReDish/issues/25/comments","events_url":"https://api.github.com/repos/ASA-DIA-InteractiveSafetyGraphics/ReDish/issues/25/events","html_url":"https://github.com/ASA-DIA-InteractiveSafetyGraphics/ReDish/issues/25","id":373673258,"node_id":"MDU6SXNzdWUzNzM2NzMyNTg=","number":25,"title":"Create function to validate settings","user":{"login":"jwildfire","id":3680095,"node_id":"MDQ6VXNlcjM2ODAwOTU=","avatar_url":"https://avatars1.githubusercontent.com/u/3680095?v=4","gravatar_id":"","url":"https://api.github.com/users/jwildfire","html_url":"https://github.com/jwildfire","followers_url":"https://api.github.com/users/jwildfire/followers","following_url":"https://api.github.com/users/jwildfire/following{/other_user}","gists_url":"https://api.github.com/users/jwildfire/gists{/gist_id}","starred_url":"https://api.github.com/users/jwildfire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwildfire/subscriptions","organizations_url":"https://api.github.com/users/jwildfire/orgs","repos_url":"https://api.github.com/users/jwildfire/repos","events_url":"https://api.github.com/users/jwildfire/events{/privacy}","received_events_url":"https://api.github.com/users/jwildfire/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"jwildfire","id":3680095,"node_id":"MDQ6VXNlcjM2ODAwOTU=","avatar_url":"https://avatars1.githubusercontent.com/u/3680095?v=4","gravatar_id":"","url":"https://api.github.com/users/jwildfire","html_url":"https://github.com/jwildfire","followers_url":"https://api.github.com/users/jwildfire/followers","following_url":"https://api.github.com/users/jwildfire/following{/other_user}","gists_url":"https://api.github.com/users/jwildfire/gists{/gist_id}","starred_url":"https://api.github.com/users/jwildfire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwildfire/subscriptions","organizations_url":"https://api.github.com/users/jwildfire/orgs","repos_url":"https://api.github.com/users/jwildfire/repos","events_url":"https://api.github.com/users/jwildfire/events{/privacy}","received_events_url":"https://api.github.com/users/jwildfire/received_events","type":"User","site_admin":false},"assignees":[{"login":"jwildfire","id":3680095,"node_id":"MDQ6VXNlcjM2ODAwOTU=","avatar_url":"https://avatars1.githubusercontent.com/u/3680095?v=4","gravatar_id":"","url":"https://api.github.com/users/jwildfire","html_url":"https://github.com/jwildfire","followers_url":"https://api.github.com/users/jwildfire/followers","following_url":"https://api.github.com/users/jwildfire/following{/other_user}","gists_url":"https://api.github.com/users/jwildfire/gists{/gist_id}","starred_url":"https://api.github.com/users/jwildfire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwildfire/subscriptions","organizations_url":"https://api.github.com/users/jwildfire/orgs","repos_url":"https://api.github.com/users/jwildfire/repos","events_url":"https://api.github.com/users/jwildfire/events{/privacy}","received_events_url":"https://api.github.com/users/jwildfire/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2018-10-24T20:55:00Z","updated_at":"2018-10-25T20:37:18Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"# validateSettings()\r\n\r\nThis function returns a list describing the validation status of a settings/data combo for a given chart type. This list can be used to populate status fields and control workflow in the Shiny app. It could also be used to manually QC a buggy chart. \r\n\r\n## Inputs\r\n\r\n- `data` A data frame to check against the settings object\r\n- `settings` The settings list to compare with the data frame. \r\n- `chart` The chart type being created (\"eDish\" only for now)\r\n\r\n## Output\r\n\r\nReturns a list with the following properties:\r\n- `valid` - boolean indicating whether the settings/data combo creates a valid chart\r\n- `status` - a string summarizing of the validation results\r\n- `statusList` - list of lists giving details about individual setting specifications. Each embedded list has the following properties: \r\n  - `setting` - a character string specifying the settings property being assessed. (e.g. `settings[[\"id_col\"]]`, `settings[[\"group_cols\"]][[1]][[\"value_col\"]]`)\r\n  - `status` - a string indicating the status for the setting. Values are \"error\", \"caution\" or \"ok\"\r\n  - `message` - a string describing the check performed. (e.g. \"No column called `USBUJID` found in the data\" with status \"Error\" )\r\n\r\n## Workflow\r\n- Confirm that the data defined in the settings is valid (Release 1)\r\n  - Load meta data that specifies which settings objects are data mappings, and which are required vs. optional. \r\n    - Will probably create a custom object list for Release 1, and the pull the info from Schema for Release 2\r\n  - Check that columns from settings are found in the data using checkColumn() function \r\n  - Check that fields/column combinations from the settings are found in the data using checkField() function\r\n  - Check that all required columns for the chart are specified using checkRequired() function\r\n  - All check results are recorded in the statusList \r\n- Confirm that the settings object matches the overall json Schema using checkSchema() function (Release 2)\r\n  - Field level check results should be saved in `statusList` \r\n- Determine the final values for `valid` and `status` based on the items in statusList (Release 1)\r\n"},"comment":{"url":"https://api.github.com/repos/ASA-DIA-InteractiveSafetyGraphics/ReDish/issues/comments/433196896","html_url":"https://github.com/ASA-DIA-InteractiveSafetyGraphics/ReDish/issues/25#issuecomment-433196896","issue_url":"https://api.github.com/repos/ASA-DIA-InteractiveSafetyGraphics/ReDish/issues/25","id":433196896,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMzE5Njg5Ng==","user":{"login":"jwildfire","id":3680095,"node_id":"MDQ6VXNlcjM2ODAwOTU=","avatar_url":"https://avatars1.githubusercontent.com/u/3680095?v=4","gravatar_id":"","url":"https://api.github.com/users/jwildfire","html_url":"https://github.com/jwildfire","followers_url":"https://api.github.com/users/jwildfire/followers","following_url":"https://api.github.com/users/jwildfire/following{/other_user}","gists_url":"https://api.github.com/users/jwildfire/gists{/gist_id}","starred_url":"https://api.github.com/users/jwildfire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwildfire/subscriptions","organizations_url":"https://api.github.com/users/jwildfire/orgs","repos_url":"https://api.github.com/users/jwildfire/repos","events_url":"https://api.github.com/users/jwildfire/events{/privacy}","received_events_url":"https://api.github.com/users/jwildfire/received_events","type":"User","site_admin":false},"created_at":"2018-10-25T20:37:18Z","updated_at":"2018-10-25T20:37:18Z","author_association":"CONTRIBUTOR","body":"#getKeys(settings, pattern)\r\n\r\nFunction to return all keys in a settings list that matches one or more of the specified patterns\r\n\r\n## Inputs\r\n- `settings` - full setting object\r\n- `patterns` - vector of strings to look for in the parameters\r\n\r\n## output\r\n- list of lists suitable for the `keys` parameter in `getSettingValue()`"}}
{"actor":{"display_login":"jwildfire"}}