ghedsh-grade-node
v1.0.6
Published
To be used with ghedsh. Helps teachers grading Node.js assignments.
Readme
ghedsh-grade-node
To be used with ghedsh. Helps grading Node assignments.
Prerequisites
Node.js version >=8.0.0 (async/await support).
Install
npm install ghedsh-grade-node --saveUsage
grade-node [--teacher/-t] </dir> <--output/-o> <output_file.extension>Options
--teacher or -t is the absolute path directory containing teacher's private tests.
--output or -o tests output file name.
--version or -v shows current package version.
--help or -h prints usage help.
Performance
If --teacher or -t option provided, ghedsh-grade-node will copy teacher's private tests into student's /test dir. (Else, jump to install dependencies process).
Runs npm intall.
Runs npm install --only=dev.
Runs npm test. (Assumes that npm test command from package.json will run all tests under /test directory).
Captures stdout and stderr into files.
Context (WIP)
Se trata de escribir un paquete npm que contiene un script grade-node que complementa la funcionalidad de evaluación de ghedsh.
Esta es la forma de uso desde ghedsh:
crguezl> ULL-ESIT-PL-1718> new_eval ale-eval /ale/i
...
crguezl> ULL-ESIT-PL-1718> cd repo ale-eval
...
crguezl> ULL-ESIT-PL-1718> foreach grade-node --teacher teacher-tests-dir --output grade.test.md
...grade-node recibe como argumento un directorio teacher-tests-dir/ que contiene las pruebas privadas (en mocha u otro framework) que ha escrito el profesor para la práctica
Para cada repo grade-node copia en el subdirectorio test/ del alumno los contenidos de teacher-tests-dir/
Recuerda que dentro de un git submodule foreach
... The command has access to the variables $name, $path, $sha1 and $toplevel:
$nameis the name of the relevant submodule section in .gitmodules$pathis the name of the submodule directory relative to the superproject$sha1is the commit as recorded in the superproject$toplevelis the absolute path to the top-level of the superproject.
grade-node hace un npm install y si tiene éxito un npm test redirigiendo la salida a un fichero markdown grade-test.md que queda en el repo del alumno.
Ahora el profe si quiere puede hacer algo como:
crguezl> ULL-ESIT-PL-1718> foreach gh-issue --title 'Resultado de las pruebas' --input grade-test.md...
que ejecutaría otro script gh-issue que enviaría los issues.
