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

feature(robot-server): Namespaces in command definitions #6089

Closed
3 tasks
amitlissack opened this issue Jul 8, 2020 · 0 comments · Fixed by #6098
Closed
3 tasks

feature(robot-server): Namespaces in command definitions #6089

amitlissack opened this issue Jul 8, 2020 · 0 comments · Fixed by #6098
Assignees
Labels
feature Ticket is a feature request / PR introduces a feature robot server Affects the `robot-server` project robot-svcs Falls under the purview of the Robot Services squad (formerly CPX, Core Platform Experience).
Milestone

Comments

@amitlissack
Copy link
Contributor

Today the command definitions are in a single enumeration in robot_server.session.models. This is not scalable.

We need a way to be able to define commands in separate files and with optional namespaces to avoid spaghetti.

Acceptance criteria:

  • robot_server.session.models.CommandName is abstracted into a CommandDefinition which will have a name, optional namespace, full name, and data model of the command payload.
  • robot_server.session.models.BasicSessionCommand.command will be a Union of all CommandDefinition enumeration types (ie Session specific commands).
  • CommandDefinition will be fully available for command handlers in order to filter based on namespace, name.
@amitlissack amitlissack added this to the CPX Sprint 13 milestone Jul 8, 2020
@amitlissack amitlissack self-assigned this Jul 8, 2020
@amitlissack amitlissack added robot-svcs Falls under the purview of the Robot Services squad (formerly CPX, Core Platform Experience). feature Ticket is a feature request / PR introduces a feature robot server Affects the `robot-server` project labels Jul 8, 2020
amitlissack pushed a commit that referenced this issue Jul 10, 2020
* adding namespaces

* refactor after rebase

* create multiple command definition enumerations.

* allow backwards compatility for pre-namespaced command names

* rename exit to exitSession

* run app uses namespaced calibration check commands

* Update robot-server/robot_server/service/session/models.py

Co-authored-by: Brian Arthur Cooper <[email protected]>

* Removed unused -TIP_LENGTH_TRANSITIONS dict

* clean up naming

* flow errors

* fix js test

Co-authored-by: Brian Arthur Cooper <[email protected]>

closes #6089
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Ticket is a feature request / PR introduces a feature robot server Affects the `robot-server` project robot-svcs Falls under the purview of the Robot Services squad (formerly CPX, Core Platform Experience).
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant