Skip to content

Split solution templates to two to support input examples#57

Merged
katzuv merged 2 commits into
mainfrom
example-input
May 7, 2026
Merged

Split solution templates to two to support input examples#57
katzuv merged 2 commits into
mainfrom
example-input

Conversation

@katzuv

@katzuv katzuv commented May 7, 2026

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings May 7, 2026 18:15
@katzuv katzuv changed the title Split solution templates to two to support example inputs Split solution templates to two to support input examples May 7, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the solution runner’s “setup” scaffolding by replacing the single solution_template.py with separate p1.py and p2.py templates, enabling an inline example_input workflow when running scripts without CLI-provided input.

Changes:

  • Added new solution templates solution_templates/p1.py (with example_input) and solution_templates/p2.py (fallbacks to p1.example_input).
  • Updated setup_command to copy per-part templates from a templates directory instead of a single template file.
  • Replaced SOLUTION_FILE_TEMPLATE_PATH with a templates-directory constant and removed the old single template file.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
solution_runner/commands/solution_templates/p1.py New Part 1 template including example_input fallback when run without argv input.
solution_runner/commands/solution_templates/p2.py New Part 2 template; reuses Part 1 example_input when run without argv input.
solution_runner/commands/setup_command.py Copies p1.py/p2.py templates from a templates directory during setup.
solution_runner/commands/consts.py Swaps from a single template path constant to a templates-directory constant.
solution_runner/commands/solution_template.py Removes the old single-template file.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread solution_runner/commands/consts.py Outdated
Comment thread solution_runner/commands/consts.py
Comment thread solution_runner/commands/setup_command.py
@katzuv katzuv merged commit 1defa40 into main May 7, 2026
1 check passed
@katzuv katzuv deleted the example-input branch May 7, 2026 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants