Extract file I/O from config models into a TemplateRenderer service
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
Research direction
Start with the duplicated render_files() implementations in config/image/version.py and config/image/matrix.py, then inspect config/config.py and the existing config/templating/ code. Define the TemplateRenderer around the structured inputs described in the issue, delegate rendering from both models, and verify that model validation no longer requires a real filesystem.
Written by the indexing model from the issue text.
Description
`ImageVersion` and `ImageMatrix` both contain Jinja2 rendering logic and filesystem operations alongside model validation. Their `render_files()` implementations are nearly identical — the same Jinja2 environment setup, the same template-walk logic, the same error-aggregation pattern, and the same file-write calls — duplicated across both classes.
Testing `ImageVersion` rendering currently requires constructing a full model hierarchy with parent pointers and a real filesystem. That makes model validation tests expensive and tightly coupled to I/O.
Extract a `TemplateRenderer` service that accepts structured inputs (template values, template paths, output paths) and produces file artifacts. Both `ImageVersion` and `ImageMatrix` delegate to it, eliminating the duplication and allowing model validation tests to run without a real filesystem.
Files: `config/image/version.py`, `config/image/matrix.py`, `config/config.py`, `config/templating/`
- Dominant language
- Python
- Stars
- 2
- Forks
- 0
- Avg merge
- 4d 11h
- Merged PRs (30d)
- 24
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from posit-dev/images-shared
-
cvp:0 docker tdp:1
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
posit-dev/images-shared#757 · 2 comments ·
Maintainers usually reply within 1 day
-
bug cvp:0 docker priority/medium python tdp:1
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
posit-dev/images-shared#685 ·
Maintainers usually reply within 1 day
-
slack-build-notify: no persisted alert state — causes suppressed repeat-failure and recovery alertsOpenbug cicd cvp:0 docker needs discussion observability tdp:2
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
posit-dev/images-shared#677 ·
Maintainers usually reply within 1 day
-
cvp:0 docker tdp:2 tech debt
Difficulty 4/5 3-5 days Newbie friendliness 48/100
posit-dev/images-shared#795 ·
Maintainers usually reply within 1 day
-
cicd cvp:0 docker enhancement tdp:2
Difficulty 5/5 Over a week Newbie friendliness 35/100
posit-dev/images-shared#773 ·
Maintainers usually reply within 1 day
All issues in posit-dev/images-shared
Similar issues
-
correction metadata
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
acl-org/acl-anthology#10104 · 1 comment ·
Maintainers usually reply within 1 day
-
bug status/needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
prowler-cloud/prowler#12885 · 1 comment ·
Maintainers usually reply within 1 day
-
Bug in GaussianTailProbabilityCalibrator: running_statistics=False still uses a windowed varianceOpenbug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
selimfirat/pysad#107 ·
Maintainers usually reply within 1 day
-
bug ci-failure high priority
Difficulty 1/5 Under an hour Newbie friendliness 88/100
vllm-project/vllm-omni#8194 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day