Coder Social home page Coder Social logo

xr's Introduction

XR: The Exercism Runner

This repository provides a shell plugin one can use in order to speed up repetitive but necessary steps when reviewing submissions as an @exercism mentor, such as: download the latest iteration of a student, compile and run the tests, import and run a custom set of benchmarks, view mentoring notes, etc...

Supported tracks

The plugin currently supports a good amount of track environments, at least when considering unit testing automation:

  • Bash: tests only.
  • C: tests only.
  • C++: tests only.
  • C#: tests only.
  • F#: tests only.
  • Go: tests and partial benchmarks (just running, no importing).
  • Groovy: tests only.
  • Haskell: tests and partial benchmarks.
  • Java: tests only.
  • JavaScript: tests only.
  • Kotlin: tests only.
  • Perl5: tests only.
  • PHP: tests only.
  • Python: tests only.
  • Ruby: tests only.
  • Rust: tests and full benchmarks.
  • Scala: tests only.
  • TypeScript: tests only.

If you would like to see a new track supported or an already-existing one improved, take a look at the contributing guidelines.

Requirements

This tool is a shell plugin: a collection of shell constructs one will source in order to retrieve them. The shell itself must be Bash-compatible, like Bash obviously but Zsh as well for example. Then there are the programs and libraries required by the track you are mentoring for, in particular the exercism CLI itself. Other than that, it only uses core utilities expected on any GNU operating system, such as cp, grep, sed, cut, rm... and a text editor available from the shell and set as the value of the $EDITOR environment variable if you wish to use the xr edit functionality.

Installation

  • If you are using Zsh with a plugin manager similar to OhMyZsh, then you can simply clone this repository in the directory dedicated to custom plugins, usually: ~/.oh-my-zsh/custom/plugins and then add this plugin's name to the plugins array in your shell's main configuration file, like ~/.zshrc for Zsh:

    plugins=(
        ...     # Other plugins you may have.
        xr
    )

    In order to get upcoming updates easily, we would recommend using a dedicated plugin.

  • If you only have Bash or a Bash-like shell without an equivalent plugin manager, then you have to clone this repository somewhere on your file system that is convenient for you and then add the following line to your shell's main configuration file, like ~/.bashrc for Bash:

    source <path-to-repo>/xr.sh

Usage

Once the plugin successfully sourced, one can then start to use the provided xr shell function. Type xr help to get started with a more detailed overview of its capacities.

The usual workflow is as such:

  • Run xr <uuid> where <uuid> is a given submission's identificator as listed on the iteration page. This will: download the submission, go to its directory, potentially force-activate, compile and run all the available unit tests.
  • If you wish you may then run the tests again using xr test.
  • Run xr bench to automatically import, compile and run benchmarks if they exist for the current track and exercise.
  • Run xr notes to display the mentoring notes for the current exercise.
  • Run xr edit in order to open the mentoring notes for the current exercise using the configured text editor.
  • When done for the day, you may run xr clean in order to remove all downloaded exercise submissions.

Contributing

See the contributing guidelines.

xr's People

Contributors

pauldance avatar bobahop avatar francescoalemanno avatar glennj avatar

Watchers

James Cloos avatar

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.