Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Exercise Reset Functionality #152

Open
7etsuo opened this issue Jun 7, 2024 · 7 comments
Open

Implement Exercise Reset Functionality #152

7etsuo opened this issue Jun 7, 2024 · 7 comments
Assignees
Labels
enhancement New feature or request large

Comments

@7etsuo
Copy link
Collaborator

7etsuo commented Jun 7, 2024

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).

@danwritecode
Copy link
Owner

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.

@7etsuo
Copy link
Collaborator Author

7etsuo commented Jun 7, 2024

Something about great minds thinking alike.

@danwritecode danwritecode added enhancement New feature or request large labels Jun 9, 2024
@tunahorse
Copy link
Contributor

I can work on this. Can one of you assign it to me @danwritecode @7etsuo

@danwritecode
Copy link
Owner

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:

  1. There is a directory that serves as our source of truth and is never changed
  2. 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.

@tunahorse
Copy link
Contributor

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.

@danwritecode
Copy link
Owner

Perfect, 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.

@tunahorse
Copy link
Contributor

tunahorse commented Aug 15, 2024

Perfect, 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request large
Projects
None yet
Development

No branches or pull requests

3 participants