CSCI128 / 101GradingScript

Script designed to move grades between Gradescope and Canvas
https://gradingscript.trihardstudios.com/#/
0 stars 0 forks source link

[BUG] Separate UI and Config Modules #53

Open gregbell26 opened 1 year ago

gregbell26 commented 1 year ago

Description

Issue

There is a lot of business logic currently mixed with the UI in the Config module. This is a contributing factor to the mess that is the config module.

Steps to recreate

N/A

Solution

Separate the UI and business logic in the config module. config.newConfigFile is the most egregious example of this, however many of the methods in this module exhibit similar issues.

Should move business logic into separate, unit-testable, methods and move the UI into the UI module. See UI.standardGrading for an example of how this was done in the past.

Ideally, all user input should be handled by the uiHelpers.getUserInput method.

The other major thing for consideration is how we want to read the config. Currently, we are doing it with a single call to config.readConfig in the main method, which handles the reading and selection in the event that there are many config files. I also want to separate the business logic (getting the list of available configs, reading the selected one) and the UI (selecting the config file).

Acceptance Criteria

gregbell26 commented 1 year ago

Wait for #47 to be resolved before working on this issue.