feat: Add pin enumeration utilities (list_pins, show_pins) (#179)#181
Open
shanemmattner wants to merge 1 commit intomainfrom
Open
feat: Add pin enumeration utilities (list_pins, show_pins) (#179)#181shanemmattner wants to merge 1 commit intomainfrom
shanemmattner wants to merge 1 commit intomainfrom
Conversation
Add list_pins() and show_pins() methods to make pin discovery easy
for users. Users can now enumerate component pins without needing
to know them in advance.
Changes:
- Added list_pins() method to Component class (returns List[Dict])
- Added show_pins() method to Component class (prints formatted table)
- Added list_pins() method to ComponentProxy class
- Added show_pins() method to ComponentProxy class
- Added comprehensive test suite (19 tests) in test_pin_utilities.py
- All tests passing
Example usage:
```python
# List pins programmatically
pins = comp.list_pins()
for pin in pins:
print(f"Pin {pin['number']}: {pin['name']} ({pin['type']})")
# Display formatted table
comp.show_pins()
```
Implements #179 Phase 1
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
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.
Summary
Adds pin enumeration utilities to make pin discovery easy for users. Users no longer need to know component pins in advance - they can simply call
list_pins()orshow_pins()to discover them.Changes
list_pins()method toComponentclass - returnsList[Dict[str, Any]]show_pins()method toComponentclass - prints formatted tablelist_pins()method toComponentProxyclassshow_pins()method toComponentProxyclasstest_pin_utilities.pyExample Usage
Programmatic Pin Discovery
Interactive Pin Display
Testing
uv run pytest tests/unit/test_pin_utilities.py -v # 19 passed in 0.35sBenefits
Related Issues
Next Steps
Future phases (#179):
🤖 Generated with Claude Code