Coder Social home page Coder Social logo

class-grade's Introduction

Class Grade Runner

This is a class grade runner designed to be used with GitHub Classroom and the GitHub classroom desktop tool. It enables a batch command to be run on a set of directories--for example the set of github repositories downloaded for an assignment from github classroom.

It also has a command that given a folder of JUnit compatible xml Test results will create a csv with the top-line statistics, using each file as a key.

Using

As of this writing, the class grade runner is a work in progress. It's written using Deno, a new typescript based successor to node. The Deno environment needs to be installed on a computer to run. Once installed, the work in progress can be run.

The command needs to be given filesystem read an write privileges to work correctly. It also currently uses some of the standard libraries for expanding wild cards and so on; so for example:

deno run --allow-read --allow-write --unstable main.ts --help

will output the help text.

Installing locally

For this early version, there isn't an install from the net; but you can make it a cli by using the following deno command from the root directory of the repository on your machine:

deno install --allow-read --allow-write --unstable --name gh-grade main.ts

Then, assuming your path is configured correctly (See the page on the deno script installer) you can run the command by simply typing

gh-grade --help

at the command line

Commands

Assuming installation, the following commands and options are available:

run-test: Run a command on each repository / directory

gh-grade run-tests

run-tests Options

--command command

the command to run in each directory. by default, a file marker token, _OUTPUT_ can be used to specify the location of the output file.

For example, to run phpunit on testfile.php; and place the xml junit output in a directory; the option would be:

gh-grade run-tests --command phpunit --log-junit _OUTPUT_ ./myTest.php

This would cause phpunit to be executed for each directory; replacing _OUTPUT_ with a path to a filename in the results directory.

--resultsPath path

the path where the results files should go. _results in the current directory by default.

--path path

Parent path which has subdirectories on which the command will be run. For example, the directory where github classroom saved all the repositories for a given assignment

--max number

run for the first number directories (good to make sure the command works...).

junit2csv: create a summary csv file from a directory of junit xml files

junit2csv looks through a directory of xml files output in junit compatible format; and for each file, takes the summary statistics from the first test suite in the file. It skips files in the path that are not compatible. It creates a csv with columns for filename, tests, errors, failures, assertions, and running time.

junit2csv options

--test-dir path

path to location of the junit xml files (default current directory)

--results path

file name to store the comma delimited results (default results.csv in the current directory)

junit2csv option: --max number

run for the first number files (good to make sure the command works...).

Structure

class-grade's People

Contributors

toddwseattle avatar

Watchers

 avatar James Cloos avatar

Forkers

isaackumi

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.