Skip to content

Dev_Getting Started on Windows

William French edited this page Mar 25, 2014 · 20 revisions

If you are a developer and want to help build CodaLab, this page will explain how to to get started.

Install Prerequisites

CodaLab is built with Python, supporting development on local machines with Windows, Linux, Mac and BSD. If something is broken, please open a new issue.

In this section, we will walk you through installing Python 2.7.x, installing prerequisites, and running the CodaLab site in a local virtual environment.

Assuming a fresh Windows environment the following should get you started:

  1. Install Python 2.7. Be sure to select the appropriate installer for your architecture. This typically will install to C:\Python27. The rest of these instructions will assume that you have installed to this path.

  2. To Install pip you should first install distribute. Download the file at the following URL: http://python-distribute.org/distribute_setup.py and run it from a shell from the directory into which it was downloaded:

    C:\Python27\python.exe distribute_setup.py
    

    This will put easy_install.exe in the Scripts directory of your Python installation. Then, you're ready to install pip from a command prompt:

    C:\Python27\Scripts\easy_install.exe pip
    
  3. Next install virtualenv

    cd C:\Python27\Scripts
    pip install virtualenv
    
  4. Install Microsoft Web Platform Installer. Web Platform Installer makes it easy to install a wide variety of packages that you may need.

  5. Launch Web Platform Installer and user it to install MySQL 5.1.

  6. Install Git: http://msysgit.github.io/ (be sure to check the Run Git from Windows Command Prompt option, as this will add Git to your local path).

  7. Install Ruby from http://rubyinstaller.org/downloads/. (Version 1.9.3 is recommended). During installation be sure to select the option to add Ruby to your PATH.

  8. Open a command window and install compass by executing:

    gem install compass

    Each time you make changes to the scss files in the sass folder, take the following steps to generate the css files: cd codalab\apps\web\static compass compile

    Or to start a process which will automatically re-generate the files when changes are made: cd codalab\apps\web\static compass watch .

    For more information, see https://rubygems.org/gems/compass.

  9. Install the JavaScript Closure compiler.

    • Install Java from https://www.java.com/en/download/.

    • Add Java to PATH environment variable. For instance 'c:\Program Files (x86)\Java\jre7\bin'

    • Download and extract Closure from http://dl.google.com/closure-compiler/compiler-latest.zip.

    • Create C:\closure and copy compiler.jar into the new folder.

  10. Activate the virtual environment.

    venv\scripts\activate

  11. Take the following steps to generate the JavaScript files after you've made changes to the js folder:

    cd codalab\codalab\apps\web\static\js

    python ..\..\..\..\..\scripts\javascript.py c:\closure\compiler.jar

    For more information, see https://developers.google.com/closure/compiler/

Next steps

Clone this wiki locally