-
Notifications
You must be signed in to change notification settings - Fork 33
fix auth commands #436
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix auth commands #436
Conversation
src/pieces/_vendor/pieces_os_client/wrapper/basic_identifier/user.py
Outdated
Show resolved
Hide resolved
376abd6 to
92cd89c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR aims to fix authentication commands in the PiecesOS CLI by improving login/logout functionality and adding comprehensive test coverage. The changes refactor thread handling from the API's async_req mechanism to Python's standard Threading module and add cloud status checking to the login flow.
Key Changes:
- Added comprehensive test suite for login and logout commands with 459 lines of tests
- Enhanced login command to check and display cloud connection status, automatically connecting if disconnected
- Refactored async request handling from API client's pool-based approach to Python's standard Thread class
- Added null check for current_asset in assets_command decorator
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/auth_commands_test.py | New comprehensive test suite covering login/logout commands with various scenarios including edge cases |
| src/pieces/command_interface/auth_commands.py | Enhanced login command to check cloud status and auto-connect; improved user feedback with status display |
| src/pieces/_vendor/pieces_os_client/wrapper/basic_identifier/user.py | Refactored login/connect methods to use Python's Thread class instead of async_req; changed from async to sync connect behavior |
| src/pieces/_vendor/pieces_os_client/wrapper/client.py | Removed unused pool method that was previously used for async API calls |
| src/pieces/core/assets_command.py | Added additional null check for current_asset to prevent errors when no asset is selected |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/pieces/_vendor/pieces_os_client/wrapper/basic_identifier/user.py
Outdated
Show resolved
Hide resolved
92cd89c to
cf446d1
Compare
tsavo-at-pieces
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good looks!
No description provided.