pytransitions / transitions

A lightweight, object-oriented finite state machine implementation in Python with many extensions
MIT License
5.49k stars 525 forks source link

may_<trigger_name> #573

Closed nm-libang closed 1 year ago

nm-libang commented 2 years ago

Thank you for taking the time to report a bug! Your support is essential for the maintenance of this project. Please fill out the following fields to ease bug hunting and resolving this issue as soon as possible:

Describe the bug may_ callbacks are not added automatically

Minimal working example

# your minimal working example

Expected behavior As described in the documentation If you want to check whether a transition is possible before you execute it ('look before you leap'), you can use may_ convenience functions that have been attached to your model:

check if the current temperature is hot enough to trigger a transition

if lump.may_heat(): lump.heat()

Additional context Add any other context about the problem here.

aleneum commented 2 years ago

Hello @nm-libang,

which version of transitions do you use? This feature has been added in transitions 0.9.0 which has not been published to PyPI yet.

nm-libang commented 2 years ago

version = '0.8.10'

When do you plan to publish 0.9.0 ??

serranomorante commented 1 year ago

Hi. When will 0.9.0 be publish?

aleneum commented 1 year ago

I'd like to replace the current coveralls setup since it always returns error with parallel builds even when coverage slightly increased. I hope this wont take too much time. I plan to release today or in the next few days.

aleneum commented 1 year ago

Version 0.9.0 has been published to PyPI