Skip to content

Comments

docs: SDK/API Reference contains incorrect example code#470

Open
MichaelDik wants to merge 1 commit intomainfrom
fix/logger-docstring-fixes
Open

docs: SDK/API Reference contains incorrect example code#470
MichaelDik wants to merge 1 commit intomainfrom
fix/logger-docstring-fixes

Conversation

@MichaelDik
Copy link

@MichaelDik MichaelDik commented Feb 4, 2026

User description

Description:

SDK/API Reference is incorrect - https://v2docs.galileo.ai/sdk-api/python/reference/logger/logger. Variable names were wrong and the first example is missing the full logger.method for each method and logger.flush at the end.

Tests:

Tested both blocks of code with correct variable names, logger.methods, and logger.flush in the first block.


Generated description

Below is a concise technical summary of the changes proposed in this PR:
Corrects the Python SDK reference documentation within the GalileoLogger class to ensure code examples are functional and accurate. Updates variable names, fixes method chaining syntax, and includes necessary flush operations to match the actual API implementation.

Latest Contributors(0)
UserCommitDate
This pull request is reviewed by Baz. Review like a pro on (Baz).

@MichaelDik MichaelDik requested a review from a team as a code owner February 4, 2026 19:36
@@ -87,24 +87,25 @@ class GalileoLogger(TracesLogger):
and log it to Galileo using `conclude`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Failed check: pre-commit / pre-commit
I’ve attached the relevant part of the log for your convenience:
pre-commit formatting/whitespace change detected in docstring/code block inside class GalileoLogger (around line 87). The pre-commit hook produced a diff modifying a blank/whitespace-only line before logger.start_trace(...).

Finding type: Log Error

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit 9b995ac addressed this comment. The pre-commit formatting issue was resolved by adding a blank line (line 90) before the logger.start_trace(...) call in the docstring code block, exactly as the pre-commit hook required. The code block now has proper whitespace formatting.

@codecov
Copy link

codecov bot commented Feb 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.54%. Comparing base (59abdd3) to head (9b995ac).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #470   +/-   ##
=======================================
  Coverage   82.54%   82.54%           
=======================================
  Files          96       96           
  Lines        9056     9056           
=======================================
  Hits         7475     7475           
  Misses       1581     1581           

☔ View full report in Codecov by Sentry.
📢 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.

@MichaelDik MichaelDik force-pushed the fix/logger-docstring-fixes branch from 431b75e to 9b995ac Compare February 4, 2026 19:42
@wenbo-galileo
Copy link

The new sample code LGTM!

Copy link

@wenbo-galileo wenbo-galileo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@samgdf
Copy link

samgdf commented Feb 19, 2026

Failing due to pre-commit (pull_request) @MichaelDik AI summary: The job failed due to the pre-commit "trailing-whitespace" hook, which found and modified files with trailing whitespace. To fix this:

  1. Run pre-commit locally: pre-commit run --all-files.
  2. Commit the changes made by pre-commit (removal of trailing whitespace).
  3. Push the commit to your branch to pass the check.

No code logic changes are needed—just ensure all files have no trailing whitespace.

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.

4 participants