Exemple #1
0
 def test_exporting_dfg(self):
     log = xes_importer.apply(
         os.path.join("input_data", "running-example.xes"))
     dfg = dfg_discovery.apply(log)
     dfg_exporter.apply(
         dfg, os.path.join("test_output_data", "running-example.dfg"))
     dfg, sa, ea = dfg_importer.apply(
         os.path.join("test_output_data", "running-example.dfg"))
     os.remove(os.path.join("test_output_data", "running-example.dfg"))
Exemple #2
0
 def test_exporting_dfg_with_sa_ea(self):
     log = xes_importer.apply(os.path.join("input_data", "running-example.xes"))
     dfg = dfg_discovery.apply(log)
     sa = start_activities.get_start_activities(log)
     ea = end_activities.get_end_activities(log)
     dfg_exporter.apply(dfg, os.path.join("test_output_data", "running-example.dfg"),
                        parameters={dfg_exporter.Variants.CLASSIC.value.Parameters.START_ACTIVITIES: sa,
                                    dfg_exporter.Variants.CLASSIC.value.Parameters.END_ACTIVITIES: ea})
     dfg, sa, ea = dfg_importer.apply(os.path.join("test_output_data", "running-example.dfg"))
     os.remove(os.path.join("test_output_data", "running-example.dfg"))
Exemple #3
0
def read_dfg(file_path):
    """
    Reads a DFG from a .dfg file

    Parameters
    ------------------
    file_path
        File path

    Returns
    ------------------
    dfg
        DFG
    start_activities
        Start activities
    end_activities
        End activities
    """
    from pm4py.objects.dfg.importer import importer as dfg_importer
    dfg, start_activities, end_activities = dfg_importer.apply(file_path)
    return dfg, start_activities, end_activities
Exemple #4
0
 def test_importing_dfg(self):
     dfg, sa, ea = dfg_importer.apply(os.path.join("input_data", "running-example.dfg"))