Skip to content

Conversation

@Teagan42
Copy link
Contributor

@Teagan42 Teagan42 commented Oct 5, 2025

Summary

  • move loader batch containers and helper utilities into pipeline/channels
  • expose public aliases while keeping backward-compatible underscore exports in mcp_plex.loader

Testing

  • uv run pytest

https://chatgpt.com/codex/tasks/task_e_68e2a0814a44832880cb0add91bfa6de

Copilot AI review requested due to automatic review settings October 5, 2025 16:51
Copy link
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 refactors loader utilities by extracting batch containers and helper functions from the main loader module into a dedicated shared pipeline module. The refactoring moves utility classes and functions to improve code organization while maintaining backward compatibility.

Key changes:

  • Moved batch container classes (MovieBatch, EpisodeBatch, SampleBatch) and helper utilities to pipeline/channels.py
  • Added backward-compatible underscore aliases in both modules to prevent breaking changes
  • Removed duplicate code from the main loader module by importing from the new shared location

Reviewed Changes

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

File Description
mcp_plex/loader/pipeline/channels.py New shared module containing batch containers, utility functions, and IMDbRetryQueue class with public exports
mcp_plex/loader/init.py Updated to import utilities from shared module and maintain backward-compatible aliases

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

class MovieBatch:
"""Batch of Plex movie items pending metadata enrichment."""

movies: list["PlexPartialObject"]
Copy link

Copilot AI Oct 5, 2025

Choose a reason for hiding this comment

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

The PlexPartialObject type is referenced in quotes but not imported or defined in this module. Consider adding a proper import or type annotation comment to clarify where this type comes from.

Copilot uses AI. Check for mistakes.
Comment on lines +25 to +26
show: "PlexPartialObject"
episodes: list["PlexPartialObject"]
Copy link

Copilot AI Oct 5, 2025

Choose a reason for hiding this comment

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

The PlexPartialObject type is referenced in quotes but not imported or defined in this module. Consider adding a proper import or type annotation comment to clarify where this type comes from.

Copilot uses AI. Check for mistakes.
@github-actions
Copy link

github-actions bot commented Oct 5, 2025

Coverage

Coverage Report
FileStmtsMissCoverMissing
mcp_plex/loader
   __init__.py81313184%186, 241, 243–245, 261, 347–352, 954–955, 999, 1001, 1056–1057, 1068–1070, 1073, 1076–1077, 1079, 1101, 1111, 1122–1154, 1169, 1171, 1178–1192, 1195–1209, 1215, 1230–1261, 1266–1299, 1302–1306, 1311–1319, 1329, 1338, 1342–1344, 1463–1465, 1798
mcp_plex/loader/pipeline
   channels.py61297%13–14
mcp_plex/server
   __init__.py6142995%43–44, 119–120, 148, 252, 256, 277–280, 297, 362, 365, 402, 420–421, 458, 1109, 1131–1137, 1173, 1191, 1196, 1214, 1338, 1375
   __main__.py440%3–8
   config.py48785%50, 52–55, 65, 76
TOTAL175017390% 

Tests Skipped Failures Errors Time
101 0 💤 0 ❌ 0 🔥 53.894s ⏱️

@Teagan42 Teagan42 merged commit 9c34d11 into main Oct 5, 2025
4 checks passed
@Teagan42 Teagan42 deleted the codex/create-channels.py-and-update-imports branch October 5, 2025 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants