Skip to content
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

Remove handler #538

Merged
merged 16 commits into from
Jul 23, 2024
Merged

Remove handler #538

merged 16 commits into from
Jul 23, 2024

Conversation

joeshannon
Copy link
Contributor

@joeshannon joeshannon commented Jul 4, 2024

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.

Copy link

codecov bot commented Jul 4, 2024

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
src/blueapi/service/interface.py Show resolved Hide resolved
src/blueapi/service/runner.py Outdated Show resolved Hide resolved
src/blueapi/service/interface.py Show resolved Hide 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
@callumforrester
Copy link
Contributor

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

Copy link
Contributor

@callumforrester callumforrester left a comment

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
24 checks passed
@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