Skip to content

Draft for the graph generate endpoint options

Zhao Wang edited this page Jan 16, 2021 · 4 revisions

As it currently stands, graph-generate takes two query string parameters: courses, which represent the courses to generate a dependency graph for, and taken which represent courses to not include in the dependency graph.

This design proposes passing options for graph-generate using a JSON request body, as well as adding some new options, too. Below is a schema for the options JSON.

Unless otherwise stated, all options are "include by default" (so add to include more, this is opposed to "exclude by default", which is add to exclude more (ie whitelist vs. blacklist))

{
    courses: [string],        -- courses you want to create a dependency graph
    taken: [string],          -- courses you want to exclude in your dependency graph (including children)
    departments : [string],   -- list of department prefixes ("CSC", or "MAT") to include
    excludedDepth : int,      -- how deep to recurse on courses from excluded departments (default 0)
    maxDepth: int,            -- total recursive depth to recurse on (default -1 for infinity)
    courseNumPrefix: [int],   -- filter based on course number (most useful for filtering based on year, maybe rework this for grad courses)
    distribution: [string]    -- like "artsci", or "engineering"
    location: [string]        -- like "utsg", or "utsc"
    noRaws: bool              -- filter out any nodes which are raw values
    noGrades: bool            -- remove all grade nodes, but still keep their children
}