Skip to content

Add --full option to list command for RP descriptions#378

Merged
kkaarreell merged 3 commits into
mainfrom
ks_list_rp_desc
Jun 12, 2026
Merged

Add --full option to list command for RP descriptions#378
kkaarreell merged 3 commits into
mainfrom
ks_list_rp_desc

Conversation

@kkaarreell

@kkaarreell kkaarreell commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

Enhance the list command with a new --full flag that displays ReportPortal launch and suite descriptions for more detailed output.

Changes:

  • Add --full flag to list command
  • Display RP launch description before URL when --full is enabled
  • Display RP suite description on same line as REQ ID when --full is enabled and it differs from launch description
  • Move recipe URL indentation one level left (from 6 to 4 spaces)
  • Indent status lines when suite description is shown
  • Add cyan color for REQ ID and description lines
  • Apply ReportPortal color (purple) to launch descriptions

Summary by Sourcery

Add a --full mode to the list command to show enriched ReportPortal metadata and adjust list output formatting and colors.

New Features:

  • Introduce a --full flag to the list command to display ReportPortal launch and suite descriptions alongside existing execution details.

Enhancements:

  • Shift recipe URL indentation to improve alignment of list output.
  • Render ReportPortal launch descriptions in the ReportPortal (purple) color and use cyan for request ID and description lines.
  • Indent status lines when suite descriptions are displayed to keep output readable.

Enhance the list command with a new --full flag that displays
ReportPortal launch and suite descriptions for more detailed output.

Changes:
- Add --full flag to list command
- Display RP launch description before URL when --full is enabled
- Display RP suite description on same line as REQ ID when --full
  is enabled and it differs from launch description
- Move recipe URL indentation one level left (from 6 to 4 spaces)
- Indent status lines when suite description is shown
- Add cyan color for REQ ID and description lines
- Apply ReportPortal color (purple) to launch descriptions

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@kkaarreell kkaarreell self-assigned this Jun 12, 2026
@sourcery-ai

sourcery-ai Bot commented Jun 12, 2026

Copy link
Copy Markdown

Reviewer's Guide

Adds a --full flag to the list command to show more detailed ReportPortal metadata (launch and suite descriptions), adjusts indentation/formatting of recipe and status lines, and introduces a cyan color used for request IDs and description lines.

File-Level Changes

Change Details Files
Add --full flag to list command and plumb it through to detailed printing logic.
  • Extend print_state_dirs signature to accept a full boolean flag and document it.
  • Add a --full Click option to cmd_list and pass it through to print_state_dirs.
  • Use the full flag in the ReportPortal output section to control whether descriptions are printed.
newa/cli/commands/list_cmd.py
Show ReportPortal launch and suite descriptions when --full is enabled, and adjust related output formatting.
  • Capture launch_description from ReportPortal metadata and, when full is set, print it before the launch URL using the ReportPortal (purple) color.
  • For each schedule_job, read suite_description from ReportPortal metadata and, when full is set and it differs from launch_description, print a combined REQ ID and suite description line in cyan.
  • Introduce status_indent to either continue status information on the same line or print it on a new, more-indented line when suite descriptions are shown.
  • Apply cyan coloring to REQ IDs and full REQ lines, replacing previous request_id_color usage.
  • Adjust printing of 'not executed' states to honor status_indent and indentation rules.
newa/cli/commands/list_cmd.py
Tighten indentation of recipe URLs and status lines for better alignment.
  • Decrease indentation of the recipe URL line from 6 to 4 spaces.
  • Set REQ lines to use an indent of 8 spaces and status lines to either align on the same line or start at indent 10 when suite descriptions are printed.
newa/cli/commands/list_cmd.py
Add cyan to the color palette and ensure it is disabled when colors are turned off.
  • Add CYAN escape code to DEFAULT_COLORS and expose Colors.CYAN.
  • Extend Colors.disable to clear the CYAN color when colors are disabled.
newa/cli/color_utils.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

@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 left some high level feedback:

  • The indentation logic in print_state_dirs (e.g., the hardcoded 4/6/8/10 values and status_indent handling) is getting a bit brittle; consider centralizing indentation constants or adding a small helper to derive indents so that layout changes are easier to reason about and maintain.
  • In print_state_dirs, request_id_color is now computed but no longer used after switching REQ ID output to Colors.CYAN; either remove this variable or route the color choice through a single path to avoid dead code.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The indentation logic in `print_state_dirs` (e.g., the hardcoded 4/6/8/10 values and `status_indent` handling) is getting a bit brittle; consider centralizing indentation constants or adding a small helper to derive indents so that layout changes are easier to reason about and maintain.
- In `print_state_dirs`, `request_id_color` is now computed but no longer used after switching REQ ID output to `Colors.CYAN`; either remove this variable or route the color choice through a single path to avoid dead code.

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.

kkaarreell and others added 2 commits June 12, 2026 10:21
Address code review feedback by introducing a helper function to
calculate indentation based on nesting level. This makes the code
more maintainable and allows for future customization of indentation.

Changes:
- Add _indent() helper function to derive indents from nesting level
- Replace all hardcoded indentation values (2, 4, 6, 8, 10) with
  _indent(level) calls
- Define base indentation unit (2 spaces) that can be customized
- Document nesting levels in _indent() docstring for clarity

This refactoring improves code maintainability without changing
the visual output or behavior of the list command.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Modify list command to display recipe URLs only when --full flag
is enabled, reducing visual clutter in the default listing mode.

The recipe line (with URL and optional [no-auto-schedule] indicator)
is now part of the extended details shown only with --full.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@kkaarreell

Copy link
Copy Markdown
Collaborator Author

/packit test

@kkaarreell

Copy link
Copy Markdown
Collaborator Author

/packit build

@kkaarreell kkaarreell merged commit 7c41a0a into main Jun 12, 2026
16 checks passed
@kkaarreell kkaarreell deleted the ks_list_rp_desc branch June 12, 2026 08:36
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.

1 participant