Git Product home page Git Product logo

grade-node's Introduction

ghedsh-grade-node

npm

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 --save

Usage

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:

  • $name is the name of the relevant submodule section in .gitmodules
  • $path is the name of the submodule directory relative to the superproject
  • $sha1 is the commit as recorded in the superproject
  • $toplevel is 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.

grade-node's People

Contributors

ahcarlos avatar crguezl avatar

Watchers

James Cloos avatar  avatar  avatar

grade-node's Issues

Restringir la acción del `foreach` con una regexp

  • Restringir la acción del foreach con una regexp que actuen sobre $name o $path cob los que casan,
    • $name is the name of the relevant submodule section in .gitmodules, $path is the name of the submodule directory relative to the superproject.
    • grade-node -t /teacher/tests/dir -o output.md --name /regexp/
  • Restringir la acción del foreach con una regexp que actuen sobre $name o $path cob los que NO CASAN,
    • grade-node -t /teacher/tests/dir -o output.md --noname /regexp/

Soporte para Travis, CircleCI, etc.

  • Soporte para Travis, CircleCI, etc.
    • Se copian los tests del profesor y se hace un push
    • Se usa la API de Travis, CircleCI, etc. para obtener los resultados ?
    • Se generan las incidencias para los alus

mejoras en grade-node

  1. Directorio: no concatenar
  2. Copia del prof/ debe ser recursiva
  3. Los errores no salen en el informe
  4. Se asume "test": "mocha" en el package.jso

Información del paquete

He mejorado la información de ghedsh-grade-node- en el README. También he añadido un CHANGELOG y así nos es más fácil ver las cosas que cambiamos, añadimos, arreglamos, etc.
Ya está publicada la versión 1.0.4
@crguezl

falta la entrada bin en package.json

See the entry bin in the documentation of package.json:

A lot of packages have one or more executable files that they'd like to install into the PATH. npm makes this pretty easy (in fact, it uses this feature to install the "npm" executable.)

To use this, supply a bin field in your package.json which is a map of command name to local file name. On install, npm will symlink that file into prefix/bin for global installs, or ./node_modules/.bin/ for local installs.

For example, myapp could have this:

{ "bin" : { "myapp" : "./cli.js" } }

So, when you install myapp, it'll create a symlink from the cli.js script to /usr/local/bin/myapp.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.