Skip to content

Refactoring scratch pad

Prasad Talasila edited this page Jan 23, 2019 · 74 revisions

Desirable Features in Descending Order

  1. Update feature tests based on the logger module.

  2. Implement the following commands
    autolabjs show status
    autolabjs show score -l <lab_name>
    autolabjs show score -l <lab_name> -i <student_id>
    autolabjs show time
    autolabjs show labs #show active labs only
    autolabjs show labs -c <category> #categories are: scheduled, active, late, expired, all

  3. Implement the following commands for admin of autolab servers (for now main server, but autolabcli need not concern itself with the name of the autolabjs component it is interacting with.
    autolabjs eval bulk --list <student_list>

    autolabjs lab create
    autolabjs lab update
    autolabjs lab delete

  4. Extend eval command to show the evaluation log.
    autolabjs eval [-l <lab_name> --lang <language>]
    The evaluation log can also be saved as username_labname_language_eval.log along side other log files. Since the evaluation logs are going to be long, we can ask the user before displaying the logs. Optionally, the logs can be displayed using exec("cat username_labname_language_eval.log | less").

  5. Refactoring of socket.io into a wrapper module with timeouts for all socket events and also a list of allowed events for each socket event.

  6. isomorphic-git seems like an ES2017 compatible, well-written and documented git library. Another possibility is nodegit. nodegit is a node.js compatible wrapper for libgit2. We can use one of these two libraries to integrate git functionality into autolabjs.

  7. Refactoring of views so that we can swap views based on configuration.

    • interface-level (object-level) compatibility between the views
    • dependency injection of view into view controller
      • Right number of view objects -- not one global view, or not too many small view objects
  8. Exception handling for all commands

  9. Change from CommonJS modules to ES6 modules with the help of esm. For a project that utilizes ES6 modules well, see moment. Also see a tutorial.

  10. Application working both as a standalone cli and also as a library-level dependency

  11. Implement the following commands
    autolabjs eval team --list <student_team_csv>

Completed Features

  1. Filter sensitive output from stdout and stderr of console.

  2. Generate proper error conditions. see issue #27.

  3. Sequence diagram for autolabcli application. Update on this page.

  4. autolabjs init must handle the password containing special characters. see issue #32.

  5. Debug messages sent to log manager by Winston logger.

  6. package (Module dependency) diagram for autolabcli application. Update on this page.

  7. Refactor long unit and integration tests.

  8. Add / move validation to controllers.

References

  1. mastering cli apps
  2. Mocking stdin and stdout in node
  3. Modular code structure in vorpal.js

Clone this wiki locally