r4pm 0.4.0__cp313-cp313-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- r4pm/__init__.py +81 -0
- r4pm/__init__.pyi +125 -0
- r4pm/bindings/__init__.py +42 -0
- r4pm/bindings/__init__.pyi +140 -0
- r4pm/bindings/bindings.py +108 -0
- r4pm/bindings/bindings.pyi +73 -0
- r4pm/bindings/core/__init__.py +6 -0
- r4pm/bindings/core/__init__.pyi +7 -0
- r4pm/bindings/core/event_data/__init__.py +5 -0
- r4pm/bindings/core/event_data/__init__.pyi +6 -0
- r4pm/bindings/core/event_data/case_centric/__init__.py +5 -0
- r4pm/bindings/core/event_data/case_centric/__init__.pyi +6 -0
- r4pm/bindings/core/event_data/case_centric/utils/__init__.py +5 -0
- r4pm/bindings/core/event_data/case_centric/utils/__init__.pyi +6 -0
- r4pm/bindings/core/event_data/case_centric/utils/activity_projection.py +28 -0
- r4pm/bindings/core/event_data/case_centric/utils/activity_projection.pyi +21 -0
- r4pm/bindings/core/process_models/__init__.py +5 -0
- r4pm/bindings/core/process_models/__init__.pyi +6 -0
- r4pm/bindings/core/process_models/object_centric/__init__.py +5 -0
- r4pm/bindings/core/process_models/object_centric/__init__.pyi +6 -0
- r4pm/bindings/core/process_models/object_centric/ocdfg/__init__.py +5 -0
- r4pm/bindings/core/process_models/object_centric/ocdfg/__init__.pyi +6 -0
- r4pm/bindings/core/process_models/object_centric/ocdfg/object_centric_dfg_struct.py +27 -0
- r4pm/bindings/core/process_models/object_centric/ocdfg/object_centric_dfg_struct.pyi +20 -0
- r4pm/bindings/discovery/__init__.py +6 -0
- r4pm/bindings/discovery/__init__.pyi +7 -0
- r4pm/bindings/discovery/case_centric/__init__.py +6 -0
- r4pm/bindings/discovery/case_centric/__init__.pyi +7 -0
- r4pm/bindings/discovery/case_centric/alphappp/__init__.py +5 -0
- r4pm/bindings/discovery/case_centric/alphappp/__init__.pyi +6 -0
- r4pm/bindings/discovery/case_centric/alphappp/full.py +30 -0
- r4pm/bindings/discovery/case_centric/alphappp/full.pyi +21 -0
- r4pm/bindings/discovery/case_centric/dfg.py +27 -0
- r4pm/bindings/discovery/case_centric/dfg.pyi +20 -0
- r4pm/bindings/discovery/object_centric/__init__.py +5 -0
- r4pm/bindings/discovery/object_centric/__init__.pyi +6 -0
- r4pm/bindings/discovery/object_centric/oc_declare.py +30 -0
- r4pm/bindings/discovery/object_centric/oc_declare.pyi +21 -0
- r4pm/df/__init__.py +20 -0
- r4pm/df/__init__.pyi +116 -0
- r4pm/df/ocel_export.py +33 -0
- r4pm/df/ocel_import.py +72 -0
- r4pm/df/xes_export.py +13 -0
- r4pm/df/xes_import.py +18 -0
- r4pm/py.typed +0 -0
- r4pm/r4pm.cp313-win_amd64.pyd +0 -0
- r4pm-0.4.0.dist-info/METADATA +183 -0
- r4pm-0.4.0.dist-info/RECORD +51 -0
- r4pm-0.4.0.dist-info/WHEEL +4 -0
- r4pm-0.4.0.dist-info/licenses/LICENSE-APACHE +201 -0
- r4pm-0.4.0.dist-info/licenses/LICENSE-MIT +21 -0
r4pm/__init__.py
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"""
|
|
2
|
+
r4pm - Rust for process mining
|
|
3
|
+
|
|
4
|
+
Simple DataFram API
|
|
5
|
+
- `df` with `import_xes`, `export_xes`, `import_ocel`, `import_ocel_pm4py`, etc.
|
|
6
|
+
|
|
7
|
+
Registry (for use with bindings):
|
|
8
|
+
- import_item, convert_item, export_item
|
|
9
|
+
- list_items, remove_item
|
|
10
|
+
- item_to_df
|
|
11
|
+
|
|
12
|
+
Auto-generated bindings organized by module:
|
|
13
|
+
- Import from r4pm.bindings
|
|
14
|
+
- Submodules: bindings.discovery, bindings.core, etc.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
from .r4pm import (
|
|
18
|
+
# Registry functions
|
|
19
|
+
import_item,
|
|
20
|
+
convert_item,
|
|
21
|
+
export_item,
|
|
22
|
+
item_to_df,
|
|
23
|
+
list_items,
|
|
24
|
+
remove_item,
|
|
25
|
+
import_item_from_df,
|
|
26
|
+
# Bindings introspection
|
|
27
|
+
list_bindings,
|
|
28
|
+
call_binding,
|
|
29
|
+
# Low-level import/export (used internally)
|
|
30
|
+
# import_xes_rs,
|
|
31
|
+
# export_xes_rs,
|
|
32
|
+
# import_ocel_xml_rs,
|
|
33
|
+
# import_ocel_json_rs,
|
|
34
|
+
__version__,
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
__all__ = [
|
|
38
|
+
# XES import/export
|
|
39
|
+
"xes_import",
|
|
40
|
+
"xes_export",
|
|
41
|
+
# OCEL import
|
|
42
|
+
"import_ocel_xml",
|
|
43
|
+
"import_ocel_xml_pm4py",
|
|
44
|
+
"import_ocel_json",
|
|
45
|
+
"import_ocel_json_pm4py",
|
|
46
|
+
"rs_ocel_to_pm4py",
|
|
47
|
+
# Registry
|
|
48
|
+
"import_item",
|
|
49
|
+
"convert_item",
|
|
50
|
+
"export_item",
|
|
51
|
+
"item_to_df",
|
|
52
|
+
"list_items",
|
|
53
|
+
"remove_item",
|
|
54
|
+
"import_item_from_df",
|
|
55
|
+
# Bindings introspection
|
|
56
|
+
"list_bindings",
|
|
57
|
+
"call_binding",
|
|
58
|
+
# Low-level Rust functions
|
|
59
|
+
# "import_xes_rs",
|
|
60
|
+
# "export_xes_rs",
|
|
61
|
+
# "import_ocel_xml_rs",
|
|
62
|
+
# "import_ocel_json_rs",
|
|
63
|
+
# DataFrame submodule
|
|
64
|
+
"df",
|
|
65
|
+
# Bindings submodule
|
|
66
|
+
"bindings",
|
|
67
|
+
"__version__",
|
|
68
|
+
]
|
|
69
|
+
|
|
70
|
+
from . import df
|
|
71
|
+
# Import bindings submodule (auto-generated by build.rs during cargo build)
|
|
72
|
+
try:
|
|
73
|
+
from . import bindings
|
|
74
|
+
except ImportError:
|
|
75
|
+
# Bindings not available - create a placeholder with helpful error
|
|
76
|
+
class _BindingsNotGenerated:
|
|
77
|
+
def __getattr__(self, name):
|
|
78
|
+
raise ImportError(
|
|
79
|
+
"Bindings not available. Rebuild with: maturin develop --release"
|
|
80
|
+
)
|
|
81
|
+
bindings = _BindingsNotGenerated()
|
r4pm/__init__.pyi
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"""r4pm: Rust for Process Mining (Python Version)
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
from typing import Any, Dict, List, Optional, Union
|
|
5
|
+
# ============================================================================
|
|
6
|
+
# Registry Functions
|
|
7
|
+
# ============================================================================
|
|
8
|
+
|
|
9
|
+
def import_item(item_type: str, file_path: str, item_id: Optional[str] = None) -> str:
|
|
10
|
+
"""
|
|
11
|
+
Load a file into the registry.
|
|
12
|
+
|
|
13
|
+
Args:
|
|
14
|
+
item_type: Type name (e.g., "OCEL", "EventLog", "IndexLinkedOCEL", "SlimLinkedOCEL")
|
|
15
|
+
file_path: Path to file to load
|
|
16
|
+
item_id: Optional custom ID (auto-generated if not provided)
|
|
17
|
+
|
|
18
|
+
Returns:
|
|
19
|
+
Registry item ID
|
|
20
|
+
"""
|
|
21
|
+
...
|
|
22
|
+
|
|
23
|
+
def convert_item(item_id: str, target_type: str, new_item_id: Optional[str] = None) -> str:
|
|
24
|
+
"""
|
|
25
|
+
Convert a registry item to another type.
|
|
26
|
+
|
|
27
|
+
Args:
|
|
28
|
+
item_id: ID of item to convert
|
|
29
|
+
target_type: Target type name (e.g., "IndexLinkedOCEL")
|
|
30
|
+
new_item_id: Optional ID for converted item (auto-generated if not provided)
|
|
31
|
+
|
|
32
|
+
Returns:
|
|
33
|
+
New registry item ID
|
|
34
|
+
"""
|
|
35
|
+
...
|
|
36
|
+
|
|
37
|
+
def export_item(item_id: str, file_path: str) -> None:
|
|
38
|
+
"""Export a registry item to a file."""
|
|
39
|
+
...
|
|
40
|
+
|
|
41
|
+
def item_to_df(item_id: str) -> Union[pl.DataFrame, Dict[str, pl.DataFrame]]:
|
|
42
|
+
"""
|
|
43
|
+
Get registry item as DataFrame(s).
|
|
44
|
+
|
|
45
|
+
Returns:
|
|
46
|
+
Single DataFrame for EventLog, dict of DataFrames for OCEL
|
|
47
|
+
"""
|
|
48
|
+
...
|
|
49
|
+
|
|
50
|
+
def list_items() -> List[Dict[str, str]]:
|
|
51
|
+
"""
|
|
52
|
+
List all items in the registry.
|
|
53
|
+
|
|
54
|
+
Returns:
|
|
55
|
+
List of dicts with 'id' and 'type' keys
|
|
56
|
+
"""
|
|
57
|
+
...
|
|
58
|
+
|
|
59
|
+
def remove_item(item_id: str) -> bool:
|
|
60
|
+
"""
|
|
61
|
+
Remove item from registry.
|
|
62
|
+
|
|
63
|
+
Returns:
|
|
64
|
+
True if removed, False if not found
|
|
65
|
+
"""
|
|
66
|
+
...
|
|
67
|
+
|
|
68
|
+
def import_item_from_df(
|
|
69
|
+
item_type: str,
|
|
70
|
+
data: Union[pl.DataFrame, Dict[str, pl.DataFrame]],
|
|
71
|
+
item_id: Optional[str] = None
|
|
72
|
+
) -> str:
|
|
73
|
+
"""
|
|
74
|
+
Create a registry item from DataFrame(s).
|
|
75
|
+
|
|
76
|
+
Args:
|
|
77
|
+
item_type: Type of item to create ("EventLog" or "OCEL")
|
|
78
|
+
data: For EventLog: single DataFrame with event data.
|
|
79
|
+
For OCEL: dict with 'events', 'objects', 'relations', 'o2o' DataFrames
|
|
80
|
+
item_id: Optional custom ID (auto-generated if not provided)
|
|
81
|
+
|
|
82
|
+
Returns:
|
|
83
|
+
Registry item ID
|
|
84
|
+
"""
|
|
85
|
+
...
|
|
86
|
+
|
|
87
|
+
# ============================================================================
|
|
88
|
+
# Bindings Introspection
|
|
89
|
+
# ============================================================================
|
|
90
|
+
|
|
91
|
+
def list_bindings() -> List[Dict[str, Any]]:
|
|
92
|
+
"""
|
|
93
|
+
List all available binding functions.
|
|
94
|
+
|
|
95
|
+
Returns:
|
|
96
|
+
List of function metadata dicts with keys: id, name, description, module,
|
|
97
|
+
arguments, required_arguments, return_schema
|
|
98
|
+
"""
|
|
99
|
+
...
|
|
100
|
+
|
|
101
|
+
def call_binding(function_id: str, args_json: str) -> str:
|
|
102
|
+
"""
|
|
103
|
+
Call a binding function by ID.
|
|
104
|
+
|
|
105
|
+
Args:
|
|
106
|
+
function_id: Function ID (e.g., "process_mining::bindings::num_events")
|
|
107
|
+
args_json: JSON string with function arguments
|
|
108
|
+
|
|
109
|
+
Returns:
|
|
110
|
+
JSON string with result (value or registry ID)
|
|
111
|
+
"""
|
|
112
|
+
...
|
|
113
|
+
|
|
114
|
+
# ============================================================================
|
|
115
|
+
# Bindings Submodule
|
|
116
|
+
# ============================================================================
|
|
117
|
+
|
|
118
|
+
# Bindings submodule (organized by Rust module structure)
|
|
119
|
+
from . import bindings as bindings
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
from . import df as df
|
|
123
|
+
|
|
124
|
+
__all__: List[str]
|
|
125
|
+
__version__: str
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Auto-generated bindings organized by module.
|
|
3
|
+
|
|
4
|
+
DO NOT EDIT - Generated by build.rs
|
|
5
|
+
|
|
6
|
+
Import functions directly or use submodules:
|
|
7
|
+
from r4pm.bindings import discover_dfg
|
|
8
|
+
from r4pm.bindings.discovery.case_centric import dfg
|
|
9
|
+
"""
|
|
10
|
+
from typing import Any, Dict, List, Optional
|
|
11
|
+
|
|
12
|
+
from . import bindings
|
|
13
|
+
from . import core
|
|
14
|
+
from . import discovery
|
|
15
|
+
|
|
16
|
+
# Re-export all functions at top level
|
|
17
|
+
from .discovery.case_centric.alphappp.full import discover_alphaplusplusplus
|
|
18
|
+
from .discovery.case_centric.dfg import discover_dfg
|
|
19
|
+
from .core.process_models.object_centric.ocdfg.object_centric_dfg_struct import discover_dfg_from_locel
|
|
20
|
+
from .discovery.object_centric.oc_declare import discover_oc_declare
|
|
21
|
+
from .bindings import index_link_ocel
|
|
22
|
+
from .core.event_data.case_centric.utils.activity_projection import log_to_activity_projection
|
|
23
|
+
from .bindings import num_events
|
|
24
|
+
from .bindings import num_objects
|
|
25
|
+
from .bindings import slim_link_ocel
|
|
26
|
+
from .bindings import test_some_inputs
|
|
27
|
+
|
|
28
|
+
__all__ = [
|
|
29
|
+
"bindings",
|
|
30
|
+
"core",
|
|
31
|
+
"discovery",
|
|
32
|
+
"discover_alphaplusplusplus",
|
|
33
|
+
"discover_dfg",
|
|
34
|
+
"discover_dfg_from_locel",
|
|
35
|
+
"discover_oc_declare",
|
|
36
|
+
"index_link_ocel",
|
|
37
|
+
"log_to_activity_projection",
|
|
38
|
+
"num_events",
|
|
39
|
+
"num_objects",
|
|
40
|
+
"slim_link_ocel",
|
|
41
|
+
"test_some_inputs",
|
|
42
|
+
]
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Type stubs for bindings module.
|
|
3
|
+
|
|
4
|
+
DO NOT EDIT - Generated by build.rs
|
|
5
|
+
"""
|
|
6
|
+
from typing import Any, Dict, List, Optional
|
|
7
|
+
|
|
8
|
+
from . import bindings as bindings
|
|
9
|
+
from . import core as core
|
|
10
|
+
from . import discovery as discovery
|
|
11
|
+
|
|
12
|
+
def test_some_inputs(s: str, n: int, i: int, f: float, b: bool) -> str:
|
|
13
|
+
"""
|
|
14
|
+
This is a test function.
|
|
15
|
+
**This should be bold**, *this is italic*, `and this code`.
|
|
16
|
+
|
|
17
|
+
Args:
|
|
18
|
+
s: str
|
|
19
|
+
n: int
|
|
20
|
+
i: int
|
|
21
|
+
f: float
|
|
22
|
+
b: bool
|
|
23
|
+
|
|
24
|
+
Returns:
|
|
25
|
+
str
|
|
26
|
+
"""
|
|
27
|
+
...
|
|
28
|
+
|
|
29
|
+
def num_objects(ocel: str) -> int:
|
|
30
|
+
"""
|
|
31
|
+
Get the number of objects in an [`OCEL`]
|
|
32
|
+
|
|
33
|
+
Args:
|
|
34
|
+
ocel: Registry ID for IndexLinkedOCEL
|
|
35
|
+
|
|
36
|
+
Returns:
|
|
37
|
+
int
|
|
38
|
+
"""
|
|
39
|
+
...
|
|
40
|
+
|
|
41
|
+
def slim_link_ocel(ocel: str) -> str:
|
|
42
|
+
"""
|
|
43
|
+
Convert an [`OCEL`] to an [`SlimLinkedOCEL`]
|
|
44
|
+
|
|
45
|
+
Args:
|
|
46
|
+
ocel: Registry ID for OCEL
|
|
47
|
+
|
|
48
|
+
Returns:
|
|
49
|
+
str
|
|
50
|
+
"""
|
|
51
|
+
...
|
|
52
|
+
|
|
53
|
+
def num_events(ocel: str) -> int:
|
|
54
|
+
"""
|
|
55
|
+
Get the number of events in an [`OCEL`]
|
|
56
|
+
|
|
57
|
+
Args:
|
|
58
|
+
ocel: Registry ID for IndexLinkedOCEL
|
|
59
|
+
|
|
60
|
+
Returns:
|
|
61
|
+
int
|
|
62
|
+
"""
|
|
63
|
+
...
|
|
64
|
+
|
|
65
|
+
def index_link_ocel(ocel: str) -> str:
|
|
66
|
+
"""
|
|
67
|
+
Convert an [`OCEL`] to an [`IndexLinkedOCEL`]
|
|
68
|
+
|
|
69
|
+
Args:
|
|
70
|
+
ocel: Registry ID for OCEL
|
|
71
|
+
|
|
72
|
+
Returns:
|
|
73
|
+
str
|
|
74
|
+
"""
|
|
75
|
+
...
|
|
76
|
+
|
|
77
|
+
def log_to_activity_projection(log: str) -> str:
|
|
78
|
+
"""
|
|
79
|
+
Convert an [`EventLog`] into an [`EventLogActivityProjection`]
|
|
80
|
+
All traces with the same activity sequence are aggregated into one trace with a frequency count
|
|
81
|
+
|
|
82
|
+
Args:
|
|
83
|
+
log: Registry ID for EventLog
|
|
84
|
+
|
|
85
|
+
Returns:
|
|
86
|
+
str
|
|
87
|
+
"""
|
|
88
|
+
...
|
|
89
|
+
|
|
90
|
+
def discover_dfg_from_locel(locel: str) -> Dict[str, Any]:
|
|
91
|
+
"""
|
|
92
|
+
Construct a [`OCDirectlyFollowsGraph`] from an [`IndexLinkedOCEL`]
|
|
93
|
+
|
|
94
|
+
Args:
|
|
95
|
+
locel: Registry ID for IndexLinkedOCEL
|
|
96
|
+
|
|
97
|
+
Returns:
|
|
98
|
+
Dict[str, Any]
|
|
99
|
+
"""
|
|
100
|
+
...
|
|
101
|
+
|
|
102
|
+
def discover_alphaplusplusplus(log_proj: str, config: Optional[Dict[str, Any]] = None) -> Dict[str, Any]:
|
|
103
|
+
"""
|
|
104
|
+
Discover a [`PetriNet`] using the Alpha+++ Process Discovery algorithm
|
|
105
|
+
|
|
106
|
+
Args:
|
|
107
|
+
log_proj: Registry ID for EventLogActivityProjection
|
|
108
|
+
config: Algorithm parameters for Alpha+++
|
|
109
|
+
|
|
110
|
+
Returns:
|
|
111
|
+
Dict[str, Any]
|
|
112
|
+
"""
|
|
113
|
+
...
|
|
114
|
+
|
|
115
|
+
def discover_dfg(event_log: str) -> Dict[str, Any]:
|
|
116
|
+
"""
|
|
117
|
+
Discover [`DirectlyFollowsGraph`] with default classifier
|
|
118
|
+
|
|
119
|
+
Args:
|
|
120
|
+
event_log: Registry ID for EventLog
|
|
121
|
+
|
|
122
|
+
Returns:
|
|
123
|
+
Dict[str, Any]
|
|
124
|
+
"""
|
|
125
|
+
...
|
|
126
|
+
|
|
127
|
+
def discover_oc_declare(locel: str, options: Optional[Dict[str, Any]] = None) -> List[Any]:
|
|
128
|
+
"""
|
|
129
|
+
Discover behavioral OC-DECLARE constraints
|
|
130
|
+
|
|
131
|
+
Args:
|
|
132
|
+
locel: Registry ID for SlimLinkedOCEL
|
|
133
|
+
options: Options for the automatic discovery of OC-DECLARE constraints
|
|
134
|
+
|
|
135
|
+
Returns:
|
|
136
|
+
List[Any]
|
|
137
|
+
"""
|
|
138
|
+
...
|
|
139
|
+
|
|
140
|
+
__all__: List[str]
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Auto-generated bindings for bindings
|
|
3
|
+
|
|
4
|
+
DO NOT EDIT - Generated by build.rs
|
|
5
|
+
"""
|
|
6
|
+
from typing import Any, Dict, List, Optional
|
|
7
|
+
|
|
8
|
+
def test_some_inputs(s: str, n: int, i: int, f: float, b: bool) -> str:
|
|
9
|
+
"""
|
|
10
|
+
This is a test function.
|
|
11
|
+
**This should be bold**, *this is italic*, `and this code`.
|
|
12
|
+
|
|
13
|
+
Args:
|
|
14
|
+
s: str
|
|
15
|
+
n: int
|
|
16
|
+
i: int
|
|
17
|
+
f: float
|
|
18
|
+
b: bool
|
|
19
|
+
|
|
20
|
+
Returns:
|
|
21
|
+
str
|
|
22
|
+
"""
|
|
23
|
+
import json
|
|
24
|
+
from ..r4pm import call_binding
|
|
25
|
+
args_dict = {}
|
|
26
|
+
args_dict["s"] = s
|
|
27
|
+
args_dict["n"] = n
|
|
28
|
+
args_dict["i"] = i
|
|
29
|
+
args_dict["f"] = f
|
|
30
|
+
args_dict["b"] = b
|
|
31
|
+
result = call_binding("process_mining::bindings::test_some_inputs", json.dumps(args_dict))
|
|
32
|
+
return json.loads(result)
|
|
33
|
+
|
|
34
|
+
def num_objects(ocel: str) -> int:
|
|
35
|
+
"""
|
|
36
|
+
Get the number of objects in an [`OCEL`]
|
|
37
|
+
|
|
38
|
+
Args:
|
|
39
|
+
ocel: Registry ID for IndexLinkedOCEL
|
|
40
|
+
|
|
41
|
+
Returns:
|
|
42
|
+
int
|
|
43
|
+
"""
|
|
44
|
+
import json
|
|
45
|
+
from ..r4pm import call_binding
|
|
46
|
+
args_dict = {}
|
|
47
|
+
args_dict["ocel"] = ocel
|
|
48
|
+
result = call_binding("process_mining::bindings::num_objects", json.dumps(args_dict))
|
|
49
|
+
return json.loads(result)
|
|
50
|
+
|
|
51
|
+
def slim_link_ocel(ocel: str) -> str:
|
|
52
|
+
"""
|
|
53
|
+
Convert an [`OCEL`] to an [`SlimLinkedOCEL`]
|
|
54
|
+
|
|
55
|
+
Args:
|
|
56
|
+
ocel: Registry ID for OCEL
|
|
57
|
+
|
|
58
|
+
Returns:
|
|
59
|
+
Registry ID for SlimLinkedOCEL
|
|
60
|
+
"""
|
|
61
|
+
import json
|
|
62
|
+
from ..r4pm import call_binding
|
|
63
|
+
args_dict = {}
|
|
64
|
+
args_dict["ocel"] = ocel
|
|
65
|
+
result = call_binding("process_mining::bindings::slim_link_ocel", json.dumps(args_dict))
|
|
66
|
+
return json.loads(result)
|
|
67
|
+
|
|
68
|
+
def num_events(ocel: str) -> int:
|
|
69
|
+
"""
|
|
70
|
+
Get the number of events in an [`OCEL`]
|
|
71
|
+
|
|
72
|
+
Args:
|
|
73
|
+
ocel: Registry ID for IndexLinkedOCEL
|
|
74
|
+
|
|
75
|
+
Returns:
|
|
76
|
+
int
|
|
77
|
+
"""
|
|
78
|
+
import json
|
|
79
|
+
from ..r4pm import call_binding
|
|
80
|
+
args_dict = {}
|
|
81
|
+
args_dict["ocel"] = ocel
|
|
82
|
+
result = call_binding("process_mining::bindings::num_events", json.dumps(args_dict))
|
|
83
|
+
return json.loads(result)
|
|
84
|
+
|
|
85
|
+
def index_link_ocel(ocel: str) -> str:
|
|
86
|
+
"""
|
|
87
|
+
Convert an [`OCEL`] to an [`IndexLinkedOCEL`]
|
|
88
|
+
|
|
89
|
+
Args:
|
|
90
|
+
ocel: Registry ID for OCEL
|
|
91
|
+
|
|
92
|
+
Returns:
|
|
93
|
+
Registry ID for IndexLinkedOCEL
|
|
94
|
+
"""
|
|
95
|
+
import json
|
|
96
|
+
from ..r4pm import call_binding
|
|
97
|
+
args_dict = {}
|
|
98
|
+
args_dict["ocel"] = ocel
|
|
99
|
+
result = call_binding("process_mining::bindings::index_link_ocel", json.dumps(args_dict))
|
|
100
|
+
return json.loads(result)
|
|
101
|
+
|
|
102
|
+
__all__ = [
|
|
103
|
+
"test_some_inputs",
|
|
104
|
+
"num_objects",
|
|
105
|
+
"slim_link_ocel",
|
|
106
|
+
"num_events",
|
|
107
|
+
"index_link_ocel",
|
|
108
|
+
]
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Type stubs for bindings
|
|
3
|
+
|
|
4
|
+
DO NOT EDIT - Generated by build.rs
|
|
5
|
+
"""
|
|
6
|
+
from typing import Any, Dict, List, Optional
|
|
7
|
+
|
|
8
|
+
def test_some_inputs(s: str, n: int, i: int, f: float, b: bool) -> str:
|
|
9
|
+
"""
|
|
10
|
+
This is a test function.
|
|
11
|
+
**This should be bold**, *this is italic*, `and this code`.
|
|
12
|
+
|
|
13
|
+
Args:
|
|
14
|
+
s: str
|
|
15
|
+
n: int
|
|
16
|
+
i: int
|
|
17
|
+
f: float
|
|
18
|
+
b: bool
|
|
19
|
+
|
|
20
|
+
Returns:
|
|
21
|
+
str
|
|
22
|
+
"""
|
|
23
|
+
...
|
|
24
|
+
|
|
25
|
+
def num_objects(ocel: str) -> int:
|
|
26
|
+
"""
|
|
27
|
+
Get the number of objects in an [`OCEL`]
|
|
28
|
+
|
|
29
|
+
Args:
|
|
30
|
+
ocel: Registry ID for IndexLinkedOCEL
|
|
31
|
+
|
|
32
|
+
Returns:
|
|
33
|
+
int
|
|
34
|
+
"""
|
|
35
|
+
...
|
|
36
|
+
|
|
37
|
+
def slim_link_ocel(ocel: str) -> str:
|
|
38
|
+
"""
|
|
39
|
+
Convert an [`OCEL`] to an [`SlimLinkedOCEL`]
|
|
40
|
+
|
|
41
|
+
Args:
|
|
42
|
+
ocel: Registry ID for OCEL
|
|
43
|
+
|
|
44
|
+
Returns:
|
|
45
|
+
str
|
|
46
|
+
"""
|
|
47
|
+
...
|
|
48
|
+
|
|
49
|
+
def num_events(ocel: str) -> int:
|
|
50
|
+
"""
|
|
51
|
+
Get the number of events in an [`OCEL`]
|
|
52
|
+
|
|
53
|
+
Args:
|
|
54
|
+
ocel: Registry ID for IndexLinkedOCEL
|
|
55
|
+
|
|
56
|
+
Returns:
|
|
57
|
+
int
|
|
58
|
+
"""
|
|
59
|
+
...
|
|
60
|
+
|
|
61
|
+
def index_link_ocel(ocel: str) -> str:
|
|
62
|
+
"""
|
|
63
|
+
Convert an [`OCEL`] to an [`IndexLinkedOCEL`]
|
|
64
|
+
|
|
65
|
+
Args:
|
|
66
|
+
ocel: Registry ID for OCEL
|
|
67
|
+
|
|
68
|
+
Returns:
|
|
69
|
+
str
|
|
70
|
+
"""
|
|
71
|
+
...
|
|
72
|
+
|
|
73
|
+
__all__: List[str]
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Auto-generated bindings for core.event_data.case_centric.utils.activity_projection
|
|
3
|
+
|
|
4
|
+
DO NOT EDIT - Generated by build.rs
|
|
5
|
+
"""
|
|
6
|
+
from typing import Any, Dict, List, Optional
|
|
7
|
+
|
|
8
|
+
def log_to_activity_projection(log: str) -> str:
|
|
9
|
+
"""
|
|
10
|
+
Convert an [`EventLog`] into an [`EventLogActivityProjection`]
|
|
11
|
+
All traces with the same activity sequence are aggregated into one trace with a frequency count
|
|
12
|
+
|
|
13
|
+
Args:
|
|
14
|
+
log: Registry ID for EventLog
|
|
15
|
+
|
|
16
|
+
Returns:
|
|
17
|
+
Registry ID for EventLogActivityProjection
|
|
18
|
+
"""
|
|
19
|
+
import json
|
|
20
|
+
from ......r4pm import call_binding
|
|
21
|
+
args_dict = {}
|
|
22
|
+
args_dict["log"] = log
|
|
23
|
+
result = call_binding("process_mining::core::event_data::case_centric::utils::activity_projection::log_to_activity_projection", json.dumps(args_dict))
|
|
24
|
+
return json.loads(result)
|
|
25
|
+
|
|
26
|
+
__all__ = [
|
|
27
|
+
"log_to_activity_projection",
|
|
28
|
+
]
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Type stubs for core.event_data.case_centric.utils.activity_projection
|
|
3
|
+
|
|
4
|
+
DO NOT EDIT - Generated by build.rs
|
|
5
|
+
"""
|
|
6
|
+
from typing import Any, Dict, List, Optional
|
|
7
|
+
|
|
8
|
+
def log_to_activity_projection(log: str) -> str:
|
|
9
|
+
"""
|
|
10
|
+
Convert an [`EventLog`] into an [`EventLogActivityProjection`]
|
|
11
|
+
All traces with the same activity sequence are aggregated into one trace with a frequency count
|
|
12
|
+
|
|
13
|
+
Args:
|
|
14
|
+
log: Registry ID for EventLog
|
|
15
|
+
|
|
16
|
+
Returns:
|
|
17
|
+
str
|
|
18
|
+
"""
|
|
19
|
+
...
|
|
20
|
+
|
|
21
|
+
__all__: List[str]
|