Repository navigation
Implement Exercise Reset Functionality #152
Description
Activity
The coincides with another change I wanted to make. Basically when the user starts clings, a new directory should be created from the source exercises containing all the exercises. Rustlings does exactly this.
This change would enable that feature.
Reacted by tetsuoSomething about great minds thinking alike.
I can work on this. Can one of you assign it to me @danwritecode @7etsuo
Done @tunahorse! Before you dive to deeply let me know your approach. This change may require some fundamental changes of the directory structure. Basically something like this:
- There is a directory that serves as our source of truth and is never changed
- On first time startup we create a new directory holding all the exercises, these are the ones the user will be working in directly. Important to note here that this can only be done the first time the user starts the application otherwise we'll overwrite their work.
Yeah I was thinking the same.
Something like a bash/python script has a "master dir" and that one doesn't get touched. On launch new dir is made "dev" and this is the dir we do the execerise on. Dev dir is only made the first time.
If someone wants to reset the whole thing we just nuke it and copy the master dir. If they want to do specific N exercise, we do the same but only for this specific exercise.
Reacted by DanPerfect, open a PR early and let's just take a look at things quickly to make sure we're on the same page before you dive too deep.
Reacted by tunaPerfect, open a PR early and let's just take a look at things quickly to make sure we're on the same page before you dive too deep.
Opened a pr on #183 to discuss a basic plan
Reacted by Dan
A feature to reset exercises would allow more user control.
This could include two main components:
Global Reset: A 'Reset All' function that allows users to reset all exercises simultaneously.
Individual Reset: A 'Reset N' function, where 'N' represents a specific exercise number (e.g., 1, 2, ..., num_exercises).