-
Notifications
You must be signed in to change notification settings - Fork 456
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
feat: cleanup flag #1086
feat: cleanup flag #1086
Conversation
dd2f8f6
to
9c82e22
Compare
Thanks @CodeWithEmad ! I can take a look in a couple weeks after the conference and my vacation. |
Thank you, @kdmccormick. There's no rush for it. Enjoy your vacation. |
27dafaa
to
9399845
Compare
49dcea4
to
c2b1c19
Compare
c2b1c19
to
c4c1f19
Compare
c4c1f19
to
aebd3d5
Compare
6faad48
to
70b6239
Compare
@@ -0,0 +1 @@ | |||
- 💥[Feature] Enhance your workflow with the new `-c` or `--clean` option for the `tutor config save` command! This feature allows you to clean your environment before each save, ensuring that all files and directories within the `env/` folder are deleted, providing you with a fresh environment each time. (by @CodeWithEmad) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not a breaking change. The feature is only accessible behind a new argument. we can remove 💥 from the changelog.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1. Also, instead of calling on all users to enhance their workflow with this new flag, could you explain why a user would want to use it? Reading #967, my understanding is this most users will not need to use -c
; rather, only plugin developers or other advanced users will need it, as they are the ones who will need to clean files out of their environment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not a breaking change.
Oops. My bad.
could you explain why a user would want to use it?
How about this?
- [Feature] Added
-c
or--clean
option totutor config save
: For plugin developers and advanced users, this option cleans theenv/
folder before saving, ensuring a fresh environment for testing and development.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect 🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pending Dawoud's and my most recent comments, this looks good to me!
This will add a `-c` `--clean` flag to the save command and ensure that the env directory is deleted if it exists. Close overhangio#967
Before this, the "Interactive platform configuration" message was shown even if -I flag was set for tutor dev|local launch.
70b6239
to
111bb01
Compare
Thanks @CodeWithEmad !! |
The introduction of the `-c/--clean` option caused the deletion prompt to be displayed for every call to `tutor config save --interactive`. This is not the desired behaviour, as decided here: #1086 (comment) With this change, the prompt is only displayed when running: `tutor config save --interactive --clean`. The environment is still deleted on `tutor config save --clean`, but without prompt. We refactored the code with hooks, which simplifies the signature of the interactive prompt function.
The introduction of the `-c/--clean` option caused the deletion prompt to be displayed for every call to `tutor config save --interactive`. This is not the desired behaviour, as decided here: #1086 (comment) With this change, the prompt is only displayed when running: `tutor config save --interactive --clean`. The environment is still deleted on `tutor config save --clean`, but without prompt. We refactored the code with hooks, which simplifies the signature of the interactive prompt function.
This will introduce
-c
--clean
command, to make sure we have a new environment on save.Close #967