Clique represents a two-sided effort:
- A generalized, powerful linear algebra library for use in any Javascript application
- An application of said library to a new statistical method for analyzing trends in large data sets
Although initial efforts involved approval voting data, the present attempt will expand the possibilities of the statistical technique to analyze a wider variety of information types while making the tool available to all.
- Andrew Forney
- Edward Mosteig
- Michael Orrison
- David Uminsky
- Mike Megally
- Ray Toal
The following section details the necessary steps to run the Clique webapp and build its library:
To set-up node.js, please consult the documentation listed here for your particular operating system. Note: Windows development is not supported for this project as the Express framework cannot operate. Macs can enjoy the all-inclusive node / npm binary listed on the above page.
The present project uses some third-party node dependencies that can be configured after node has been successfully set up:
Firstly, you must install node package manager (npm) as illustrated on step 4 of the above node installation tutorial. Once npm is set up, run the following commands:
cd ~ ; npm install express jade
If you are familiar with git cloning and do not require the assistance of an IDE or GUI, you may skip this step!
To clone the source using the terminal:
- Open up a new terminal.
- Navigate to a directory in which you would like to clone the source, for example:
cd ~/git
- Assuming you have git installed, copy the following command, replacing "Username" with your git username:
git clone https://Username@github.com/Forns/clique.git
- You may be prompted to enter your gitHub account's password.
- If the clone is successful, you'll find a new folder, "clique" inside your current directory!
To clone the source using an IDE (specifically, Eclipse):
- If you're using eclipse as your IDE, you can install the eGit plugin via the Indigo package (Install new software -> Indigo packages -> Collaboration -> eGit).
- Right click anywhere in the project explorer, choose "import", then "project from git"
- Click "clone" then fill in the necessary fields, using the http method for the clone (Note: replace "Username" with your git username): "https://Username@github.com/Forns/clique.git"
- Follow the chain of "next" windows until you can click "finish." Once you see the cloned git repository, you can click on it and create a general project from it.
- Now, it is located in your project explorer for you to work!
Although the latest clone will always come with the latest distribution of the clique library, during development you will have to build the library with each change. Here's how to do it:
- Navigate to the clique git directory, e.g.
cd ~/git/clique
- Type
make
- Whew! You're done; successful compilation will yield the library located in src/main/public/js/dist/clique.js
- To run the node server, (assuming you are still in the /git/clique directory) type
node server.js
-- Successful server setup will display "Express server listening on port 5700 in development mode" - To view the running server, open a web browser (not IE lol) then navigate to localhost:5700 -- On other computers, you can get the ip of the host computer, then append :5700 to access the page
Assuming setup has been successful in the previous steps, you can now run the qUnit test suite be navigating to localhost:5700/test
- Before you start any coding session, make sure no one has been working on the project by doing a git pull (for eclipse users, right click on the clique project in your project explorer, then navigate to Team -> Pull)
- When you've done work locally and you're ready to commit to your local clone of the repository, do a git commit (for eclipse users, right click on the clique project in your project explorer, then navigate to Team -> Commit). Make sure you add a descriptive commit message for what you did.
- Once you're ready to push your changes to the central repository, do a git push (for eclipse users, right click on the clique project in your project explorer, then navigate to Team -> Push).
Happy coding! Don't break anything, or I'll break you!