-
Notifications
You must be signed in to change notification settings - Fork 7
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
Package Templating (va Liquid) #513
Conversation
Codecov Report
@@ Coverage Diff @@
## master #513 +/- ##
==========================================
+ Coverage 57.47% 57.61% +0.13%
==========================================
Files 224 232 +8
Lines 17297 17457 +160
==========================================
+ Hits 9942 10058 +116
- Misses 7355 7399 +44
... and 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
It's worth noting that this package seems to create decently contextual errors on it's own, but out-of-the-box there's no easy way to reuse the same error type from #499 like with the handlebars package |
This gets my vote for being a more capable templating engine. Not having conditionals would be too limiting. |
b6b1d18
to
d4b4cdd
Compare
I've submitted cobalt-org/liquid-rust#477 after our discussion today to see if it's really a bug or not |
4ca9a81
to
98de95c
Compare
It sounds like at some level, erroring when a value does not exist is desired in this implementation. This is still a little odd to me, but I've managed to rework the Which makes this ready to review |
5ca328a
to
4757496
Compare
5433114
to
657c4d3
Compare
ae67038
to
0ce2a24
Compare
0ce2a24
to
5956b8d
Compare
Signed-off-by: Ryan Bottriell <ryan@bottriell.ca>
Signed-off-by: Ryan Bottriell <ryan@bottriell.ca>
429ba67
to
438cdf0
Compare
My last comment about the default tag was not true. Although I remember doing that work it looks like I never pushed it and had to redo the implementation. I also addressed the linked issue in the liquid implementation and moved the dependency to my fork while the PR is open. This will need one last review! |
Signed-off-by: Ryan Bottriell <ryan@bottriell.ca> Signed-off-by: Ryan Bottriell <rbottriell@ilm.com>
Additionally, refactor the way that options and requests are loaded to use a consistent method of layering and de-duplication. Signed-off-by: Ryan Bottriell <ryan@bottriell.ca> Signed-off-by: Ryan Bottriell <rbottriell@ilm.com>
Signed-off-by: Ryan Bottriell <rbottriell@ilm.com>
Signed-off-by: Ryan Bottriell <rbottriell@ilm.com>
Signed-off-by: Ryan Bottriell <rbottriell@ilm.com>
Signed-off-by: Ryan Bottriell <rbottriell@ilm.com>
Signed-off-by: Ryan Bottriell <rbottriell@ilm.com>
Signed-off-by: Ryan Bottriell <ryan@bottriell.ca> Signed-off-by: Ryan Bottriell <rbottriell@ilm.com>
Signed-off-by: Ryan Bottriell <ryan@bottriell.ca> Signed-off-by: Ryan Bottriell <rbottriell@ilm.com>
Signed-off-by: Ryan Bottriell <ryan@bottriell.ca> Signed-off-by: Ryan Bottriell <rbottriell@ilm.com>
438cdf0
to
3b10510
Compare
An alternative templating language to #511
This implementation uses the liquid templating language. It has syntax more like jinja2, a much larger standard library of filters, control statements (if/else, unless/else, match/when), and other features. The extensions are more complex to write, but also arguably more powerful.
Example:
Yaml With Templating
Outputs:
See final yaml after rendering
TODO:
format_serde_error
reusetie into SPK Future Proofing #491 (maybe later)consider adding 'canned' includable templates for repetitive actionsos/arch optionsliquid version?)Closes #137