Skip to content

Add a logout method to blueapi client - #1611

Open
noemifrisina wants to merge 1 commit into
mainfrom
logout-from-the-client
Open

Add a logout method to blueapi client#1611
noemifrisina wants to merge 1 commit into
mainfrom
logout-from-the-client

Conversation

@noemifrisina

Copy link
Copy Markdown
Contributor

For python applications using the BlueapiClient directly, currently there is a way to login but not one to logout available.

@noemifrisina
noemifrisina requested a review from a team as a code owner August 5, 2026 15:42
@codecov

codecov Bot commented Aug 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 70.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 95.88%. Comparing base (5fecc1e) to head (7eb8f26).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/blueapi/client/client.py 70.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1611      +/-   ##
==========================================
- Coverage   95.96%   95.88%   -0.08%     
==========================================
  Files          45       45              
  Lines        3317     3327      +10     
==========================================
+ Hits         3183     3190       +7     
- Misses        134      137       +3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ZohebShaikh

Copy link
Copy Markdown
Contributor

@tpoliaw I think this would be useful, Was there a reason it was left out during the initial go ?

@tpoliaw

tpoliaw commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

I agree that having a logout method makes sense but it's a bit odd that it accepts a token path that could potentially logout an unrelated session. Could it call logout on the currently active SessionManager instead? #1569 made the session manager accessible from outside the rest client so that could be used here as well. Something like

if sm := self._rest.session_manager:
    sm.logout()

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