Skip to content

Print celebratory message on validation success - #27

Merged
leynos merged 5 commits into
mainfrom
codex/add-success-message-for-validation-completion
Aug 29, 2025
Merged

Print celebratory message on validation success#27
leynos merged 5 commits into
mainfrom
codex/add-success-message-for-validation-completion

Conversation

@leynos

@leynos leynos commented Aug 29, 2025

Copy link
Copy Markdown
Owner

Summary

  • print a celebratory message when all diagrams validate successfully
  • add integration test coverage for the success message

Testing

  • make check-fmt
  • make lint
  • make typecheck
  • make test

https://chatgpt.com/codex/tasks/task_e_68b1bfaac39c8322b4500f156e3c8ba3

Summary by Sourcery

Print a festive success message after all diagrams validate and add an integration test to ensure it only shows on success

New Features:

  • Print a celebratory message when all diagrams validate successfully

Tests:

  • Add integration test to verify celebratory message appears only on successful validation

@sourcery-ai

sourcery-ai Bot commented Aug 29, 2025

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

Reviewer's Guide

This PR enhances the CLI to print a celebratory message when all diagrams validate successfully and adds an integration test to cover this behavior.

File-Level Changes

Change Details Files
Print celebratory message on validation success in CLI
  • After iterating over all diagrams, check if all_success is true
  • Print "🧜‍♀️✨ All diagrams validated successfully!" when validation passes
  • Ensure return code remains 0 on success
nixie/cli.py
Add integration test coverage for success message
  • Define the expected celebratory message string
  • Assert the message appears in captured.out when exit code is 0
  • Assert the message is absent when there are validation failures
tests/integration/test_cli_behavior.py

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

@coderabbitai

coderabbitai Bot commented Aug 29, 2025

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features
    • Displays a celebratory success message when all diagrams validate successfully, improving user feedback on completion. Exit codes and behaviour remain unchanged.
  • Tests
    • Expanded integration tests to assert presence of the success message only on successful runs and its absence on failures, strengthening output verification.

Walkthrough

Add a module-level SUCCESS_BANNER: Final[str] constant and print it to stdout when all processed files remain successful; update integration test to import the constant and assert the banner appears on successful runs and is absent on failures. Return semantics unchanged.

Changes

Cohort / File(s) Summary
CLI Output Logic
nixie/cli.py
Add SUCCESS_BANNER: Final[str] = "🧜‍♀️✨ All diagrams validated successfully!"; print the banner to stdout (flush=True) after processing paths when all_success remains True. No change to exit codes or error handling.
Integration Tests
tests/integration/test_cli_behavior.py
Import SUCCESS_BANNER and assert captured.out contains the banner exactly once for successful runs (exit 0) and contains it zero times for failing runs; keep existing stderr and exit-code assertions.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant U as User
  participant CLI as nixie/cli.py
  participant V as Validator

  U->>CLI: Run command with file(s)
  loop For each Markdown path
    CLI->>V: Validate path
    V-->>CLI: Result (success/failure)
    alt all_success still True
      CLI-->>U: Print SUCCESS_BANNER (stdout, flush)
    else Failure encountered
      CLI-->>U: Do not print banner for this/remaining paths
    end
  end
  CLI-->>U: Exit (0 if all succeeded, non‑zero otherwise)
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

A mermaid waves at end of run,
A tiny banner greets the sun.
It sings when every check is true,
Falls silent when a failure’s due.
The CLI smiles — the job is done.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch codex/add-success-message-for-validation-completion

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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

Hey there - I've reviewed your changes and found some issues that need to be addressed.


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.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

💡 Knowledge Base configuration:

  • Jira integration is disabled

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 0f288c8 and 6919992.

