nucypher / ATxM

Automatic Transaction Machine 🏧 🔁
https://pypi.org/project/atxm/
GNU Affero General Public License v3.0
3 stars 3 forks source link

Initital Tweak to using a State Machine #8

Closed derekpierre closed 6 months ago

derekpierre commented 7 months ago

atxm_state_machine

I believe this is a first step - the functionality is now on par with what was present before move to using a state machine. Running the retrytx example works. Still more work to do in hooks, pause and how to resume, idling vs sleeping (and concurrency), on_fault hook clarification - added TODOs for follow-up PRs.

I'm light on tests because I would like buy-in to the state machine strategy before it becomes more entrenched. I think understanding the transitions, and what actions are taken based on current/transitioning state makes the system more understandable - of course others may disagree.

Related to https://github.com/nucypher/nucypher/issues/3453

codecov-commenter commented 7 months ago

Codecov Report

Attention: Patch coverage is 90.35533% with 19 lines in your changes are missing coverage. Please review.

:exclamation: No coverage uploaded for pull request base (main@fada083). Click here to learn what that means.

Files Patch % Lines
atxm/machine.py 86.07% 11 Missing :warning:
atxm/utils.py 81.25% 6 Missing :warning:
atxm/main.py 83.33% 1 Missing :warning:
atxm/strategies.py 50.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #8 +/- ## ======================================= Coverage ? 80.30% ======================================= Files ? 13 Lines ? 909 Branches ? 0 ======================================= Hits ? 730 Misses ? 179 Partials ? 0 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.