Skip to content
Joshua Carp edited this page Jun 14, 2013 · 1 revision

Scholar Processing Stream

  1. Imports
import json
from pymongo import MongoClient
  1. Load fixture data
submission = json.load(open('app/tests/citelet_valid_sample_highwire.json'))
  1. Import JSONController
from app.json_controller import JSONController
  1. Initialize controller
controller = JSONController(submission, MongoClient())
  1. Validate submission
controller.validate()
  1. Parse submission
results = controller.parse()
Clone this wiki locally