-
Notifications
You must be signed in to change notification settings - Fork 106
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
WorkflowTemplate/ClusterWorkflowTemplate create_as_workflow #669
Conversation
Codecov Report
@@ Coverage Diff @@
## main #669 +/- ##
=======================================
+ Coverage 74.5% 76.1% +1.6%
=======================================
Files 44 45 +1
Lines 3030 3088 +58
Branches 577 584 +7
=======================================
+ Hits 2259 2352 +93
+ Misses 597 566 -31
+ Partials 174 170 -4
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
ab6fba6
to
b5a304b
Compare
While working on top of #669, thought we could work towards better testing and because the patch coverage was so low I figured it would help. Separate PR to highlight changes but will merge down * Adds mocker `dev` dependency * Create test_unit folder, added `Workflow.create` test to demonstrate ideal usage * Add `cov-report=term-missing` to pytest `make test` target to encourage us to improve coverage - this will report a table back to us in terminal of coverage and missing lines --------- Signed-off-by: Elliot Gunton <egunton@bloomberg.net>
09ce72e
to
547ad57
Compare
While working on top of #669, thought we could work towards better testing and because the patch coverage was so low I figured it would help. Separate PR to highlight changes but will merge down * Adds mocker `dev` dependency * Create test_unit folder, added `Workflow.create` test to demonstrate ideal usage * Add `cov-report=term-missing` to pytest `make test` target to encourage us to improve coverage - this will report a table back to us in terminal of coverage and missing lines --------- Signed-off-by: Elliot Gunton <egunton@bloomberg.net>
b6bbc0f
to
87465ce
Compare
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.
Looks great @elliotgunton 🎖️ I left a question re: interfacing with the generated name option. Will approve after the discussion/potential change
91323ec
to
41af9fe
Compare
Signed-off-by: Elliot Gunton <egunton@bloomberg.net>
Signed-off-by: Elliot Gunton <egunton@bloomberg.net>
Signed-off-by: Elliot Gunton <egunton@bloomberg.net>
Signed-off-by: Elliot Gunton <egunton@bloomberg.net>
While working on top of #669, thought we could work towards better testing and because the patch coverage was so low I figured it would help. Separate PR to highlight changes but will merge down * Adds mocker `dev` dependency * Create test_unit folder, added `Workflow.create` test to demonstrate ideal usage * Add `cov-report=term-missing` to pytest `make test` target to encourage us to improve coverage - this will report a table back to us in terminal of coverage and missing lines --------- Signed-off-by: Elliot Gunton <egunton@bloomberg.net>
Signed-off-by: Elliot Gunton <egunton@bloomberg.net>
Signed-off-by: Elliot Gunton <egunton@bloomberg.net>
Signed-off-by: Elliot Gunton <egunton@bloomberg.net>
Signed-off-by: Elliot Gunton <egunton@bloomberg.net>
* Remove pytest-mock usage (use unittest.mock) Signed-off-by: Elliot Gunton <egunton@bloomberg.net>
Signed-off-by: Elliot Gunton <egunton@bloomberg.net>
5ee34c6
to
3e3c528
Compare
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.
🚀
Pull Request Checklist
run_as_workflow
method #521Description of PR
Currently, the DevEx for a workflow template is either:
workflowTemplateRef
,templateRef
or via CLIsubmit --from
This PR adds
create_as_workflow
function (reflecting existing naming in theWorkflow
class rather thanrun_as
)kind
in place, then submits to Argo throughWorkflow.create
wait
andpoll_interval
(was hesitant to just usekwargs
)ClusterWorkflowTemplate
as a subclass ofWorkflowTemplate
as it was missing, added toTWorkflow
typeWorkflowTemplate
, as we need to call the rightWorkflowService
functionsbuild
just converts the pydantic model toClusterWorkflowTemplate
.