finite-state-machine icon indicating copy to clipboard operation
finite-state-machine copied to clipboard

List available transactions given the state of the state machine

Open sammydowds opened this issue 3 years ago • 1 comments

1 New Class:

  • TransitionMeta which is added to the transition methods .__fsm attribute

2 New StateMachine methods:

  • all_transitions, returns list of all Transitions
  • available_transitions, returns list of all available Transitions based on state of the StateMachine

At first, I thought this would be way simpler. Let me know if this is not the solution you were looking for!

It looks like pytest still passes, however this is only my second PR - so I would love some feedback!

sammydowds avatar Oct 08 '20 20:10 sammydowds

Codecov Report

Merging #22 into master will decrease coverage by 1.95%. The diff coverage is 77.77%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #22      +/-   ##
==========================================
- Coverage   96.10%   94.15%   -1.96%     
==========================================
  Files           7        7              
  Lines         154      171      +17     
==========================================
+ Hits          148      161      +13     
- Misses          6       10       +4     
Impacted Files Coverage Δ
finite_state_machine/draw_state_diagram.py 81.81% <ø> (ø)
finite_state_machine/state_machine.py 95.06% <77.77%> (-4.94%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update bb96cf3...732e456. Read the comment docs.

codecov-io avatar Oct 08 '20 20:10 codecov-io