Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/previous' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
fit-alessandro-berti committed Oct 9, 2024
2 parents f7cbdb1 + adb194c commit ad5b353
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions examples/execute_everything.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@

EXECUTE_EXAMPLES = True

class OutcomeMeasurement:
SUCCESS = 0
FAILED = 0

def bpmn_js_visualization():
from examples import bpmn_js_visualization
Expand Down Expand Up @@ -874,16 +877,20 @@ def process_tree_reduction():
def execute_script(f):
try:
f()
OutcomeMeasurement.SUCCESS += 1
except ImportError:
import time
traceback.print_exc()
OutcomeMeasurement.FAILED += 1
time.sleep(3)
except KeyError:
import time
traceback.print_exc()
OutcomeMeasurement.FAILED += 1
time.sleep(3)
except:
traceback.print_exc()
OutcomeMeasurement.FAILED += 1
input("\npress INPUT if you want to continue")


Expand Down Expand Up @@ -1028,8 +1035,8 @@ def main():
execute_script(streaming_discovery_dfg)
execute_script(streaming_xes_reader_event_stream)
execute_script(streaming_xes_reader_trace_stream)
execute_script(monte_carlo_dfg)
execute_script(monte_carlo_petri_net)
#execute_script(monte_carlo_dfg)
#execute_script(monte_carlo_petri_net)

print("numpy version: "+str(numpy.__version__))
print("pandas version: "+str(pandas.__version__))
Expand All @@ -1054,6 +1061,8 @@ def main():
print("pm4py version: "+str(pm4py.__version__))
print("Python version: "+str(sys.version))

print("\n\nExamples executed correctly: %d\tExamples failed: %d\t" % (OutcomeMeasurement.SUCCESS, OutcomeMeasurement.FAILED))


if __name__ == "__main__":
main()

0 comments on commit ad5b353

Please sign in to comment.