Skip to content

Allow jinja templates in config as well as pipeline files - #136

Merged
joezuntz merged 3 commits into
masterfrom
jinja-config
Oct 8, 2026
Merged

joezuntz merged 3 commits into
masterfrom
jinja-config

Conversation

@joezuntz

@joezuntz joezuntz commented Jul 27, 2026 •

Copy link
Copy Markdown
Collaborator

Earlier changes allowed us to use Jinja2 templates in pipeline files. This change extends that to stage configuration files too.

Currently, template parameters are not allowed in config files, so only loops and similar features are useful. We may look at this again, but it would be a bit messy on the command line.

I also updated a test to fix a problem when it was re-run.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Template parameters are not propagated to stage configurations or the ancestors tool.

Review effort: Balanced
Findings: 1 High severity · 1 Medium severity

Open (2)
What changed in this PR

Adds Jinja rendering to stage configuration loading and related pipeline utilities.

Changes:

  • Renders stage configuration files before YAML parsing.
  • Updates tests and fixtures to exercise Jinja syntax.
  • Makes template execution tests safely rerunnable.
File Description
ceci/​stage.py Renders configuration before stage initialization.
ceci/​pipeline/​pipeline.py Renders pipeline-level stage configuration.
ceci/​tools/​ancestors.py Renders pipeline files in the ancestors tool.
tests/​config.yml Adds Jinja-based test configuration.
tests/​test_pipeline.py Uses template-aware loading.
tests/​test_flow_chart.py Uses template-aware loading.
tests/​test_executables.py Cleans generated directories before reruns.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread ceci/pipeline/pipeline.py
Comment thread ceci/tools/ancestors.py

This comment was marked as outdated.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The template rendering is consistently applied at relevant configuration-loading paths and covered by existing execution tests.

Review effort: Balanced
Findings: None

Resolved since last review (2)

@joezuntz
joezuntz merged commit cf592d9 into master Oct 8, 2026
11 checks passed
@joezuntz
joezuntz deleted the jinja-config branch October 8, 2026 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants