Skip to content

docs: reference template method pattern#296

Merged
jmgate merged 3 commits into
sandialabs:masterfrom
lavaFreak:docs-template-method
Jun 4, 2026
Merged

docs: reference template method pattern#296
jmgate merged 3 commits into
sandialabs:masterfrom
lavaFreak:docs-template-method

Conversation

@lavaFreak

@lavaFreak lavaFreak commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Add a short note to the stage customization docs explaining that StagedScript follows the Template Method pattern.

Related Issue

Closes #105

What changed

  • Added a brief explanation in the “Customizing Stage Behavior” docs section.
  • Linked to a concise external reference for the Template Method pattern.

Validation

  • Reviewed the updated docs text in context.
  • Ran git diff --check.
  • I was not able to run the repo's Python tooling locally in this checkout because pytest and ruff are not currently installed in this environment.

Summary by Sourcery

Document the Template Method pattern usage in stage customization examples.

Documentation:

  • Add a brief explanation in the stage customization docs that StagedScript follows the Template Method design pattern.
  • Link to an external reference describing the Template Method pattern from the stage customization documentation.

@sourcery-ai

sourcery-ai Bot commented Jun 4, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Updates the stage customization documentation to briefly explain that StagedScript uses the Template Method pattern and adds an external reference link for further reading.

File-Level Changes

Change Details Files
Clarified documentation on how StagedScript can be customized by explicitly describing its use of the Template Method pattern and linking to an external reference.
  • Expanded the 'Customizing Stage Behavior' section to mention that StagedScript follows the Template Method design pattern.
  • Added a short explanatory note tying the pattern concept to how stages are overridden/customized in practice.
  • Inserted a link to a concise external reference that explains the Template Method pattern for readers unfamiliar with it.
doc/source/examples.rst

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot 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.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@jmgate

jmgate commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

praise: Thanks so much for the contribution, @lavaFreak 😀. Definitely should've done this ages ago—thanks for taking care of it.

todo: Could you please relocate your addition to the end of the stage implementation details page? If a user is reading through the docs sequentially, I'd like it to show up the first time they might realize the template method pattern is in play.

lavaFreak and others added 2 commits June 4, 2026 10:17
Just for consistency, and ease of readability.
@codecov

codecov Bot commented Jun 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (5760488) to head (c7b8c3a).

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #296   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            2         2           
  Lines          177       177           
  Branches        15        15           
=========================================
  Hits           177       177           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jmgate jmgate merged commit 9bf2d7d into sandialabs:master Jun 4, 2026
15 checks passed
@jmgate

jmgate commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

Thanks again, @lavaFreak. If there are any other issues you'd like to take a crack at, feel free. As you use the package, do let me know if you run into any problems, usability improvements, etc.

@lavaFreak

Copy link
Copy Markdown
Contributor Author

Thanks, Jason. I appreciate the helpful review and the invitation. I'll definitely be looking into some other issues in the repo.

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.

Reference the template method pattern

2 participants