Skip to content

fix(python): fix tuning mode parsing in python#173

Closed
b-rowan wants to merge 3 commits into256foundation:masterfrom
b-rowan:tuning-target-updates
Closed

fix(python): fix tuning mode parsing in python#173
b-rowan wants to merge 3 commits into256foundation:masterfrom
b-rowan:tuning-target-updates

Conversation

@b-rowan
Copy link
Member

@b-rowan b-rowan commented Mar 12, 2026

No description provided.

@cfilipescu
Copy link
Collaborator

@codex review

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

Adjusts the Python bindings’ tuning target handling so Rust TuningTarget values are exposed as Python/Pydantic-friendly types rather than the raw Rust enum wrapper.

Changes:

  • Replaces the Rust _rs_TuningTarget typing with new Pydantic TuningTarget* models and a _parse_tuning_target adapter.
  • Updates Miner.get_tuning_target() to return the parsed Python TuningTarget type.
  • Minor formatting/unwrap cleanups in miner.py and factory.py for readability.

Reviewed changes

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

File Description
python/pyasic_rs/miner.py Returns parsed TuningTarget from get_tuning_target() and minor formatting adjustments.
python/pyasic_rs/factory.py Minor signature formatting and tuple unpacking cleanup.
python/pyasic_rs/data.py Introduces TuningTargetPower/HashRate, _parse_tuning_target, and updates MinerData.tuning_target typing.

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

You can also share your feedback on Copilot code review. Take the survey.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@UpstreamData UpstreamData force-pushed the tuning-target-updates branch from 599f45f to de63249 Compare March 16, 2026 17:28
@UpstreamData UpstreamData force-pushed the tuning-target-updates branch from de63249 to c6c0839 Compare March 16, 2026 17:29
@b-rowan b-rowan marked this pull request as draft March 16, 2026 19:38
@b-rowan b-rowan marked this pull request as ready for review March 18, 2026 21:58
@b-rowan b-rowan marked this pull request as draft March 18, 2026 21:59
@b-rowan
Copy link
Member Author

b-rowan commented Mar 19, 2026

Superseded by #188

@b-rowan b-rowan closed this Mar 19, 2026
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