Skip to content

[OPIK-5495] [SDK] opik.configure() parameter url mismatches config file url_override#6065

Merged
yaricom merged 2 commits intomainfrom
yaricom/OPIK-5495-configure-url_override
Apr 2, 2026
Merged

[OPIK-5495] [SDK] opik.configure() parameter url mismatches config file url_override#6065
yaricom merged 2 commits intomainfrom
yaricom/OPIK-5495-configure-url_override

Conversation

@yaricom
Copy link
Copy Markdown
Contributor

@yaricom yaricom commented Apr 2, 2026

Details

Source: Claude session 2, issue #1

The Python SDK configure() method accepts url= but the ~/.opik.config file uses the field name url_override. Calling opik.configure(url_override="https://...") raises TypeError: configure() got an unexpected keyword argument 'url_override'.

Steps to reproduce:

  1. Call opik.configure(url_override="https://test.dev.comet.com")
  2. Get TypeError

Expected:

Parameter naming should be consistent between the API and config file, or url_override should be accepted as an alias.

Severity:

Minor


Summary

Deprecates the url parameter in the configure() function and introduces url_override as its replacement, logging a warning when the old parameter is used and ensuring url_override takes precedence when both are supplied.

Changes by Component

Python SDK

  • Added url_override parameter to the configure() function as the canonical replacement for url.
  • Added deprecation warning (LOGGER.warning) when url is passed, directing users to url_override.
  • url_override takes precedence over url when both are provided; url is used as a fallback only when url_override is absent.
  • Updated docstring to mark url as deprecated and document the new url_override parameter.
  • Added TestConfigure test class covering all four url/url_override combinations: precedence, deprecation warning presence, warning absence, and fallback forwarding.

Files Changed

 sdks/python/src/opik/configurator/configure.py     | 13 ++++-
 sdks/python/tests/unit/configurator/test_configure.py | 59 ++++++++++++++++++++++
 2 files changed, 70 insertions(+), 2 deletions(-)

Change checklist

  • User facing
  • Documentation update

Issues

  • Resolves #
  • OPIK-5495

AI-WATERMARK

AI-WATERMARK: yes

  • If yes:
    • Tools: Claude Code v2.1.81
    • Model(s): Sonnet 4.6
    • Scope: Unit tests
    • Human verification: Done

Testing

Implemented unit tests

Documentation

Added related docstrings and log output (deprecation warnings)

…`url_override`

- Updated `configure()` to prefer `url_override` over `url`, with fallback logic when only `url` is provided.
- Added a deprecation warning when `url` is used.
- Updated unit tests to cover `url_override` precedence and deprecation warning scenarios.
@yaricom yaricom requested a review from a team as a code owner April 2, 2026 16:35
@github-actions github-actions bot added python Pull requests that update Python code tests Including test files, or tests related like configuration. Python SDK labels Apr 2, 2026
…igure()` scenarios

- Renamed test methods to follow a structured naming pattern, clarifying the behavior being tested.
- Updated docstrings to reflect test intent more precisely.
@yaricom yaricom merged commit fdb3483 into main Apr 2, 2026
134 checks passed
@yaricom yaricom deleted the yaricom/OPIK-5495-configure-url_override branch April 2, 2026 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Python SDK python Pull requests that update Python code tests Including test files, or tests related like configuration.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants