Skip to content

Remove deprecated robot_id parameter from utils.read_yaml()#72

Merged
b-Tomas merged 2 commits into
nextfrom
breaking/remove-read-yaml-robot-id
May 20, 2026
Merged

Remove deprecated robot_id parameter from utils.read_yaml()#72
b-Tomas merged 2 commits into
nextfrom
breaking/remove-read-yaml-robot-id

Conversation

@b-Tomas
Copy link
Copy Markdown
Member

@b-Tomas b-Tomas commented May 19, 2026

Summary

  • Remove the deprecated robot_id parameter from read_yaml() in utils.py and all associated branching logic
  • Remove import warnings from utils.py — no longer needed
  • Remove two tests that exercised the deprecated robot_id behavior (test_read_yaml_returns_specific_robot, test_read_yaml_raises_error_when_robot_id_not_present)
  • Simplify the read_yaml specification in docs/contents/specification/utils.md

Breaking changes

read_yaml() no longer accepts a robot_id parameter. Passing it will raise a TypeError.

Migration

# Before (v2.x)
config = read_yaml("config.yaml", "robot_1")

# After (v3.0) — option A: index manually
config = read_yaml("config.yaml")["robot_1"]

# After (v3.0) — option B (recommended): use ConnectorConfig
config = ConnectorConfig(**read_yaml("config.yaml"))

@b-Tomas b-Tomas self-assigned this May 19, 2026
@b-Tomas b-Tomas requested a review from Copilot May 19, 2026 20:33
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 removes the deprecated robot_id parameter from inorbit_connector.utils.read_yaml() and updates the related tests and documentation to reflect the simplified configuration-loading behavior.

Changes:

  • Removed the robot_id argument and all deprecation-warning branching logic from read_yaml().
  • Deleted tests that exercised the deprecated robot_id selection behavior.
  • Simplified the read_yaml utility specification docs to match the new API.

Reviewed changes

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

File Description
tests/test_utils.py Removes tests tied to the deprecated robot_id behavior.
inorbit_connector/utils.py Updates read_yaml() signature and simplifies implementation; drops warnings import.
docs/contents/specification/utils.md Updates the read_yaml specification to remove robot_id behavior.

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

Comment thread inorbit_connector/utils.py Outdated
Comment thread docs/contents/specification/utils.md Outdated
Comment thread inorbit_connector/utils.py Outdated
@b-Tomas b-Tomas marked this pull request as ready for review May 19, 2026 22:20
@b-Tomas b-Tomas requested a review from miguelgarcia May 19, 2026 23:13
b-Tomas and others added 2 commits May 19, 2026 20:21
BREAKING CHANGE: `read_yaml()` no longer accepts a `robot_id` parameter.
Callers that used `read_yaml(fname, robot_id)` must load the full dict
and index into it themselves, or use `ConnectorConfig` model validation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
@b-Tomas b-Tomas force-pushed the breaking/remove-read-yaml-robot-id branch from 03379b8 to 1f6b123 Compare May 19, 2026 23:21
@b-Tomas b-Tomas merged commit 2a80a10 into next May 20, 2026
13 checks passed
@b-Tomas b-Tomas deleted the breaking/remove-read-yaml-robot-id branch May 20, 2026 12:41
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.

3 participants