Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


An API for the structure and dependencies between subjects, topics, and concepts.


- Finalize BaseNode, and add BaseEdge
- Cleanup settings/requirements
- Think about Polymorphism for nesting in serializers and in wire format
- Implement session middleware no will not have to call .save manually (except when need auto-id field to be generated)
- Dockerize for prod (docker-compose and docker-host)
- figure out a way to speedup query for
  takes too long and we have 700 nodes and 500 rel'ns.
- Handle `alias` properties
- Store `source_file`(str) and `file_order` (float) along with data items in
  order to reproduce YAML identically after roundtrip

Design TL;DR

  • Graph data structure with specialized tooling for representing educational content domain
  • Decision: stick to Django ORM (no neo4j for now)

Project milestones

  • Milestone 1: proof of concept [Ivan]

    • Tasks:
      • Import state from data/**.yaml [2017]
      • Refactor graph models into abstract BaseNode and BaseEdge and implement education related models:
        • Node with kind in [subject, topic, concept, ...]
        • DependencyEdge
        • RelatedEdge
        • ContainsEdge
      • Export state using DRF YAML serializer
    • Technical challenges:
      • Is round-trip possible (choose sort, control YAML formatting)
      • How to deal with missing FKs during import (import queue?)
  • Milestone 2: ETL for internal representation to other platforms

    • Goal 1: Obtain a graph viz without too much custom work
    • Goal 2: Learn about feel and metacademy data models to inform what will be needed
    • Tasks:
      • Export structure-api data to feel fixtues format, import in feel instance
      • Export data to metacademy fixtures format
      • Export parts of graph to CmapTools format ?
  • Milestone 3: basic graph display UI

    • React
    • Technology research:
      • GraphQL to talk to backend?
    • Stretch goals:
      • search and faceted
  • Milestone 4: graph editing

    • Goal: create a graph editing interface for non-technical teachers to create educational graphs (concept maps) for students
    • Technology research:
  • Milestone 6: example applications that make use of sturcture-api



Initialize the project

Create and activate a virtualenv:

virtualenv env
source env/bin/activate

Install dependencies:

pip install -r requirements/local.txt

Start Postgres and create the database:

mkdir postgres_data
initdb /Users/ivan/Projects/Minireference/STRUCTURE/structure-api/postgres_data
pg_ctl -D /Users/ivan/Projects/Minireference/STRUCTURE/structure-api/postgres_data start
createdb struct

# to stop
# pg_ctl -D /Users/ivan/Projects/Minireference/STRUCTURE/structure-api/postgres_data stop

Importing and exporting graph data

Currently (May 5) we have the following data fixtures;

├── ccssm                                       # Common Core State Standard for Math
│   ├── 1.yml
│   ├── 2.yml
│   ├── 3.yml
│   ├── 4.yml
│   ├── 5.yml
│   ├── 6.yml
│   ├── 7.yml
│   ├── 8.yml
│   ├── HSA.yml
│   ├── HSF.yml
│   ├── HSG.yml
│   ├── HSN.yml
│   ├── HSS.yml
│   ├── K.yml
│   ├── context.yml
│   ├── domain.yml
│   ├── practice.yml
│   └── standard.yml
└── miniref                                     # [WIP] data entry for Minireferece Co. concept maps
    ├── context.yml
    ├── math.yml
    └── physics.yml

Load data using command:

./struct/ loadfromyamldata data/miniref/
./struct/ loadfromyamldata data/ccssm/

Export data using command:

Not implemented yet


An API for the structure and dependencies between subjects, topics, and concepts



No releases published


No packages published