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

State Machine refactor #158

Merged
merged 13 commits into from
Oct 11, 2018
Merged

Conversation

armonge
Copy link
Contributor

@armonge armonge commented Oct 11, 2018

The code for the State Machine was getting too hairy, i refactored it to get a simpler model, create a new State Class, removed some of the features we rarely use and started using an actual State class

Basically we no longer have the entry special state, that also means we now only have 2 ways of specifying a state, a function handler and a literal transition object. Before there was also the entry way, which by the way could also take a function, this was leadomg to harder code in the StateMachine and from looking at our past projects wasn't a feature used often in recent projects

@coveralls
Copy link

coveralls commented Oct 11, 2018

Coverage Status

Coverage increased (+1.06%) to 95.826% when pulling 7b88ff2 on armonge:task/state-machine-rewrite into b83b8da on mediarain:v3.

{
tell: "doesNotLikeVoxa"
},
"NoIntent"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was a feature intended since the beginning, finally got it working with code i actually feel good about


afterEach(() => {
delete process.env.DEBUG;
process.env = processData;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this was deleting my logs in the tests when running them with DEBUG=voxa yarn test --watch --bail

@armonge armonge closed this Oct 11, 2018
@armonge armonge reopened this Oct 11, 2018
@armonge armonge changed the title Starting with the State Machine refactor State Machine refactor Oct 11, 2018
@armonge armonge merged commit fd9136c into VoxaAI:v3 Oct 11, 2018
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.

4 participants