📒 Files selected for processing (2)
  • nixie/cli.py (1 hunks)
  • tests/integration/test_cli_behavior.py (1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

**/*.py: Python changes must pass tests (unit and behavioral) before completion/commit
Python code must pass lint checks (make lint)
Python code must adhere to formatting standards (make check-fmt/make fmt)
Python code must pass type checking (make typecheck)
Follow core Python 3.13 style conventions per .rules/python-00.md
Apply best practices for context managers per .rules/python-context-managers.md
Follow generator and iterator patterns per .rules/python-generators.md
Follow function return conventions per .rules/python-return.md
Apply Python typing best practices per .rules/python-typing.md

**/*.py: Name Python files in snake_case (e.g., http_client.py, task_queue.py)
Classes must use PascalCase
Variables and functions must use snake_case
Module-level constants use UPPER_SNAKE_CASE
Prefix non-exported helpers or internal APIs with a single underscore
Use typing everywhere; maintain full static type coverage with Pyright
Use TypedDict or @DataClass for structured data; prefer @DataClass(slots=True) for internal-only
Avoid Any; use Unknown, generics, or cast() with justification if Any is used
Be explicit with return types for all public functions and class methods (e.g., -> None, -> str)
Favor immutability (prefer tuples to lists; use frozendict or types.MappingProxyType where appropriate)
Use # pyright: ignore sparingly and include an explanation when used
Avoid side effects at import time; modules should not modify global state or perform actions on import
Never hardcode secrets in source code
Write NumPy-style docstrings for public functions, classes, and modules
Add inline comments to explain non-obvious logic or decisions

**/*.py: Use context managers to encapsulate setup/teardown for resources (files, locks, connections) instead of manual management
Use @contextmanager from contextlib for straightforward, linear setup/teardown without persistent internal state
Implement a class-based context manager (enter/exit) when there is internal sta...

Files:

  • nixie/cli.py
  • tests/integration/test_cli_behavior.py

⚙️ CodeRabbit configuration file

**/*.py: - Keep cyclomatic complexity ≤ 12

  • Follow single responsibility and CQRS (command/query segregation)
  • Docstrings must follow the numpy style guide. Use a single-line summary for private functions and methods, and full structured docs for all public interfaces.
  • Move conditionals with >2 branches to predicate/helper functions
  • Avoid eval, exec, pickle, monkey-patching, ctypes, unsafe shell
  • Every module must begin with a triple-quoted docstring explaining its purpose, utility, and usage, including example calls if appropriate.
  • Comments and docs must follow en-GB-oxendict (-ize / -our) spelling and grammar
  • Lint suppressions:
    • Blanket # noqa, file-level skips, and categories are forbidden
    • Only narrow in-line disables (# noqa: XYZ) are permitted, and must be accompanied by FIXME: or a ticket link, and used only as a last resort.
  • Use pytest fixtures for shared setup (conftest.py or fixtures/)
  • Replace duplicate tests with @pytest.mark.parametrize
  • Prefer pytest-mock or unittest.mock for stubs/mocks
  • Use assert …, "message" over bare asserts
  • Reflect all API/behaviour changes in docs/ and update roadmap on completion
  • Files must not exceed 400 logical lines:
    • Decompose large modules into subpackages
    • Split large match/case or dispatch tables by domain and collocate with targets if appropriate
    • Move bulky data (fixtures, templates) to external files for parsing at runtime
  • Mutable defaults and shadowed built-ins are forbidden
  • All code must have clear type hints using modern style (A | B, list[str], class Foo[A]:, type Bar = int, etc.), with ABC imports drawn from the correct stdlib module.

Files:

  • nixie/cli.py
  • tests/integration/test_cli_behavior.py
tests/integration/test_*.py

📄 CodeRabbit inference engine (.rules/python-00.md)

Place integration tests under tests/integration/ with files prefixed with test_

Files:

  • tests/integration/test_cli_behavior.py
{**/unittests/test_*.py,tests/integration/test_*.py}

📄 CodeRabbit inference engine (.rules/python-00.md)

{**/unittests/test_*.py,tests/integration/test_*.py}: Use pytest idioms: prefer fixtures, parametrize broadly, avoid unnecessary mocks
Group related tests using classes with method names prefixed by test_
Write tests from a user's perspective; test public behaviour, not internals
Avoid excessive mocking; use doubles only for external services or non-deterministic behaviour

Files:

  • tests/integration/test_cli_behavior.py
🔇 Additional comments (1)
nixie/cli.py (1)

534-536: LGTM: Print celebratory banner once at the end.

Emits a clear, user-facing success indicator without altering control flow.

Comment thread nixie/cli.py
Comment thread tests/integration/test_cli_behavior.py Outdated

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 2

♻️ Duplicate comments (2)
nixie/cli.py (1)

537-538: LGTM — emit banner once after overall success with immediate flush.

This implements the earlier suggestion and prevents duplicate banners; stdout + flush=True is appropriate.

tests/integration/test_cli_behavior.py (1)

8-8: LGTM — import the module constant to prevent drift.

Ties the test to the single source of truth for the banner text.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

💡 Knowledge Base configuration:

  • Jira integration is disabled

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 6919992 and 739dc7c.

📒 Files selected for processing (2)
  • nixie/cli.py (3 hunks)
  • tests/integration/test_cli_behavior.py (2 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

**/*.py: Python changes must pass tests (unit and behavioral) before completion/commit
Python code must pass lint checks (make lint)
Python code must adhere to formatting standards (make check-fmt/make fmt)
Python code must pass type checking (make typecheck)
Follow core Python 3.13 style conventions per .rules/python-00.md
Apply best practices for context managers per .rules/python-context-managers.md
Follow generator and iterator patterns per .rules/python-generators.md
Follow function return conventions per .rules/python-return.md
Apply Python typing best practices per .rules/python-typing.md

**/*.py: Name Python files in snake_case (e.g., http_client.py, task_queue.py)
Classes must use PascalCase
Variables and functions must use snake_case
Module-level constants use UPPER_SNAKE_CASE
Prefix non-exported helpers or internal APIs with a single underscore
Use typing everywhere; maintain full static type coverage with Pyright
Use TypedDict or @DataClass for structured data; prefer @DataClass(slots=True) for internal-only
Avoid Any; use Unknown, generics, or cast() with justification if Any is used
Be explicit with return types for all public functions and class methods (e.g., -> None, -> str)
Favor immutability (prefer tuples to lists; use frozendict or types.MappingProxyType where appropriate)
Use # pyright: ignore sparingly and include an explanation when used
Avoid side effects at import time; modules should not modify global state or perform actions on import
Never hardcode secrets in source code
Write NumPy-style docstrings for public functions, classes, and modules
Add inline comments to explain non-obvious logic or decisions

**/*.py: Use context managers to encapsulate setup/teardown for resources (files, locks, connections) instead of manual management
Use @contextmanager from contextlib for straightforward, linear setup/teardown without persistent internal state
Implement a class-based context manager (enter/exit) when there is internal sta...

Files:

  • nixie/cli.py
  • tests/integration/test_cli_behavior.py

⚙️ CodeRabbit configuration file

**/*.py: - Keep cyclomatic complexity ≤ 12

  • Follow single responsibility and CQRS (command/query segregation)
  • Docstrings must follow the numpy style guide. Use a single-line summary for private functions and methods, and full structured docs for all public interfaces.
  • Move conditionals with >2 branches to predicate/helper functions
  • Avoid eval, exec, pickle, monkey-patching, ctypes, unsafe shell
  • Every module must begin with a triple-quoted docstring explaining its purpose, utility, and usage, including example calls if appropriate.
  • Comments and docs must follow en-GB-oxendict (-ize / -our) spelling and grammar
  • Lint suppressions:
    • Blanket # noqa, file-level skips, and categories are forbidden
    • Only narrow in-line disables (# noqa: XYZ) are permitted, and must be accompanied by FIXME: or a ticket link, and used only as a last resort.
  • Use pytest fixtures for shared setup (conftest.py or fixtures/)
  • Replace duplicate tests with @pytest.mark.parametrize
  • Prefer pytest-mock or unittest.mock for stubs/mocks
  • Use assert …, "message" over bare asserts
  • Reflect all API/behaviour changes in docs/ and update roadmap on completion
  • Files must not exceed 400 logical lines:
    • Decompose large modules into subpackages
    • Split large match/case or dispatch tables by domain and collocate with targets if appropriate
    • Move bulky data (fixtures, templates) to external files for parsing at runtime
  • Mutable defaults and shadowed built-ins are forbidden
  • All code must have clear type hints using modern style (A | B, list[str], class Foo[A]:, type Bar = int, etc.), with ABC imports drawn from the correct stdlib module.

Files:

  • nixie/cli.py
  • tests/integration/test_cli_behavior.py
tests/integration/test_*.py

📄 CodeRabbit inference engine (.rules/python-00.md)

Place integration tests under tests/integration/ with files prefixed with test_

Files:

  • tests/integration/test_cli_behavior.py
{**/unittests/test_*.py,tests/integration/test_*.py}

📄 CodeRabbit inference engine (.rules/python-00.md)

{**/unittests/test_*.py,tests/integration/test_*.py}: Use pytest idioms: prefer fixtures, parametrize broadly, avoid unnecessary mocks
Group related tests using classes with method names prefixed by test_
Write tests from a user's perspective; test public behaviour, not internals
Avoid excessive mocking; use doubles only for external services or non-deterministic behaviour

Files:

  • tests/integration/test_cli_behavior.py
🧬 Code graph analysis (1)
tests/integration/test_cli_behavior.py (1)
nixie/cli.py (2)
  • cli (573-590)
  • main (517-539)
🔍 Remote MCP

Here’s a concise set of concrete facts to inform your review:

  • The typing.Final qualifier (PEP 591) was added in Python 3.8. Using SUCCESS_BANNER: Final[str] = "…" marks it as a constant that type-checkers will forbid from being reassigned or overridden, but imposes no runtime behavior change (docs.python.org).
  • The print(..., flush=True) parameter (available since Python 3.3) forces an immediate flush of the output buffer, ensuring the banner is emitted to stdout without waiting on buffer-full or program termination (stackoverflow.com).
  • The new integration test uses pytest’s capsys fixture to capture standard output and asserts that SUCCESS_BANNER appears exactly once when the exit code is 0, and never when it’s nonzero (per tests/integration/test_cli_behavior.py).
🔇 Additional comments (1)
tests/integration/test_cli_behavior.py (1)

102-106: LGTM — assert exact banner emission count.

Correctly enforces one banner on success and none on failure.

Comment thread nixie/cli.py Outdated
Comment thread nixie/cli.py Outdated
leynos and others added 2 commits August 30, 2025 00:28
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@leynos
leynos merged commit 0b84a38 into main Aug 29, 2025
1 check was pending

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

💡 Knowledge Base configuration:

  • Jira integration is disabled

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 739dc7c and 583e120.

📒 Files selected for processing (1)
  • nixie/cli.py (2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

**/*.py: Python changes must pass tests (unit and behavioral) before completion/commit
Python code must pass lint checks (make lint)
Python code must adhere to formatting standards (make check-fmt/make fmt)
Python code must pass type checking (make typecheck)
Follow core Python 3.13 style conventions per .rules/python-00.md
Apply best practices for context managers per .rules/python-context-managers.md
Follow generator and iterator patterns per .rules/python-generators.md
Follow function return conventions per .rules/python-return.md
Apply Python typing best practices per .rules/python-typing.md

**/*.py: Name Python files in snake_case (e.g., http_client.py, task_queue.py)
Classes must use PascalCase
Variables and functions must use snake_case
Module-level constants use UPPER_SNAKE_CASE
Prefix non-exported helpers or internal APIs with a single underscore
Use typing everywhere; maintain full static type coverage with Pyright
Use TypedDict or @DataClass for structured data; prefer @DataClass(slots=True) for internal-only
Avoid Any; use Unknown, generics, or cast() with justification if Any is used
Be explicit with return types for all public functions and class methods (e.g., -> None, -> str)
Favor immutability (prefer tuples to lists; use frozendict or types.MappingProxyType where appropriate)
Use # pyright: ignore sparingly and include an explanation when used
Avoid side effects at import time; modules should not modify global state or perform actions on import
Never hardcode secrets in source code
Write NumPy-style docstrings for public functions, classes, and modules
Add inline comments to explain non-obvious logic or decisions

**/*.py: Use context managers to encapsulate setup/teardown for resources (files, locks, connections) instead of manual management
Use @contextmanager from contextlib for straightforward, linear setup/teardown without persistent internal state
Implement a class-based context manager (enter/exit) when there is internal sta...

Files:

  • nixie/cli.py

⚙️ CodeRabbit configuration file

**/*.py: - Keep cyclomatic complexity ≤ 12

  • Follow single responsibility and CQRS (command/query segregation)
  • Docstrings must follow the numpy style guide. Use a single-line summary for private functions and methods, and full structured docs for all public interfaces.
  • Move conditionals with >2 branches to predicate/helper functions
  • Avoid eval, exec, pickle, monkey-patching, ctypes, unsafe shell
  • Every module must begin with a triple-quoted docstring explaining its purpose, utility, and usage, including example calls if appropriate.
  • Comments and docs must follow en-GB-oxendict (-ize / -our) spelling and grammar
  • Lint suppressions:
    • Blanket # noqa, file-level skips, and categories are forbidden
    • Only narrow in-line disables (# noqa: XYZ) are permitted, and must be accompanied by FIXME: or a ticket link, and used only as a last resort.
  • Use pytest fixtures for shared setup (conftest.py or fixtures/)
  • Replace duplicate tests with @pytest.mark.parametrize
  • Prefer pytest-mock or unittest.mock for stubs/mocks
  • Use assert …, "message" over bare asserts
  • Reflect all API/behaviour changes in docs/ and update roadmap on completion
  • Files must not exceed 400 logical lines:
    • Decompose large modules into subpackages
    • Split large match/case or dispatch tables by domain and collocate with targets if appropriate
    • Move bulky data (fixtures, templates) to external files for parsing at runtime
  • Mutable defaults and shadowed built-ins are forbidden
  • All code must have clear type hints using modern style (A | B, list[str], class Foo[A]:, type Bar = int, etc.), with ABC imports drawn from the correct stdlib module.

Files:

  • nixie/cli.py
🔍 Remote MCP

Here’s a concise set of concrete facts to inform your review:

  • The typing.Final qualifier (PEP 591) was added in Python 3.8. Using SUCCESS_BANNER: Final[str] = "…" marks it as a constant that type-checkers will forbid from being reassigned or overridden, but imposes no runtime behavior change (docs.python.org).
  • The print(..., flush=True) parameter (available since Python 3.3) forces an immediate flush of the output buffer, ensuring the banner is emitted to stdout without waiting on buffer-full or program termination (stackoverflow.com).
  • The new integration test uses pytest’s capsys fixture to capture standard output and asserts that SUCCESS_BANNER appears exactly once when the exit code is 0, and never when it’s nonzero (per tests/integration/test_cli_behavior.py).
🔇 Additional comments (2)
nixie/cli.py (2)

97-98: Promote banner to a constant with typ.Final — LGTM.

Keep the constant in UPPER_SNAKE_CASE and annotated as typ.Final to match project style. No import side-effects introduced.


536-538: Print banner once at run end with flush — LGTM.

Preserve exit semantics and emit to stdout deterministically. Using flush=True is appropriate for CI logs.

Comment thread nixie/cli.py
Comment on lines +536 to 538
if all_success:
print(SUCCESS_BANNER, flush=True)
return 0 if all_success else 1

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.

🧹 Nitpick (assertive)

Clarify banner semantics for “no diagrams” runs.

Decide whether to suppress the success banner when zero diagrams are found across all files. Current logic prints the banner because all_success stays True even when nothing was validated. If the intended behaviour is “print only when at least one diagram validated”, gate on a “saw_diagram” flag aggregated across files and assert this in tests.

🤖 Prompt for AI Agents
In nixie/cli.py around lines 536 to 538, the success banner is printed whenever
all_success is True even if no diagrams were processed; add an aggregated
saw_diagram boolean (set to True when any file yields at least one diagram) and
change the banner print condition to require both all_success and saw_diagram.
Update the per-file processing to flip saw_diagram when diagrams are
encountered, and add/update tests to assert that the banner is printed only when
at least one diagram was validated and suppressed when zero diagrams are found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant