+
Skip to content

Conversation

bsowell
Copy link
Contributor

@bsowell bsowell commented May 16, 2025

The Aryn SDK has moved to https://github.com/aryn-ai/aryn-sdk. This changes the dependency to the public pypi release.

The Aryn SDK has moved to https://github.com/aryn-ai/aryn-sdk. This changes
the dependency to the public pypi release.
Copy link

@Copilot 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 bundled local aryn-sdk module in favor of the public PyPI release and updates downstream code accordingly.

  • Removed all local lib/aryn-sdk code and tests, switching to a PyPI dependency.
  • Root and subproject pyproject.toml files updated to reference aryn-sdk>=0.2.5.
  • Updated Sycamore unit tests to mock httpx.stream and use iter_bytes instead of requests.post and iter_content.

Reviewed Changes

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

File Description
pyproject.toml Removed local aryn-sdk path dependency
lib/sycamore/pyproject.toml Pin aryn-sdk to public release with version constraint
lib/sycamore/sycamore/tests/unit/transforms/test_aryn_partitioner.py Adjust mocks to use httpx.stream and iter_bytes
lib/aryn-sdk/** Entire local SDK directory and tests deleted

self.status_code = 200

def iter_content(self, chunksize):
def iter_bytes(self):
Copy link

Copilot AI May 16, 2025

Choose a reason for hiding this comment

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

The iter_bytes method signature no longer matches typical streaming interfaces, which often accept parameters (e.g., chunk size). Consider adding *args, **kwargs or an optional chunksize parameter to ensure compatibility with the code under test.

Copilot uses AI. Check for mistakes.

class TestArynPDFPartitioner:
def test_partition(self, mocker) -> None:
mocker.patch("requests.post", return_value=MockResponseNoTables())
mocker.patch("httpx.stream").return_value.__enter__.return_value = MockResponseNoTables()
Copy link

Copilot AI May 16, 2025

Choose a reason for hiding this comment

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

Patching httpx.stream at the top level may not intercept calls inside the module under test. It’s more robust to patch the symbol where it’s imported (e.g., patch('aryn_sdk.partition.partition.httpx.stream')) so the mock is applied correctly.

Suggested change
mocker.patch("httpx.stream").return_value.__enter__.return_value = MockResponseNoTables()
mocker.patch("sycamore.transforms.detr_partitioner.httpx.stream").return_value.__enter__.return_value = MockResponseNoTables()

Copilot uses AI. Check for mistakes.

@bsowell bsowell merged commit fd6e020 into main May 21, 2025
11 of 15 checks passed
@bsowell bsowell deleted the ben/swap_aryn_sdk branch May 21, 2025 21:28
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

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载