fix(python): fix tuning mode parsing in python#173
Closed
b-rowan wants to merge 3 commits into256foundation:masterfrom
Closed
fix(python): fix tuning mode parsing in python#173b-rowan wants to merge 3 commits into256foundation:masterfrom
b-rowan wants to merge 3 commits into256foundation:masterfrom
Conversation
Collaborator
|
@codex review |
Contributor
There was a problem hiding this comment.
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_TuningTargettyping with new PydanticTuningTarget*models and a_parse_tuning_targetadapter. - Updates
Miner.get_tuning_target()to return the parsed PythonTuningTargettype. - Minor formatting/unwrap cleanups in
miner.pyandfactory.pyfor 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>
599f45f to
de63249
Compare
de63249 to
c6c0839
Compare
Member
Author
|
Superseded by #188 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.