-
Notifications
You must be signed in to change notification settings - Fork 9
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
Create the frontend to the scaffolder project #40
Conversation
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.
this round is done
click.secho(text, fg='cyan') | ||
|
||
def PrintNewLine(self): | ||
"""A new line added to output.""" |
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.
again, hopefully at least somewhat better
plasoscaffolder/frontend/frontend.py
Outdated
|
||
@classmethod | ||
def _AskDictQuestion( | ||
cls, question: scaffolder_interface.BaseQuestion) -> Dict[str, Type]: |
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
plasoscaffolder/frontend/frontend.py
Outdated
@classmethod | ||
def _AskDictQuestion( | ||
cls, question: scaffolder_interface.BaseQuestion) -> Dict[str, Type]: | ||
"""Ask the user a question and return a dict answer back. |
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
plasoscaffolder/frontend/frontend.py
Outdated
question (scaffolder_interface.BaseQuestion): the question to ask. | ||
|
||
Returns: | ||
dict: the answer as supplied by the user. |
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.
ack
ready for another round of review |
…e#41) * Adding a TS analyzer scaffolders. * Adding templates. * Adding test files. * minor linter errors. * responding to comments. * Update plasoscaffolder/templates/ts_sketch_analyzer.jinja2 Co-Authored-By: kiddinn <kristinn@log2timeline.net> * Update plasoscaffolder/templates/ts_sketch_analyzer.jinja2 Co-Authored-By: kiddinn <kristinn@log2timeline.net> * Update plasoscaffolder/templates/ts_sketch_analyzer.jinja2 Co-Authored-By: kiddinn <kristinn@log2timeline.net>
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.
A few more nits, and I've made some small fixups, so please remember to git pull
.
Looking at this more closely, I'm not thrilled about having all the frontend logic implemented as class methods vs normal methods. I'm also confused as to why the cli is implemented as an option callback instead of a normal click command.
Can you explain these choices, or refactor?
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.
so to explain choice of option callback vs. normal click command -> legacy, that's how it was done in the original tool.
That design choice necessitated that all functions in the frontend to be a classmethod. I just changed this to not be that way, that is use the regular click command instead, and then I Could refactor all classmethods to be just instance methods.
ready for another round |
plasoscaffolder/frontend/frontend.py
Outdated
question (scaffolder_interface.BaseQuestion): the question to ask. | ||
|
||
Returns: | ||
dict: the answer as supplied by the user. |
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 that'll be overkill. Added something here.
done |
removed the timeout |
Adding the front-end and tools to the scaffolder project.