-
Notifications
You must be signed in to change notification settings - Fork 178
[MAINT] use jinja in the macros #2083
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
Draft
Remi-Gau
wants to merge
14
commits into
bids-standard:master
Choose a base branch
from
Remi-Gau:jinja
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 3 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
a136224
ref remark in make
Remi-Gau 39b1a43
use template for entity definition
Remi-Gau fa48b67
template common principles
Remi-Gau 7d3c26c
fix
Remi-Gau 0e17884
fix
Remi-Gau fb1aacc
add templates to package"
Remi-Gau 4684ef1
fix
Remi-Gau 7f65035
Merge remote-tracking branch 'upstream/master' into jinja
Remi-Gau 4c93c49
use template for glossary item
Remi-Gau 4afff81
fix
Remi-Gau abb53fb
fix
Remi-Gau 4ba439c
rm indent
Remi-Gau 3dca075
unordered list
Remi-Gau e64ec6d
reset indent
Remi-Gau File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -82,6 +82,7 @@ repos: | |
- click | ||
- markdown-it-py | ||
- importlib_resources | ||
- jinja2 | ||
- pandas-stubs | ||
- pyparsing | ||
- pytest | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. unrelated: could be extracted in separate PR |
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
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
4 changes: 4 additions & 0 deletions
4
tools/schemacode/src/bidsschematools/render/templates/common_principle.jinja
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{% for principle in principles %} | ||
1. **{{ principle.display_name }}** - {{ principle.description }} | ||
|
||
{% endfor %} |
11 changes: 11 additions & 0 deletions
11
tools/schemacode/src/bidsschematools/render/templates/entity_definition.jinja
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
## {{ entity.name }} | ||
|
||
**Full name**: {{ entity.display_name }} | ||
|
||
**Format**: `{{ entity.name }}-<{{ entity_info.format }}>` | ||
|
||
{% if entity.allowed_values %} | ||
**Allowed values**: `{% for value in allowed_values %}{{ value }}{% if not loop.last %}, {% endif %}{% endfor %}` | ||
{% endif %} | ||
|
||
**Definition**: {{ description }} |
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
Oops, something went wrong.
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.
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.
unrelated: could be extracted in separate PR