A tool that monitors Google Form responses collected in a Google Sheet. It will look for new submissions at a set cadence (default, 5 minutes), and will check the following:
- Does the provided Synapse username exist?
- Is the user registered for the challenge?
Note
Not currently super user-friendly for non-R users.
-
Clone the repo
git clone https://github.com/Sage-Bionetworks-Challenges/BraTs-Validate-Users.git
-
Install Miniconda
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh bash Miniconda3-latest-Linux-x86_64.sh rm Miniconda3-latest-Linux-x86_64.sh
Restart the terminal to apply the changes.
-
Initiate a Conda environment
conda env create -f environment.yml conda activate brats-tool
-
Install the required libraries
Rscript requirements.R
-
Set up your configurations for the user validation. Update
config_example.R
and save asconfig.R
. After updating, set the file to read-only.cp config_example.R config.R vim config.R chmod 400 config.R
Important
When running for the first time, use Rstudio (or other interactive IDEs) to initiate
google authentication
in order to access to the Google Form. The googlesheet4
package is used to read Google Sheet, (TODO: change to use service_credential.json
).
- Open the
setup.R
file in the Rstudio - Press Control/Command + A to select entire script
- Press Control/Command + enter to run all the codes
- Press
1
in the console when it asks for permission to pop up browser window. Please sign in your google account which has access to the google sheet and complete the authentication.
Note
If you get an error similar to:
Error in normalizePath(conda, winslash = "/", mustWork = TRUE) :
path[1]=".../bin/conda env": No such file or directory
Try downgrading your version of reticulate
to 1.24:
require(devtools)
install_version("reticulate", version = "1.24")
If not the first time, run the following code to test if the setup works. If so, run the last command.
Rscript setup.R
Start monitoring new submissions from the google form
Rscript runMonitor.R