Skip to content

Remove handler - #538

Merged
joeshannon merged 16 commits into
mainfrom
434-remove-handler
Jul 23, 2024
Merged

joeshannon merged 16 commits into
mainfrom
434-remove-handler

Conversation

@joeshannon

@joeshannon joeshannon commented Jul 4, 2024 •

Copy link
Copy Markdown
Contributor

Remove handler

The handler has caused additional complexity with multiple levels of
indirection.

Remove the ABC and include the free functions in an "interface" module.

The main app and cli tests are rewritten to look more like unit tests.

This PR is to be followed up by further refactoring to replace the
singleton class with cached functions and restructuring the modules.

Fixes #434.

@codecov

codecov Bot commented Jul 4, 2024 •

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 97.71689% with 5 lines in your changes missing coverage. Please review.

Project coverage is 90.21%. Comparing base (24441af) to head (de535ac).

Files Patch % Lines
src/blueapi/service/main.py 95.74% 2 Missing ⚠️
src/blueapi/service/runner.py 96.96% 2 Missing ⚠️
src/blueapi/service/interface.py 99.05% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #538      +/-   ##
==========================================
- Coverage   91.51%   90.21%   -1.31%     
==========================================
  Files          42       41       -1     
  Lines        1933     1829     -104     
==========================================
- Hits         1769     1650     -119     
- Misses        164      179      +15     

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

@joeshannon
joeshannon force-pushed the 434-remove-handler branch 2 times, most recently from b04c12c to d200a0c Compare July 9, 2024 09:15
Comment thread src/blueapi/service/interface.py Resolved
Comment thread src/blueapi/service/runner.py Resolved
Comment thread src/blueapi/service/interface.py Resolved
@joeshannon
joeshannon force-pushed the 434-remove-handler branch 2 times, most recently from 9dba177 to 4c480cc Compare July 17, 2024 15:04
@joeshannon
joeshannon marked this pull request as ready for review July 17, 2024 15:08
@joeshannon
joeshannon force-pushed the 434-remove-handler branch 2 times, most recently from 64bcaa2 to 81be95f Compare July 23, 2024 10:24
@joeshannon joeshannon changed the title 434 remove handler Remove handler Jul 23, 2024
The handler has caused additional complexity with multiple levels of
indirection.

Remove the ABC and include the free functions in an "interface" module.

The main app and cli tests are rewritten to look more like unit tests.

This PR is to be followed up by further refactoring to replace the
singleton class with cached functions and restructuring the modules.

Fixes #434.
@joeshannon
joeshannon force-pushed the 434-remove-handler branch 3 times, most recently from 3794a34 to 533bea0 Compare July 23, 2024 11:30
@joeshannon
joeshannon force-pushed the 434-remove-handler branch from 533bea0 to 6ae803e Compare July 23, 2024 12:12
@callumforrester

Copy link
Copy Markdown
Contributor

Had a play locally, when I reload the environment it doesn't appear to import new changes.

@joeshannon
joeshannon force-pushed the 434-remove-handler branch from 30774d2 to de535ac Compare July 23, 2024 14:17

@callumforrester callumforrester left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@joeshannon
joeshannon merged commit 4621ed3 into main Jul 23, 2024
@joeshannon
joeshannon deleted the 434-remove-handler branch July 23, 2024 14:39
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.

Get rid of Handler

2 participants