Conversation
Contributor
Author
|
@inducer, let me know what you think. I'll add tests if you think there shouldn't be any major re-write. |
Codecov Report
@@ Coverage Diff @@
## master #679 +/- ##
==========================================
- Coverage 96.56% 96.08% -0.49%
==========================================
Files 45 46 +1
Lines 11215 11459 +244
Branches 2084 2137 +53
==========================================
+ Hits 10830 11010 +180
- Misses 298 361 +63
- Partials 87 88 +1
Continue to review full report at Codecov.
|
isuruf
commented
Oct 28, 2019
|
|
||
| class FormsBase(SingleCourseTestMixin, MockAddMessageMixing, TestCase): | ||
|
|
||
| initial_commit_sha = "f3e9d31a61714e759a6ea12b900b173accb753f5" |
Contributor
Author
There was a problem hiding this comment.
@inducer, I used this commit from inducer/relate-sample#12 which has flows/instant_flow.jinja file and it is included by the created flow using {% include 'flows/instant_flow.jinja' %}, but when I try this in tests the templating engine can't find this file. How can I make jinja2 see this file?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cc @lukeolson
A form description looks like https://github.com/isuruf/relate-sample/blob/91226393241cfed6457db533addfb2da6e83f645/forms/instant.yml
There are 5 types of fields.
Text, Integer, Float, Choice, Hidden.template_inandtemplate_outare mandatory fields and they can be eitherHiddenorText. IfHiddenthe values are fixed, but ifText, the user who fills the form can fill them.If
template_out=flows/asd.ymlthen the actual output would beflows/asd_20190930_022148_311577.ymlwhere the time is appended.There's a type for a form which is only
flowfor now. If there's aannouncefield and set to true and the type is aflow, then anInstantFlowRequestis created.Flow created looks like
The templated flow
template_incan use the form variables by their id and also have access tocreated_timeandid.created_timeis useful for instant flows that @lukeolson mentioned.Let me know what you think.