This PR searches for all possible branches within a scenario. It does not support looping (for example, in unordered_scenes.yaml from the server repo, test_scene1 loops to itself, and test_scene5, which can be accessed through test_scene1, can go back to test_scene1 in a never ending loop, etc). To avoid problems with this, we start with each scene to find all possible non-repeating branches from that scene. This list of branches (each branch being a list of scene ids) is stored within the class.
These branches are now used in the character_matching and pulse_oximeter tasks. For character matching, we look through every branch that contains the scene we're looking at and grab all the scenes that precede that scene. We then travel through these preceding scenes to figure out what characters we end with (based on updates to characters, if persists_characters is true/false, and removed_characters). Each branch will have its own list of valid characters. If a character is valid in each branch, no error is thrown. If it is invalid in all branches, an error is thrown. If it is invalid in some branches, a warning is given. Not an error, because there might be something we're missing.
Essentially, the same behavior occurs when checking for the pulse_ox
To test, play around with pulse_ox (available or not with Check_blood_ox or check_all_vitals actions) and characters (persist, remove, adding, etc) and try to break it!
This PR searches for all possible branches within a scenario. It does not support looping (for example, in unordered_scenes.yaml from the server repo, test_scene1 loops to itself, and test_scene5, which can be accessed through test_scene1, can go back to test_scene1 in a never ending loop, etc). To avoid problems with this, we start with each scene to find all possible non-repeating branches from that scene. This list of branches (each branch being a list of scene ids) is stored within the class.
These branches are now used in the character_matching and pulse_oximeter tasks. For character matching, we look through every branch that contains the scene we're looking at and grab all the scenes that precede that scene. We then travel through these preceding scenes to figure out what characters we end with (based on updates to characters, if persists_characters is true/false, and removed_characters). Each branch will have its own list of valid characters. If a character is valid in each branch, no error is thrown. If it is invalid in all branches, an error is thrown. If it is invalid in some branches, a warning is given. Not an error, because there might be something we're missing.
Essentially, the same behavior occurs when checking for the pulse_ox
To test, play around with pulse_ox (available or not with Check_blood_ox or check_all_vitals actions) and characters (persist, remove, adding, etc) and try to break it!