Skip to content

fix: add missing dependencies and correct badge URLs#264

Open
golldyck wants to merge 2 commits intoOpenGradient:mainfrom
golldyck:fix/missing-deps-and-bugs
Open

fix: add missing dependencies and correct badge URLs#264
golldyck wants to merge 2 commits intoOpenGradient:mainfrom
golldyck:fix/missing-deps-and-bugs

Conversation

@golldyck
Copy link
Copy Markdown

@golldyck golldyck commented Apr 8, 2026

Problem

pyproject.toml is missing requests-toolbelt and httpx as direct dependencies, causing ImportError when users install the SDK via pip and use ModelHub.upload() or the LLM/twins clients. Additionally, README CI badge URLs point to a non-existent OpenGradient/sdk repo.

Fix

Added the missing dependencies to pyproject.toml, corrected the Ruff target-version to match requires-python, fixed CI badge URLs, and removed unreachable code in cli.py.

Changes

  • pyproject.toml — Added requests-toolbelt and httpx to [project.dependencies], changed Ruff target-version from "py310" to "py311" to match requires-python = ">=3.11"
  • README.md — Fixed CI badge URLs from OpenGradient/sdk to OpenGradient/OpenGradient-SDK
  • src/opengradient/cli.py — Removed unreachable code after raise NotImplementedError in generate_image

Testing

  • Verified requests-toolbelt and httpx are listed in dependencies
  • Confirmed badge URLs resolve correctly
  • Checked no functional code was removed from cli.py

Closes #265

@golldyck
Copy link
Copy Markdown
Author

golldyck commented Apr 8, 2026

Hi @adambalogh @kylexqian — this PR fixes bugs I found during a full audit of OpenGradient's public repositories. Would appreciate a review when you get a chance. Happy to address any feedback. Thanks!

kylexqian
kylexqian previously approved these changes Apr 9, 2026
@kylexqian
Copy link
Copy Markdown
Collaborator

kylexqian commented Apr 9, 2026

Need to update the uv.lock as well -- do you mind doing this?

@golldyck
Copy link
Copy Markdown
Author

golldyck commented Apr 9, 2026

Done! Updated the uv.lock file to include the newly added dependencies (httpx and requests-toolbelt). Please check if everything looks good.

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.

Bug: missing requests-toolbelt and httpx dependencies cause ImportError

2 participants