Giter VIP home page Giter VIP logo

mock-fsosa-tlaserso's Introduction

GETTING STARTED: You should likely start with the /mock folder from your solution code for the mock gearup.

Project Details

This project largely is all stored in the REPLInput class, where the main logic occurs. A map from string to REPLFunction is used to store commands, and the commands either change variables inside of REPLInput (such as Mode or Path) or make calls to the mocked backend class. This class acts as the backend, responding to view and search calls. The REPLHistory class handles the output, printing differently based on the mode of the output and also whether the data to show is a string or a 2d array. If it is a 2d array, it converts the array into an html table before displaying it.

Design Choices

We chose to store history as a 2d array storing either strings or other 2d arrays so that we could use a single history array to store all of our ouputs. This allows us to retroactively change the history window based on switching between verbose and brief mode. We also convert the outputs into an html table if they are stored as a 2d array of strings (such as the outputs of view and search). To implement commands, we made a map from strings to REPLFunction within REPLInput that allows developers to add new commands by writing a function implementing REPLFunction then adding their function to the map with a string key (as shown in our examples). Our functions check the amount of arguments instead of leaving that responsibility to the back end.

Errors/Bugs

There are no bugs that we know of.

Tests

Felix wrote our testing class to verify the functionality of the front end. There are 66 tests. There are no unit tests because there was no need for them. The only functions that might need them are the mocked back end functions and those results were verified in the e2e testing.

How to

Running the server, pressing the log in button allows the entry of commands. Load_File "path" stores the input path as the filepath, View prints the entire contents of the file at the path, if it exists, as an html table, Mode switches the output mode, and Search "column" "query" performs the search function. We only have a few mocked searches, which are viewable in mockedBackEnd. They simulate searching by column number, header name, and terms in multiple rows.

Collaboration

We did not collaborate beyond each other.

(state all of your sources of collaboration past your project partner. Please refer to the course's collaboration policy for any further questions.)

mock-fsosa-tlaserso's People

Contributors

tlasersohn avatar github-classroom[bot] avatar felixsosa13 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.