Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
jon-bell committed Feb 11, 2025
1 parent ee2f722 commit 152fc50
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 29 deletions.
1 change: 0 additions & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions src/grader/Grader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import { Builder, MutantResult, TestResult } from './builder/Builder.js'
import GradleBuilder from './builder/GradleBuilder.js'
import Logger from './Logger.js'
import {
AutograderFeedback,
AutograderTestFeedback,
GradedPart,
GradedUnit,
isMutationTestUnit,
isRegularTestUnit,
PawtograderConfig
} from './types.js'
import { AutograderFeedback } from '../api/adminServiceSchemas.js'
export default async function grade(
solutionDir: string,
submissionDir: string
Expand Down Expand Up @@ -92,7 +92,6 @@ class Grader {
name: unit.name,
output:
'No results from grading tests. Please check overall output for more details.',
status: 'fail',
output_format: 'text',
score: 0,
max_score: unit.breakPoints[0].pointsToAward
Expand Down
28 changes: 3 additions & 25 deletions src/grader/types.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { AutograderFeedback } from "../api/adminServiceSchemas.js"

// Build configuration types
interface BuildConfig {
preset: 'java-gradle'
Expand Down Expand Up @@ -65,31 +67,7 @@ export type OutputVisibility =
| 'after_published' // Shown to students after grades are published

export type AutograderTestFeedback = AutograderFeedback['tests'][0]
export type AutograderFeedback = {
score?: number
output: {
[key in OutputVisibility]?: {
output: string
output_format?: OutputFormat
}
}
lint: {
status: 'pass' | 'fail'
output: string
output_format?: OutputFormat
}
tests: {
score?: number
max_score?: number
status?: 'pass' | 'fail'
name: string
name_format?: OutputFormat
output: string
output_format?: OutputFormat
tags?: string[]
extra_data?: { [key: string]: string }
}[]
}

export {
PawtograderConfig,
BuildConfig,
Expand Down

0 comments on commit 152fc50

Please sign in to comment.