-
Notifications
You must be signed in to change notification settings - Fork 65
Installing Courseography (out of date)
This page is out of date and shouldn't be used. Please follow the setup instructions in the README.
Courseography should be pretty easy to install, and should run on any platform. Let me know if you have any problems!
Depending on your background, work through the "Set Up Git" and "Fork A Repo" here: https://help.github.com/categories/bootcamp/
After you have finished working through the latter, you should have:
- A fork of the courseography repository associated in your Github account
- A copy of the repository on your local machine (e.g., in
~/courseography
) - Your local repository should have two remotes (references to remote repositories, on Github). Check this by doing the following (this is the last step in the "Fork a Repo" article):
$ git remote -v
origin https://github.com/YOUR_USERNAME/courseography.git (fetch)
origin https://github.com/YOUR_USERNAME/courseography.git (push)
upstream https://github.com/Courseography/courseography.git (fetch)
upstream https://github.com/Courseography/courseography.git (push)
- Send David a message on the DCS Projects Slack with your Github account.
First, install both of the following.
- We use this to manage the installation of the Courseography project's Haskell code.
On Windows, install Chocolatey.
On Mac, install Homebrew.
Then, open a terminal (in Windows, run as Administrator) and run
$ scripts/setup_<your os>
Note: this is a script intended for beginners; you may wish to read through the script and run modified commands to suit your own needs.
Windows
http://www.imagemagick.org/script/download.php
Linux
-
Ubuntu:
sudo apt install imagemagick
- Note that
librsvg
is required by ImageMagick for converting SVG to PNG.
- Note that
OS X
Install librsvg
first with
$ brew install librsvg
.
Then, install ImageMagick with librsvg using the formula
$ brew install imagemagick --with-librsvg
- Mac: MacTex
- Linux and Windows: TeX Live or MikTeX
You'll need to build courseography before running it. Open a terminal and go to the courseography folder you cloned from GitHub.
$ cp app/DevelopmentConfig.hs app/Config.hs
$ mkdir db
$ stack setup
$ stack build
The first stack
command installs GHC, the Haskell compiler. The second compiles the entire project, as well as all of its dependencies. Both of these will take a long time the very first time you do it.
After this is done, courseography will be compiled and can be run. There are a just a few remaining initial setup steps.
The following command parses the SVG to create the prerequisite graph. This also generates a database file (e.g. database2015.sqlite3
) in the db/
directory containing information about the prerequisite graphs.
$ stack exec courseography graphs
The following command parses the Faculty of Arts & Science calendar and timetable and inserts the information into the database.
$ stack exec courseography database
Run the following command (again, in your main courseography folder). This will generate a file called app.css
in public/style
that contains all the CSS for Courseography.
$ stack exec courseography css
Our final command is to start up the server.
$ stack exec courseography
Alternatively, you can also run
$ yarn start
Now open up your web browser and navigate to http://localhost:8000/graph
. Hopefully, you'll see Courseography!