Coder Social home page Coder Social logo

maddiereddy / assignment_git_witch Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vikingeducation/assignment_git_witch

0.0 1.0 0.0 12 KB

A command line natural language-ish GitHub querying machine, written test-first with modularity in mind.

JavaScript 100.00%

assignment_git_witch's Introduction

assignment_git_witch

A command line natural language-ish GitHub querying machine, written test-first with modularity in mind.

Maddie Rajavasireddy

Assignment Description: The GitWitch app

  1. CLI
    The CLI module should take any arguments passed to the node process (process.env), concatenate them into a string, and then pass them along to gitWitch.process(). It should then console.log() the string returned by the instance of GitWitch you've just called process on. One should be able to call $ ./src/CLI.js how many repos does griselda have? to run the application

  2. GitWitch
    This is the main module of your application code. However, it won't be very complex. GitWitch exists to compose smaller modules together in the correct order. GitWitch will take the input question string and pass it to an instance of QuestionParser, which should then return a command object that will be fed into an instance of CommandRunner, which will itself return a response object which will be fed into an instance of ResponseFormatter, which will finally return the formatted response string which can be returned. A test file for GitWitch will be included in the assignment

  3. QuestionParser
    As seen above, this module will process the question string and return a properly formatted command object. The nice thing about this module is that it's independent of the rest of the system. Because there are no collaborators or dependencies and we take a simple data structure (a string) as input, it will be a breeze to test. A test file for QuestionParser will be included in the assignment

  4. CommandRunner This module should take a command input—those objects returned by the QuestionParser with a username, subject, and query—and return a response object. The response object should share the username, subject, and query properties, but it should also contain a results property. If the query is "details", then the results property should be a list of objects of the given subject for the given user. So, if the subject is "repos", then it should contain a list of simple repo objects (perhaps with a name and description) property

  5. GitHub The CommandRunner should not deal with calls to the GitHub API, itself. Instead, it should depend on this GitHub module. This means that the CommandRunner should be tested using a mock GitHub object

  6. ReponseFormatter This module should take a response object—like those returned by the CommandRunner—and return a string output. This string should be the response that will be output to the command line. See the example output above, right beneath the Your Task header. Just like the QuestionParser, this module has no collaborators and should be quite simple to test

Commands:

to run app, in root directory:
node ./src/GitWitchCli.js what repos does maddie have?
for running IntegrationSpec:
jasmine-node ./spec/IntegrationSpec.js

assignment_git_witch's People

Watchers

 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.