Skip to content

Commit

Permalink
Merge pull request #343 from dodona-edu/feat/add-debug-options
Browse files Browse the repository at this point in the history
  • Loading branch information
bmesuere authored Oct 30, 2023
2 parents 6a64afb + 67711a3 commit 32abb52
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion en/references/judges/creating-a-judge/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ The `run` executable should output JSON to _stdout_, which will be interpreted b

#### Full output

The complete format description can be found on <!-- TODO --> [the wiki](<https://github.com/dodona-edu/dodona/wiki/Judge-output-format-(proposal)>) and is specified through a [JSON schema](https://github.com/dodona-edu/dodona/tree/develop/public/schemas). A more concise format can be found below. (Note: all items are rendered in the order used below; all list-type keys are optional, defaulting to the empty list as value)
The complete format description is specified through a [JSON schema](https://github.com/dodona-edu/dodona/tree/main/public/schemas). A more concise format can be found below. (Note: all items are rendered in the order used below; all list-type keys are optional, defaulting to the empty list as value)

The full output returns a single JSON at the end. You must ensure that this is emitted before the docker runs out of time or memory.

Expand All @@ -77,6 +77,7 @@ The full output returns a single JSON at the end. You must ensure that this is e
- An optional `description`, a `Message` object (probably a statement formatted as `code`).
- `tests`, a list of `Test` objects.
- `messages`, a list of message objects.
- `data`, an optional `DebugData` object.
- A `Test` object (used, e.g. to test either the returned and printed output of a statement) consists of:
- An optional `description`, a `Message` object.
- `accepted`, a boolean indicating whether this test is considered correct. `true` results in only showing the `generated` string, `false` results in showing a "diff" between the `generated` and `expected` strings.
Expand Down Expand Up @@ -121,6 +122,10 @@ The full output returns a single JSON at the end. You must ensure that this is e
- `"internal error"`, the judge exited with a non-zero status code.
- `"unknown"`, something went wrong.

- A `DebugData` object is used to run the Python Tutor that gives students a debug interface. Currently it is only relevant for Python. It consists of:
- `statements`, a string containing the extra code to be executed in the Python Tutor, to mimic this testcase.
- `stdin`, a string containing the input to be given to the Python Tutor, to mimic this testcase.

![judge-output-reflection](./judge-output.png)

#### Partial output
Expand Down
7 changes: 6 additions & 1 deletion nl/references/judges/creating-a-judge/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ The `run` executable should output JSON to _stdout_, which will be interpreted b

#### Full output

The complete format description can be found on <!-- TODO --> [the wiki](<https://github.com/dodona-edu/dodona/wiki/Judge-output-format-(proposal)>) and is specified through a [JSON schema](https://github.com/dodona-edu/dodona/tree/develop/public/schemas). A more concise format can be found below. (Note: all items are rendered in the order used below; all list-type keys are optional, defaulting to the empty list as value)
The complete format description is specified through a [JSON schema](https://github.com/dodona-edu/dodona/tree/main/public/schemas). A more concise format can be found below. (Note: all items are rendered in the order used below; all list-type keys are optional, defaulting to the empty list as value)

The full output returns a single JSON at the end. You must ensure that this is emitted before the docker runs out of time or memory.

Expand All @@ -77,6 +77,7 @@ The full output returns a single JSON at the end. You must ensure that this is e
- An optional `description`, a `Message` object (probably a statement formatted as `code`).
- `tests`, a list of `Test` objects.
- `messages`, a list of message objects.
- `data`, an optional `DebugData` object.
- A `Test` object (used, e.g. to test either the returned and printed output of a statement) consists of:
- An optional `description`, a `Message` object.
- `accepted`, a boolean indicating whether this test is considered correct. `true` results in only showing the `generated` string, `false` results in showing a "diff" between the `generated` and `expected` strings.
Expand Down Expand Up @@ -121,6 +122,10 @@ The full output returns a single JSON at the end. You must ensure that this is e
- `"internal error"`, the judge exited with a non-zero status code.
- `"unknown"`, something went wrong.

- A `DebugData` object is used to run the Python Tutor that gives students a debug interface. Currently it is only relevant for Python. It consists of:
- `statements`, a string containing the extra code to be executed in the Python Tutor, to mimic this testcase.
- `stdin`, a string containing the input to be given to the Python Tutor, to mimic this testcase.

![judge-output-reflection](./judge-output.png)

#### Partial output
Expand Down

0 comments on commit 32abb52

Please sign in to comment.