Skip to content
This repository has been archived by the owner on Dec 4, 2021. It is now read-only.
/ classtime Public archive

university schedule generation and course data API

License

Notifications You must be signed in to change notification settings

rosshamish/classtime

Repository files navigation

classtime

Documentation Status Build Status

An API for UAlberta course data and schedule generation

Deprecation Notice: classtime is deprecated as of April 11, 2017. It is no longer actively maintained, and the public API will no longer be available.

Classtime is an HTTP API for course data and schedule generation. It supports the University of Alberta. The documentation is available online at http://classtime.rtfd.org.

It can be used to:

  • browse terms
  • browse courses
  • get details on any course
  • generate schedules, with support for core courses, electives, and preferences

It was developed in parallel with winston, http://heywinston.com, the official frontend.

It is well documented, well tested, and there's half a plugin system written - if you're interested in porting it to your school, get in touch.

Authors: Ross Anderson, Andrew Hoskins

Examples

GET /api/v1/terms

{
  "objects": [
    {
      "endDate": "2007-12-05",
      "startDate": "2007-09-05",
      "term": "1210",
      "termTitle": "Fall Term 2007"
    },
    { <term object 2> },
    ...
    { <term object N> }
  ],
  ...
}

GET /api/v1/courses-min

{
  objects = [
    {
      "faculty": "Faculty of Business",
      "subjects": [
        {
          "subject": "ACCTG",
          "subjectTitle": "Accounting",
          "courses": [
             {
                "course": "000001",
                "asString": "ACCTG 300",
                "courseTitle": "Intermediate Accounting"
             },
             { <course object> }
             ...
           ]
         },
         { <subject object> }
         ...
      ]
    },
    { <faculty object> }
    ...
  ]
}

GET /api/v1/courses/000001

{
  "asString": "ACCTG 300",
  "career": "UGRD",
  "catalog": 300,
  "course": "000001",
  "courseDescription": "Provides a basic understanding of accounting: how accounting numbers are generated, the meaning of accounting reports, and how to use accounting reports to make decisions. Note: Not open to students registered in the Faculty of Business. Not for credit in the Bachelor of Commerce Program.",
  "courseTitle": "Introduction to Accounting",
  "department": "Department of Accounting, Operations and Information Systems",
  "departmentCode": "AOIS",
  "faculty": "Faculty of Business",
  "facultyCode": "BC",
  "subject": "ACCTG",
  "subjectTitle": "Accounting",
  "term": "1490",
  "units": 3
}

Generate schedules GET /api/v1/generate-schedules?q={"institution":"ualberta","courses":["001343","004093"],"term":"1490"}

{
  "objects": [
    {
      "sections": [
        {
          ...
          <course attributes>
          ...
          "class_": "62293",
          "component": "LEC",
          "day": "MWF",
          "startTime": "10:00 AM",
          "endTime": "10:50 AM",
          ...
          "section": "A02",
          "campus": "MAIN",
          "capacity": 0,
          "instructorUid": "jdavis",
          "location": "CCIS L2 190"
        },
        { <section object 2> },
        ...
        { <section object N> }
      ],
      "more_like_this": [<schedule-identifier>, <schedule-identifier>, ..]
    },
    { <schedule object 2> },
    ...
    { <schedule object M> }
  ],
  ...
}

Docs

Documentation is hosted at classtime.readthedocs.org. The docs can also be built locally.

Build docs locally

Documentation follows reStructuredText syntax, looks great when built with sphinx, and is best viewed in a browser like firefox or chrome.

Build with sphinx

$ cd docs
$ make html

View with firefox, chrome, or any other browser

$ firefox _build/html/index.html &

Tests

Nose is used for testing.

Travis-ci is set up to test the master branch, as well as all pull requests.

Run tests locally

$ cd tests
$ nosetests

Testing is discussed in more detail in the docs.

Contributing

The project is no longer actively maintained. If you'd like to contribute, get in touch first.

Commit messages loosely follow the Angular.js commit message style guide. The purpose is to sprinkle about 10 characters of background information into the front of each commit message.

Getting started

Get the code with git

$ git clone https://github.com/rosshamish/classtime
$ cd classtime

Install dependencies with pip

$ pip install -r requirements.txt

Run the server with python 2 (not 3)

$ python runserver.py
Server running on http://localhost:5000 ...

Get terms in chrome or firefox

GET http://localhost:5000/api/v1/terms

Get courses

GET http://localhost:5000/api/v1/courses

Get schedules

GET http://localhost:5000/api/v1/generate-schedules?q={"institution":"ualberta","courses":["001343","004093"],"term":"1490"}

Thanks

Mason Strong (contact) and Peter Crinklaw for ideas, advice, and for sharing the code from their Cmput 275 schedule-builder project as a point of reference.

Ryan Shea for his angular-flask app boilerplate

With inspiration from

About

university schedule generation and course data API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published