Skip to content

[SDK] Add hardware API support#141

Open
yaxan wants to merge 4 commits into
mainfrom
yazan/hardware_api_support
Open

[SDK] Add hardware API support#141
yaxan wants to merge 4 commits into
mainfrom
yazan/hardware_api_support

Conversation

@yaxan

@yaxan yaxan commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Summary

What changed

  • centml/sdk/api.py: two thin delegating methods on CentMLClient, matching the existing create_job pattern:
    • create_hardware_instance(request: CreateHardwareInstanceRequest) -> HardwareInstanceResponse
    • delete_hardware_instance(hardware_instance_id: int) -> None
  • tests/test_sdk_api.py: 3 unit tests (create, delete, and coverage for the existing get's .results extraction)
  • examples/sdk/manage_hardware_instances.py: new Click example with list / create / delete subcommands.

Test plan

  • pytest --sanity tests/test_sdk_api.py: 8 passed (3 new).
  • Black --line-length 120 --
  • Pylint (repo rcfile) 10.00/10 on changed files.
  • manage_hardware_instances.py --help works for all subcommands.
Unit test Asserts
`test_create_hardware_instance_ delegates tocreate_hardware_instance_hardware_instances_post with the request; returns the response
`test_delete_hardware_instance_ delegates todelete_hardware_instance_hardware_instances_hardware_instance_id_delete with the id
test_get_hardware_instances_returns_results returns the .results payload, passes cluster_id through

@yaxan yaxan marked this pull request as ready for review June 15, 2026 18:10
@anandj91

Copy link
Copy Markdown
Contributor

@codex review

Comment thread examples/sdk/manage_hardware_instances.py Outdated
Comment thread examples/sdk/manage_hardware_instances.py Outdated
Comment thread examples/sdk/manage_hardware_instances.py Outdated
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: ec6d2819ed

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread examples/sdk/manage_hardware_instances.py Outdated
Comment thread examples/sdk/manage_hardware_instances.py Outdated
@yaxan yaxan requested a review from anandj91 June 15, 2026 20:07
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.

2 participants