Skip to content

Material Structure

Noah Kim edited this page Aug 17, 2020 · 2 revisions

Given the path to a validly structured assignment, Curricula's compiler produces a set of artifacts based on the assignment's contents. While the root directory of an assignment can provide additional information, Curricula's material structure is largely problem-centric, so it is best understood by reviewing problem structure.

Problems

A problem represents a unitary task or set of tasks. Generally, an assignment is composed of one or more problems, though you may still compile an assignment with zero problems. Problems are required to have a problem.json in the root directory that specifies the following metadata:

  • Title of the problem.
  • Authors that contributed to the problem.
  • Tags describing relevant topics to the problem.
  • Grading data that specifies the number of points used to score the problem, the categories of grading, and the respective number of points and weights of said categories.

Content-wise, problems are composed of the following parts, all of which are optional:

  • Instructions are written in the README.md in the top level of the problem directory. Assets, such as images, videos, or other content, can be put in an adjacent assets/ folder. Assignments can provide additional instructions and assets the same way relative to their top level directory. Instructions written in the README.md in the assignment directory will appear at the top of the assignment.

  • Problem resources, located in resources/ are the files given to students as skeleton code. When an assignment is compiled, resources from each of its problems are aggregated into single collection of directories, one per problem, where each directory is named after the problem short. By default, a problem's short is its directory name, but this can be configured in the assignment in case of collision. Similar to instructions, an assignment may include additional resources via a top-level resources/ directory. This can be useful when an assignment is short enough to be written without problems.

  • An example solution may be included in the solution/ directory. We recommend that solutions follow the same file structure as the provided resources/. Since the solution is compiled the same way as the resources, this will ensure that their respective cumulative structures are mirrored. A README.md in this directory, if present, will be compiled into a cumulative cheatsheet for the assignment.

  • Grading utilities such as automated testing scripts and related files should be located in grading/. Currently, you must use curricula to grade assignments so that reports can be generated and formatted in a unified workflow. You may do so either by providing a tests.py or __init__.py that exports a grader = Grader(). A README.md in this directory, if present, will be compiled into a cumulative rubric for the assignment.

Assignments

Assignments are simply a collection of problems with some metadata and optional additions to the cumulative assets, resources, or solution. Assignment metadata is located in an assignment.json in the root of the assignment, and may contain the following info:

  • Title of the assignment.
  • Authors that contributed to the assignment.
  • Dates assigned and due as well as a deadline, all of which are optional.
  • Problems, which are specified as ordered list of objects describing the path of each problem to include, its weight as part of the assignment, and some optional additional metadata overrides.
  • Grading data that indicates how many points the assignment should be scored out of.

Clone this wiki locally