Skip to content

Controller disconnect#243

Merged
GDYendell merged 2 commits intomainfrom
controller-disconnect
Oct 27, 2025
Merged

Controller disconnect#243
GDYendell merged 2 commits intomainfrom
controller-disconnect

Conversation

@GDYendell
Copy link
Contributor

@GDYendell GDYendell commented Oct 27, 2025

Summary

  • Transport.initialise -> Transport.connect
  • Transport.create_gui and Transport.create_docs removed
    • Individual transports now call these methods in Transport.connect if the options are not None so that the entrypoint doesn't have to
  • Initialisation logic in FastCS.__init__ moved to FastCS.serve
    • This makes things simpler and avoids having to use run_until_complete
    • It makes it easier to launch a fastcs application in the background in tests before interrogating it - asyncio.create_task(fastcs.serve())
  • Add interactive flag to FastCS.run and FastCS.serve to disable the IPython prompt - this can be flaky in tests
  • Add Controller.disconnect to allow drivers to tidy up resources. This is called at the end of FastCS.serve after scan tasks are stopped.

Fixes #197

@codecov
Copy link

codecov bot commented Oct 27, 2025

Codecov Report

❌ Patch coverage is 98.24561% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 89.47%. Comparing base (15b1a66) to head (1976893).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/fastcs/control_system.py 96.15% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #243      +/-   ##
==========================================
- Coverage   90.46%   89.47%   -0.99%     
==========================================
  Files          46       46              
  Lines        2245     2243       -2     
==========================================
- Hits         2031     2007      -24     
- Misses        214      236      +22     

☔ View full report in Codecov by Sentry.
📢 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.

@GDYendell GDYendell linked an issue Oct 27, 2025 that may be closed by this pull request
Base automatically changed from remove-put-method to main October 27, 2025 17:12
@GDYendell GDYendell force-pushed the controller-disconnect branch from a30c133 to b4fe9ea Compare October 27, 2025 17:17
@GDYendell GDYendell force-pushed the controller-disconnect branch from b4fe9ea to 1976893 Compare October 27, 2025 17:30
@GDYendell GDYendell merged commit 469c501 into main Oct 27, 2025
11 of 12 checks passed
@GDYendell GDYendell deleted the controller-disconnect branch October 27, 2025 17:50
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.

Implement Controller.disconnect to allow cleaning up resources

1 participant