-
Notifications
You must be signed in to change notification settings - Fork 178
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
refactor(robot-server): split apart experimental sessions router #8057
Conversation
Codecov Report
@@ Coverage Diff @@
## edge #8057 +/- ##
==========================================
+ Coverage 85.88% 93.25% +7.37%
==========================================
Files 356 135 -221
Lines 21520 5263 -16257
==========================================
- Hits 18482 4908 -13574
+ Misses 3038 355 -2683
Continue to review full report at Codecov.
|
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.
Some previously wrong test docstrings that we should fix up
2fd8771
to
1fd5d0b
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.
👍
) | ||
|
||
|
||
@pytest.fixture(autouse=True) |
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.
Nice!
spec=real_get_session, | ||
) | ||
# TODO(mc, 2021-07-06): add signature support in decoy | ||
get_session.__signature__ = inspect.signature( # type: ignore[attr-defined] |
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.
Is this required because decoy.create_decoy_func(spec=real_get_session)
doesn't copy the type signatures of the spec?
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.
Yeah, filed a ticket for it mcous/decoy#29. Should be pretty straghtforward; decoy spies need to implement the __signature__
magic property
Co-authored-by: Sanniti Pimpley <[email protected]>
Overview
This PR is precursor work to #7921, split into its own PR to ease reviews. It is a pure reorganization PR; it does not affect functionality.
Changelog
This PR splits the previously monolithic
robot_server/sessions/router.py
into three separate routers:robot_server/sessions/router/base_router.py
for/sessions
routesrobot_server/sessions/router/commands_router.py
for/sessions/.../commands
routesrobot_server/sessions/router/actions_router.py
for/sessions/.../actions
routesThe same corresponding change is made to the tests, with required changes to keep things green.
Review requests
/commands
router, I think the test changes make it clear that this split is beneficialRisk assessment
Very low. This entire router is feature flagged, and test coverage of the router was and remains high