-
Notifications
You must be signed in to change notification settings - Fork 60
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
Refactored validation functionality and added rules #629
Refactored validation functionality and added rules #629
Conversation
Hello @JayjeetAtGithub! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2019-05-04 04:21:13 UTC |
c3e0ad1
to
c90e5bd
Compare
@ivotron You may have a look |
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 a lot @JayjeetAtGithub ! This is looking great! Some comments:
- We can rename
Workflow
toWorkflowRunner
. And then create aWorkflow
class in theparser.py
module. In this way, we separate the logic of creating the workflow and executing it.Workflow
would represent the contents of the workflow;WorkflowRunner
is in charge of executing it. - The
Workflow
abstraction can encapsulate the workflow and be the interface to obtaining information about it (as opposed to representing the workflow via a dictionary as we do right now). This class can expose properties/methods such asname()
,stages()
(an iterator to iterate the stages of a workflow), etc.. - The
complete_graph()
function can also be part of theWorkflow
class. - Since the
check_secrets
function is related to the execution of the workflow, we could leave it in this newWorkflowRunner
class.
I know that, strictly speaking, the above is kind of out of the scope of this PR, so feel free to create another issue if you think we should address that separately. I figured we could take this opportunity to do this type of refactoring.
Thanks a lot @ivotron ! I will implement the required changes shortly. |
5eb8bb8
to
9d22944
Compare
529c19c
to
13b9549
Compare
@ivotron Please have a look ! |
thanks a lot @JayjeetAtGithub ! |
Creates a parse.py script that is in charge of dealing with parsing HCL files. fixes #609
Creates a parse.py script that is in charge of dealing with parsing HCL files. fixes #609
Creates a parse.py script that is in charge of dealing with parsing HCL files. fixes #609
Creates a parse.py script that is in charge of dealing with parsing HCL files. fixes #609
Addresses #609