Skip to content

Implement Exercise Reset Functionality #152

Description

@7etsuo

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

Activity

  1. danwritecode commented on Jun 7, 2024

    @danwritecode
    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.

  2. 7etsuo commented on Jun 7, 2024

    @7etsuo
    CollaboratorAuthor

    Something about great minds thinking alike.

  3. tunahorse commented on Aug 9, 2024

    @tunahorse
    Contributor

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

  4. danwritecode commented on Aug 11, 2024

    @danwritecode
    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.
  5. tunahorse commented on Aug 12, 2024

    @tunahorse
    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.

  6. danwritecode commented on Aug 13, 2024

    @danwritecode
    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.

  7. tunahorse commented on Aug 15, 2024

    @tunahorse
    Contributor

    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

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions