Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

Using the source code

Sanjay Soundarajan edited this page Jun 14, 2021 · 14 revisions

The front-end (Graphical User Interface or GUI) of SODA is built with Electron, an open-source framework developed and maintained by GitHub that conveniently combines Node.js, HTML, CSS, and Javascript, while the back-end is developed in Python (v3.6). The application is inspired by a GitHub repository and a Medium blog. All source codes and files are shared with an open-source license (MIT) to permit user modification without restrictions. The folder structure for the source code is based on the Electron standards and similar to the Electron Demo Application.

Pre-requisites: Anaconda (Python 3 version), Python 2

Download source code from the GitHub repository

Either download the zip folder from the GitHub repository or run the following command from your bash shell

git clone https://github.com/bvhpatel/SODA.git

Windows

  • Download Visual Studio 2017, run the executable file
  • In the installer, select “Desktop development with C++” and check “VC++ 2015.3 v14.00”
  • Install Chocolatey and Emacs with the Windows PowerShell in Administrator mode.
$ Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
$ choco install emacs

Mac

  • Install Xcode
  • Refer here for installing 'brew' if your Mac doesn't already have it.
$ brew install gcc
$ brew cask install emacs

Linux

$ sudo apt update
$ sudo apt install build-essential
$ sudo apt-get install emacs

Setting up the development environment

$ conda env create -f environment-<platform>.yml

(If “pip returned an error”, then activate the half-completed conda environment and manually install libraries using --user argument in pip (eg.- “pip install zerorpc –user”)

  • Activate the conda environment (If you're on Windows, use 'Anaconda Prompt') and navigate to the 'src' folder.
$ conda activate <created env name>
  • Delete 'node_modules' folder and package-lock.json (if present)
  • Run the following commands:
$ npm install -g node-gyp
$ npm config set python \path\to\python2.exe
$ npm config set msvs_version 2017
$ npm install
$ "./node_modules/.bin/"electron-rebuild .
$ npm start

Note: For Windows, you also need the win-node-env package. This should automatically have been installed as an optional dependency from the package.json but if it doesn't you can use the following command to add it to your project:

npm install -g win-node-env

Note: if electron-rebuild . gives an error, try deleting the .electron-gyp folder from your user profile and try again.

  • This should launch the application. You can now edit the code files in the 'src' folder and run npm start to see/test your changes
Clone this wiki locally