Skip to content

chore: housekeeping — examples pin, doc fixes, import cleanup#24

Merged
mmcky merged 2 commits into
mainfrom
chore/housekeeping-docs-cleanup
Jun 5, 2026
Merged

chore: housekeeping — examples pin, doc fixes, import cleanup#24
mmcky merged 2 commits into
mainfrom
chore/housekeeping-docs-cleanup

Conversation

@mmcky

@mmcky mmcky commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Summary

A single housekeeping pass wrapping up the remaining low-risk tidy-ups from TECHNICAL-REVIEW.md plus a docs review. No behavior changes; +52 / −184 across 6 files.

What changed

Code

  • §8.9 — hoisted lazy imports. github_handler.py did from . import __version__ inside four separate methods. Moved to a single module-top import (there's no circular import to avoid). Module imports cleanly; __version__ still resolves to 0.7.2.

Examples (user-facing)

  • §7.1 — bumped the example workflows examples/style-guide-comment.yml and examples/style-guide-weekly.yml from the long-stale @v0.3 to @v0.7, matching the docs/user/* snippets (which were already on v0.7).

Docs review

  • Rewrote the root CONTRIBUTING.md. It was a stale duplicate of the canonical docs/developer/contributing.md with broken instructionspip install -r requirements.txt (file removed in the uv migration) and a "Testing Locally" section invoking python -m style_checker.main --mode single (a module that doesn't exist; predates the action.py rename and the qestyle CLI). Replaced with a concise, correct quick-start (uv + qestyle/pytest) that defers to the canonical developer guide, so the two can't drift again.
  • .github/copilot-instructions.md — fixed three stale spots: the __version__ example 0.6.1 → 0.7.2; the release-process test command pytest → uv run pytest; and the stale literal v0.3 floating-tag example → a vX.Y placeholder consistent with the surrounding vX.Y.Z steps.
  • CHANGELOG — noted the examples pin bump under [Unreleased].

Deliberately left alone

  • action.py --mode single … in copilot-instructions is valid (action.py really has that argparse CLI) — not touched.
  • Historical references in CHANGELOG.md, PLAN.md, TECHNICAL-REVIEW.md, roadmap.md, and the prompts/v0.6.1/ archive are accurate records — left as-is.
  • §8.6 (warning-string fences) and §8.8 (commit-message truncation) are behavioral, not housekeeping — out of scope here.

Test plan

  • uv run pytest tests/ → 87 passed
  • ruff check clean
  • Example workflow YAML still parses
  • CI green on this PR

🤖 Generated with Claude Code

Wraps up the remaining low-risk tidy-ups from TECHNICAL-REVIEW plus a
docs review.

- §7.1: bump examples/*.yml action pin @v0.3 -> @v0.7 (the long-stale
  pin; docs/user/* already use v0.7). 2 files.
- §8.9: hoist the 4 lazy `from . import __version__` calls in
  github_handler.py to a single module-top import. No circular import
  to avoid; module imports cleanly.
- CONTRIBUTING.md: the root file was a stale duplicate with broken
  instructions (`pip install -r requirements.txt` and
  `python -m style_checker.main --mode single` — neither exists after
  the uv migration / action.py rename). Replaced with a concise, correct
  quick-start that defers to the canonical docs/developer/contributing.md.
- .github/copilot-instructions.md: version example 0.6.1 -> 0.7.2;
  `pytest` -> `uv run pytest`; stale `v0.3` release-tag example -> a
  `vX.Y` placeholder consistent with the surrounding `vX.Y.Z` steps.
- CHANGELOG: note the examples pin bump under [Unreleased].

Tests: 87 passed; ruff clean; example workflows still parse.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 5, 2026 05:05

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.

Pull request overview

Housekeeping pass to align docs and examples with the current v0.7.x release line and remove redundant lazy imports in the GitHub Action handler, without intended behavior changes in the checker itself.

Changes:

  • Hoist __version__ import to module scope in style_checker/github_handler.py (removing repeated per-method imports).
  • Update example workflows to use QuantEcon/action-style-guide@v0.7 instead of the stale @v0.3.
  • Refresh contributor and Copilot guidance docs to match the current uv-based workflow; note the examples pin bump in CHANGELOG.md.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
style_checker/github_handler.py Hoists __version__ import to module scope to avoid repeated lazy imports.
examples/style-guide-weekly.yml Pins example workflow to @v0.7.
examples/style-guide-comment.yml Pins example workflow to @v0.7 (but still needs an id fix for outputs usage).
CONTRIBUTING.md Replaces stale setup/testing instructions with a uv + qestyle/pytest quick start that defers to canonical docs.
CHANGELOG.md Notes the example workflow pin bump under Unreleased.
.github/copilot-instructions.md Updates version/test/release snippets to match current 0.7.2 and uv run pytest.

Comment thread examples/style-guide-comment.yml
The "Run style guide checker" step lacked `id: run-checker`, but a later
step references `steps.run-checker.outputs.pr-url`. Without the id that
reference resolves to an empty string, so the success message with the
PR link never fired (the workflow always posted "no PR created"). Adds
`id: run-checker` to match the existing reference, mirroring the working
style-guide-weekly.yml example.

Addresses Copilot review feedback on #24.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@mmcky mmcky merged commit 2d4fb68 into main Jun 5, 2026
4 checks passed
@mmcky mmcky deleted the chore/housekeeping-docs-cleanup branch June 5, 2026 05:22
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.

2 participants