-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add opticks cli #75
Add opticks cli #75
Conversation
type: 'select', | ||
name: 'winner', | ||
message: 'Please enter the winning side of the experiment:', | ||
choices: ['A', 'B'] |
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.
Technically opticks supports a, b, c, d, etc https://github.com/viodotcom/opticks/blob/master/src/core/toggle.ts#L11
Should we allow it here too?
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.
I think for ease in the beginning we keep it as is and expand if we think its necessary (I think there has only been 1 MVT since I joined?) - we can always use the full command if needed:
opticks-cli clean --id=ab-test-123 --winner=c
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.
OK fair enough, though I think we should design it to be flexible, optimizing for the most used case is fine here.
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.
Thanks for making the clean up process a lot nicer, @dale-french 🎉
type: 'select', | ||
name: 'winner', | ||
message: 'Please enter the winning side of the experiment:', | ||
choices: ['A', 'B'] |
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.
OK fair enough, though I think we should design it to be flexible, optimizing for the most used case is fine here.
Description
This PR does the following:
lib
: The existingopticks
librarycli
: A new CLI calledopticks-cli
which handles automated cleanup of toggle codeopticks
CLI
This is a first version of the CLI so does not come with all the bells and whistles (YET!). At the moment the CLI takes care of running JsCodeShift codemods in a way that is more user friendly than the existing scripts. In the future, this CLI will also be able to take care of removing unused files and dependencies used on the cleaned up side of the experiment using Knip.
At the moment, the CLI looks like this:
Without options specified
With options specified
Next steps
As this is a first version, I would like to test this in the real-world before making any additional improvements. Upcoming improvements would look something like this:
opticks
is published automaticallyopticks
andopticks-cli