-
Notifications
You must be signed in to change notification settings - Fork 8
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
Enable searching for included templates when rendering jinja2 templates. #15
Merged
Conversation
This file contains 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
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #15 +/- ##
===========================================
- Coverage 48.91% 48.87% -0.05%
===========================================
Files 15 15
Lines 1429 1416 -13
Branches 305 308 +3
===========================================
- Hits 699 692 -7
+ Misses 676 670 -6
Partials 54 54 ☔ View full report in Codecov by Sentry. |
This was referenced Mar 2, 2024
CoryMartin-NOAA
approved these changes
Mar 4, 2024
CoryMartin-NOAA
pushed a commit
to NOAA-EMC/GDASApp
that referenced
this pull request
Mar 4, 2024
This PR: - updates the snowDA yamls to jinja2 templates removing all `$( )` and `${ }` template forms. - all inclusion is now performed via jinja2 `include` with the appropriate indentation. - jinja2 templates for yamls now carry a `.j2` extension to identify them as templates. - requires `feature/jinja2_includes` branch from `wxflow`. `parse_j2yaml` from `wxflow` now does not render the `$( )` templates. This change is **not** backwards compatible. Corressponding PRs in `wxflow` and `global-workflow` are: - NOAA-EMC/wxflow#15 - NOAA-EMC/global-workflow#2371
Closed
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.
Description
The current implementation of jinja2 rendering was unable to support
include
when the included template was in a location not directly under the current template directory.This PR:
searchpath
as well as from/
$( )
from functionparse_j2yaml
. This was a stop gap measure to allow prototyping in the DA applications. Those have now matured that this stop gap needed to be addressed holistically.jinja2.py
andyaml_file.py
. Test for theinclude
is added.Type of change
How Has This Been Tested?
include
including nesting.Checklist