Skip to content

Allow users to see their own print statements in the logs#5

Open
brp-hiverge wants to merge 3 commits into
mainfrom
feature/log-evaluation
Open

Allow users to see their own print statements in the logs#5
brp-hiverge wants to merge 3 commits into
mainfrom
feature/log-evaluation

Conversation

@brp-hiverge

Copy link
Copy Markdown
Screenshot 2026-06-30 at 16 59 27

(Also set indent-width = 2 matching current indentation so that code doesn't get reformatted)

@brp-hiverge brp-hiverge requested a review from Copilot June 30, 2026 15:01
@hiverge-robot hiverge-robot added needs-triage Indicates an issue or PR lacks a label and requires one. needs-priority Indicates a PR lacks a label and requires one. do-not-merge/needs-kind Indicates a PR lacks a label and requires one. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jun 30, 2026

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

This PR aims to make user code print() output visible in server logs in near real-time by streaming subprocess stdout/stderr line-by-line into the JSON logger, and adds a Ruff indentation setting to avoid auto-reformatting.

Changes:

  • Add Ruff indentation configuration to match the repo’s 2-space Python indentation.
  • Log subprocess stdout/stderr lines as they arrive (instead of waiting for process completion).
  • Refactor run_command to drain stdout/stderr concurrently via background threads and still return the last stdout line on success.

Reviewed changes

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

File Description
pyproject.toml Adds Ruff config intended to enforce 2-space indentation.
common_tools.py Streams subprocess stdout/stderr to structured logs and captures output concurrently via threads.

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

Comment thread pyproject.toml
Comment thread common_tools.py
Comment thread common_tools.py
Comment thread common_tools.py
Comment thread common_tools.py Outdated

@luc-hiverge luc-hiverge 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.

There was the idea to limit the number of line to something finite. I can't find it here.

@brp-hiverge

Copy link
Copy Markdown
Author

There was the idea to limit the number of line to something finite. I can't find it here.

Done now.

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

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. do-not-merge/needs-kind Indicates a PR lacks a label and requires one. needs-priority Indicates a PR lacks a label and requires one. needs-triage Indicates an issue or PR lacks a label and requires one.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants