comses / miracle

Repeatable data analysis workflows for computational models
1 stars 3 forks source link

collect metadata for R scripts and DataTableGroupColumns #29

Closed alee closed 8 years ago

alee commented 8 years ago

column level metadata: DataType (int, float, boolean, string), description, UnitType (mm, kg, psi), MeasurementType (Categorical, Ordinal, Coded Value, Other)

warmdev commented 8 years ago

Parsing R scripts for parameters and dependency

Input parameters

Input parameters are declared by deployrUtils::deployrInput as a JSON object that contains the following fields

Example

deployrUtils::deployrInput('{"name": "sdp2", "label": "Standard deviation of preference to proximity", "render": "numeric", "default": 0.4, "valueList": [0, 0.1, 0.2, 0.3, 0.4, 0.5]}')
deployrUtils::deployrInput('{"name": "sdb3", "label": "Standard deviation of budget", "render": "integer", "default": 30, "valueRange": [0, 50, 10]}') 

Dependency

Note: low priority!

Package dependencies for a script is declared by deployrUtils::deployrPackage as strings of R package names. As R scripts may source other scripts, to find out all needed dependencies, we will need to parse all other scripts referenced by source.

Parsing packrat.lock file

Path: PROJECT_ROOT\packrat\packrat.lock Content:

PackratFormat: 1.4
PackratVersion: 0.4.5
RVersion: 3.2.2
Repos: CRAN=https://cran.rstudio.com/

Package: DBI
Source: CRAN
Version: 0.3.1
Hash: 096699d1ac1cf530acfc646a0c90ee5d

Package: R6
Source: CRAN
Version: 2.1.1
Hash: 20a88b2c9c84aecff2702789a4d102f5

Package: RColorBrewer
Source: CRAN
Version: 1.1-2
Hash: c0d56cd15034f395874c870141870c25 

......