Skip to content

Commit

Permalink
Refactor template processing to include process modes
Browse files Browse the repository at this point in the history
Updated the build process to handle template paths with associated processing modes. This change lays the groundwork for incorporating `skip` and `copy_only` attributes in a future update, as noted in TODO[#20].
  • Loading branch information
coordt committed Jan 5, 2025
1 parent 6157738 commit c2ab5ed
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion project_forge/commands/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ def build_project(
overlay.ask_questions = False
context = build_context(composition, ui_function, initial_context)

template_paths = [overlay.pattern.template_location.resolve() for overlay in overlays] # type: ignore[union-attr]
# TODO[#20]: Need to incorporate `skip`, and `copy_only` attributes to the templates for rendering

template_paths = [
(overlay.pattern.template_location.resolve(), overlay.pattern.get_process_mode) for overlay in overlays
]
inheritance = catalog_inheritance(template_paths)
env = load_environment(inheritance)
root_path = render_env(env, inheritance, context, output_dir)
Expand Down

0 comments on commit c2ab5ed

Please sign in to comment.