course-network / degree-requirement-dag

3 stars 0 forks source link

Initialize tree template #11

Open tsoliangwu0130 opened 5 years ago

tsoliangwu0130 commented 5 years ago

I created a vertical tree template to let us at least can start. I also modified the sample code a little to adhere to our coding style. Hopefully it'll make the codes a little easier to understand.

Some issues I found:

  1. It's required to have at least one root node. In the current template, High School Degree was the root node (in other words, we couldn't have CS101 and CS161 both live at level 1). I believe we should be able to hide it, but need to look into it more.
  2. Looks like it's harder than I expected that having multiple child nodes to share one parent node. In this example, CS101 and CS161 both contain CS261 as a child, but they couldn't just point to the same node. Need to find a solution.

@ianbrown9475 @wilsonia can you take a look at this PR? If that looks good, feel free to create feature branches based on this branch.

mintzj commented 5 years ago

One way to get around this problem is to parameterize the tree in the reverse direction, with the root node is "CS degree" requirement. Then a node branches if it has something else that it requires (pre-requisites).