ENIGMA Stroke Recovery Group Data Viewer Installation and Running Guide
Welcome to the Data Viewer App! This guide provides comprehensive instructions for installing and running the application, including prerequisites, setup, and operational guidance.
Prerequisites
- Python: Ensure Python 3.x is installed on your system. Python's package manager
pipshould also be available for installing dependencies. - Access: Confirm you have read access to the required directories for behavior and imaging data.
- Node.js: Ensure Node.js is installed for managing the React application.
- Git: Required for cloning the repository.
Mount the Volume
- Make sure you are connected to GlobalProtect.
- Open the finder, type + K (or, Go >> Connect to Server...).
- Type or select
smb://smb-ifs.ini.usc.edu>> Connect. - Select/mount the faculty folder.
- A new location should pop up in your finder. Navigate to sliew - enigma - new.
Clone the repository
Clone the project repository to your local machine using the following command:
cd enigma-data-request-form
Installation
Setup Python venv:
source venv/bin/activate
Install NPM: Go to the Node.js download page and download the installer for your operating system (Windows, macOS, or Linux).
Install Dependencies: Run the following command in your terminal to install the necessary Python libraries:
cd react-data-request-form
npm install
npm run build
Add AWS Access Keys: Replace <, < keys in the .env file with values provided via Slack.
Running the Application
-
Navigate to the App Directory: Change to the directory where the Data Viewer App is located:
cd .. -
Execute the App: Start the application by running:
flask --app application run --debugThis launches the app, making it accessible via a web browser.
-
Access the App: Open a web browser and visit
http://127.0.0.1:5000/to interface with the Data Viewer App.
Requirements and Limitations
-
Behavior Data: Ensure you have access to behavior data in the directory:
/Volumes/faculty/sliew/enigma/new/octavio/behavior_renamed_20240126/ -
Imaging Data: For imaging data, access is required to:
/Volumes/faculty/sliew/enigma/new/BIDS/Note: The application provides paths to imaging data but does not display the images directly.
Troubleshooting Steps
-
Error Description:
Traceback (most recent call last):
File "/Volumes/faculty/sliew/enigma/new/Lahari/DataRequestForm/ap p.py", line 1, in
from flask import Flask, render_template, request, jsonify, session, url_for, Response
File "/Users/laharireddy/opt/anaconda3/lib/python3.9/site-package s/flask/__init__.py", line 14, in
from jinja2 import escape
ImportError: cannot import name 'escape' from 'jinja2'