r4pm 0.3.1__cp37-cp37m-macosx_10_12_x86_64.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 +92 -0
- r4pm/__init__.pyi +239 -0
- r4pm/bindings/__init__.py +40 -0
- r4pm/bindings/__init__.pyi +128 -0
- r4pm/bindings/bindings.py +90 -0
- r4pm/bindings/bindings.pyi +61 -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/ocel_export.py +33 -0
- r4pm/ocel_import.py +72 -0
- r4pm/py.typed +0 -0
- r4pm/r4pm.cpython-37m-darwin.so +0 -0
- r4pm/xes_export.py +13 -0
- r4pm/xes_import.py +18 -0
- r4pm-0.3.1.dist-info/METADATA +183 -0
- r4pm-0.3.1.dist-info/RECORD +49 -0
- r4pm-0.3.1.dist-info/WHEEL +4 -0
- r4pm-0.3.1.dist-info/licenses/LICENSE-APACHE +201 -0
- r4pm-0.3.1.dist-info/licenses/LICENSE-MIT +21 -0
r4pm/__init__.py
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"""
|
|
2
|
+
r4pm - Rust for process mining
|
|
3
|
+
|
|
4
|
+
Import/Export:
|
|
5
|
+
- import_xes, export_xes: XES event logs
|
|
6
|
+
- import_ocel_xml, import_ocel_json: OCEL2 object-centric logs
|
|
7
|
+
|
|
8
|
+
Registry (for use with bindings):
|
|
9
|
+
- import_item, convert_item, export_item
|
|
10
|
+
- list_items, remove_item
|
|
11
|
+
- item_to_df
|
|
12
|
+
|
|
13
|
+
Auto-generated bindings organized by module:
|
|
14
|
+
- Import from r4pm.bindings
|
|
15
|
+
- Submodules: bindings.discovery, bindings.core, etc.
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
from .xes_import import import_xes
|
|
19
|
+
from .xes_export import export_xes
|
|
20
|
+
from .ocel_import import (
|
|
21
|
+
import_ocel,
|
|
22
|
+
import_ocel_pm4py,
|
|
23
|
+
import_ocel_xml,
|
|
24
|
+
import_ocel_xml_pm4py,
|
|
25
|
+
import_ocel_json,
|
|
26
|
+
import_ocel_json_pm4py,
|
|
27
|
+
rs_ocel_to_pm4py
|
|
28
|
+
)
|
|
29
|
+
from .ocel_export import export_ocel, export_ocel_pm4py
|
|
30
|
+
|
|
31
|
+
from .r4pm import (
|
|
32
|
+
# Registry functions
|
|
33
|
+
import_item,
|
|
34
|
+
convert_item,
|
|
35
|
+
export_item,
|
|
36
|
+
item_to_df,
|
|
37
|
+
list_items,
|
|
38
|
+
remove_item,
|
|
39
|
+
import_item_from_df,
|
|
40
|
+
# Bindings introspection
|
|
41
|
+
list_bindings,
|
|
42
|
+
call_binding,
|
|
43
|
+
# Low-level import/export (used internally)
|
|
44
|
+
# import_xes_rs,
|
|
45
|
+
# export_xes_rs,
|
|
46
|
+
# import_ocel_xml_rs,
|
|
47
|
+
# import_ocel_json_rs,
|
|
48
|
+
__version__,
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
__all__ = [
|
|
52
|
+
# XES import/export
|
|
53
|
+
"xes_import",
|
|
54
|
+
"xes_export",
|
|
55
|
+
# OCEL import
|
|
56
|
+
"import_ocel_xml",
|
|
57
|
+
"import_ocel_xml_pm4py",
|
|
58
|
+
"import_ocel_json",
|
|
59
|
+
"import_ocel_json_pm4py",
|
|
60
|
+
"rs_ocel_to_pm4py",
|
|
61
|
+
# Registry
|
|
62
|
+
"import_item",
|
|
63
|
+
"convert_item",
|
|
64
|
+
"export_item",
|
|
65
|
+
"item_to_df",
|
|
66
|
+
"list_items",
|
|
67
|
+
"remove_item",
|
|
68
|
+
"import_item_from_df",
|
|
69
|
+
# Bindings introspection
|
|
70
|
+
"list_bindings",
|
|
71
|
+
"call_binding",
|
|
72
|
+
# Low-level Rust functions
|
|
73
|
+
# "import_xes_rs",
|
|
74
|
+
# "export_xes_rs",
|
|
75
|
+
# "import_ocel_xml_rs",
|
|
76
|
+
# "import_ocel_json_rs",
|
|
77
|
+
# Bindings submodule
|
|
78
|
+
"bindings",
|
|
79
|
+
"__version__",
|
|
80
|
+
]
|
|
81
|
+
|
|
82
|
+
# Import bindings submodule (auto-generated by build.rs during cargo build)
|
|
83
|
+
try:
|
|
84
|
+
from . import bindings
|
|
85
|
+
except ImportError:
|
|
86
|
+
# Bindings not available - create a placeholder with helpful error
|
|
87
|
+
class _BindingsNotGenerated:
|
|
88
|
+
def __getattr__(self, name):
|
|
89
|
+
raise ImportError(
|
|
90
|
+
"Bindings not available. Rebuild with: maturin develop --release"
|
|
91
|
+
)
|
|
92
|
+
bindings = _BindingsNotGenerated()
|
r4pm/__init__.pyi
ADDED
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
"""r4pm: Rust for Process Mining (Python Version)
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
from typing import Any, Dict, List, Optional, Union
|
|
5
|
+
import polars as pl
|
|
6
|
+
|
|
7
|
+
# ============================================================================
|
|
8
|
+
# XES Import/Export
|
|
9
|
+
# ============================================================================
|
|
10
|
+
|
|
11
|
+
def import_xes(
|
|
12
|
+
path: str,
|
|
13
|
+
date_format: Optional[str] = None,
|
|
14
|
+
print_debug: Optional[bool] = None
|
|
15
|
+
) -> tuple[pl.DataFrame, str]:
|
|
16
|
+
"""
|
|
17
|
+
Import XES event log.
|
|
18
|
+
|
|
19
|
+
Args:
|
|
20
|
+
path: Path to .xes or .xes.gz file
|
|
21
|
+
date_format: Optional date format for parsing (see chrono strftime)
|
|
22
|
+
print_debug: Enable debug output
|
|
23
|
+
|
|
24
|
+
Returns:
|
|
25
|
+
Tuple of (DataFrame with events, JSON string with log metadata)
|
|
26
|
+
"""
|
|
27
|
+
...
|
|
28
|
+
|
|
29
|
+
def export_xes(df: pl.DataFrame, path: str) -> None:
|
|
30
|
+
"""
|
|
31
|
+
Export DataFrame as XES file.
|
|
32
|
+
|
|
33
|
+
Args:
|
|
34
|
+
df: Polars DataFrame with event data
|
|
35
|
+
path: Output path (.xes or .xes.gz)
|
|
36
|
+
"""
|
|
37
|
+
...
|
|
38
|
+
|
|
39
|
+
# ============================================================================
|
|
40
|
+
# OCEL Import
|
|
41
|
+
# ============================================================================
|
|
42
|
+
|
|
43
|
+
def rs_ocel_to_pm4py(ocel_rs: Dict[str, pl.DataFrame]) -> Any:
|
|
44
|
+
"""
|
|
45
|
+
Convert Polars OCEL DataFrames to PM4PY OCEL object.
|
|
46
|
+
|
|
47
|
+
Args:
|
|
48
|
+
ocel_rs: Dict of DataFrames from import_ocel_xml/json
|
|
49
|
+
|
|
50
|
+
Returns:
|
|
51
|
+
PM4PY OCEL object
|
|
52
|
+
"""
|
|
53
|
+
...
|
|
54
|
+
|
|
55
|
+
def import_ocel_xml(path: str) -> Dict[str, pl.DataFrame]:
|
|
56
|
+
"""
|
|
57
|
+
Import OCEL2 from XML.
|
|
58
|
+
|
|
59
|
+
Returns:
|
|
60
|
+
Dict with DataFrames: 'events', 'objects', 'relations', 'o2o', 'object_changes'
|
|
61
|
+
"""
|
|
62
|
+
...
|
|
63
|
+
|
|
64
|
+
def import_ocel_xml_pm4py(path: str) -> Any:
|
|
65
|
+
"""
|
|
66
|
+
Import OCEL2 XML and convert to PM4PY format.
|
|
67
|
+
"""
|
|
68
|
+
...
|
|
69
|
+
|
|
70
|
+
def import_ocel_json(path: str) -> Dict[str, pl.DataFrame]:
|
|
71
|
+
"""
|
|
72
|
+
Import OCEL2 from JSON.
|
|
73
|
+
|
|
74
|
+
Returns:
|
|
75
|
+
Dict with DataFrames: 'events', 'objects', 'relations', 'o2o', 'object_changes'
|
|
76
|
+
"""
|
|
77
|
+
...
|
|
78
|
+
|
|
79
|
+
def import_ocel_json_pm4py(path: str) -> Any:
|
|
80
|
+
"""
|
|
81
|
+
Import OCEL2 JSON and convert to PM4PY format.
|
|
82
|
+
"""
|
|
83
|
+
...
|
|
84
|
+
|
|
85
|
+
def import_ocel(path: str) -> dict[str, pl.DataFrame]:
|
|
86
|
+
"""
|
|
87
|
+
Import OCEL2 from File.
|
|
88
|
+
|
|
89
|
+
Returns:
|
|
90
|
+
Dict with DataFrames: 'events', 'objects', 'relations', 'o2o', 'object_changes'
|
|
91
|
+
"""
|
|
92
|
+
...
|
|
93
|
+
|
|
94
|
+
def import_ocel_pm4py(path: str):
|
|
95
|
+
"""Import OCEL2 JSON and convert to PM4PY format."""
|
|
96
|
+
...
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
def export_ocel(ocel: dict[str, pl.DataFrame], path: str):
|
|
100
|
+
"""
|
|
101
|
+
Export Polars OCEL DataFrames to File
|
|
102
|
+
|
|
103
|
+
Args:
|
|
104
|
+
ocel: Dict of DataFrames from import_ocel_xml/json
|
|
105
|
+
path: Output path (e.g., .ocel.xml or .ocel.json)
|
|
106
|
+
|
|
107
|
+
"""
|
|
108
|
+
...
|
|
109
|
+
|
|
110
|
+
def export_ocel_pm4py(ocel, path: str):
|
|
111
|
+
"""
|
|
112
|
+
Export PM4Py OCEL to File
|
|
113
|
+
|
|
114
|
+
Args:
|
|
115
|
+
ocel: PM4Py OCEL object
|
|
116
|
+
path: Output path (e.g., .ocel.xml or .ocel.json)
|
|
117
|
+
|
|
118
|
+
"""
|
|
119
|
+
...
|
|
120
|
+
|
|
121
|
+
# ============================================================================
|
|
122
|
+
# Registry Functions
|
|
123
|
+
# ============================================================================
|
|
124
|
+
|
|
125
|
+
def import_item(item_type: str, file_path: str, item_id: Optional[str] = None) -> str:
|
|
126
|
+
"""
|
|
127
|
+
Load a file into the registry.
|
|
128
|
+
|
|
129
|
+
Args:
|
|
130
|
+
item_type: Type name (e.g., "OCEL", "EventLog", "IndexLinkedOCEL", "SlimLinkedOCEL")
|
|
131
|
+
file_path: Path to file to load
|
|
132
|
+
item_id: Optional custom ID (auto-generated if not provided)
|
|
133
|
+
|
|
134
|
+
Returns:
|
|
135
|
+
Registry item ID
|
|
136
|
+
"""
|
|
137
|
+
...
|
|
138
|
+
|
|
139
|
+
def convert_item(item_id: str, target_type: str, new_item_id: Optional[str] = None) -> str:
|
|
140
|
+
"""
|
|
141
|
+
Convert a registry item to another type.
|
|
142
|
+
|
|
143
|
+
Args:
|
|
144
|
+
item_id: ID of item to convert
|
|
145
|
+
target_type: Target type name (e.g., "IndexLinkedOCEL")
|
|
146
|
+
new_item_id: Optional ID for converted item (auto-generated if not provided)
|
|
147
|
+
|
|
148
|
+
Returns:
|
|
149
|
+
New registry item ID
|
|
150
|
+
"""
|
|
151
|
+
...
|
|
152
|
+
|
|
153
|
+
def export_item(item_id: str, file_path: str) -> None:
|
|
154
|
+
"""Export a registry item to a file."""
|
|
155
|
+
...
|
|
156
|
+
|
|
157
|
+
def item_to_df(item_id: str) -> Union[pl.DataFrame, Dict[str, pl.DataFrame]]:
|
|
158
|
+
"""
|
|
159
|
+
Get registry item as DataFrame(s).
|
|
160
|
+
|
|
161
|
+
Returns:
|
|
162
|
+
Single DataFrame for EventLog, dict of DataFrames for OCEL
|
|
163
|
+
"""
|
|
164
|
+
...
|
|
165
|
+
|
|
166
|
+
def list_items() -> List[Dict[str, str]]:
|
|
167
|
+
"""
|
|
168
|
+
List all items in the registry.
|
|
169
|
+
|
|
170
|
+
Returns:
|
|
171
|
+
List of dicts with 'id' and 'type' keys
|
|
172
|
+
"""
|
|
173
|
+
...
|
|
174
|
+
|
|
175
|
+
def remove_item(item_id: str) -> bool:
|
|
176
|
+
"""
|
|
177
|
+
Remove item from registry.
|
|
178
|
+
|
|
179
|
+
Returns:
|
|
180
|
+
True if removed, False if not found
|
|
181
|
+
"""
|
|
182
|
+
...
|
|
183
|
+
|
|
184
|
+
def import_item_from_df(
|
|
185
|
+
item_type: str,
|
|
186
|
+
data: Union[pl.DataFrame, Dict[str, pl.DataFrame]],
|
|
187
|
+
item_id: Optional[str] = None
|
|
188
|
+
) -> str:
|
|
189
|
+
"""
|
|
190
|
+
Create a registry item from DataFrame(s).
|
|
191
|
+
|
|
192
|
+
Args:
|
|
193
|
+
item_type: Type of item to create ("EventLog" or "OCEL")
|
|
194
|
+
data: For EventLog: single DataFrame with event data.
|
|
195
|
+
For OCEL: dict with 'events', 'objects', 'relations', 'o2o' DataFrames
|
|
196
|
+
item_id: Optional custom ID (auto-generated if not provided)
|
|
197
|
+
|
|
198
|
+
Returns:
|
|
199
|
+
Registry item ID
|
|
200
|
+
"""
|
|
201
|
+
...
|
|
202
|
+
|
|
203
|
+
# ============================================================================
|
|
204
|
+
# Bindings Introspection
|
|
205
|
+
# ============================================================================
|
|
206
|
+
|
|
207
|
+
def list_bindings() -> List[Dict[str, Any]]:
|
|
208
|
+
"""
|
|
209
|
+
List all available binding functions.
|
|
210
|
+
|
|
211
|
+
Returns:
|
|
212
|
+
List of function metadata dicts with keys: id, name, description, module,
|
|
213
|
+
arguments, required_arguments, return_schema
|
|
214
|
+
"""
|
|
215
|
+
...
|
|
216
|
+
|
|
217
|
+
def call_binding(function_id: str, args_json: str) -> str:
|
|
218
|
+
"""
|
|
219
|
+
Call a binding function by ID.
|
|
220
|
+
|
|
221
|
+
Args:
|
|
222
|
+
function_id: Function ID (e.g., "process_mining::bindings::num_events")
|
|
223
|
+
args_json: JSON string with function arguments
|
|
224
|
+
|
|
225
|
+
Returns:
|
|
226
|
+
JSON string with result (value or registry ID)
|
|
227
|
+
"""
|
|
228
|
+
...
|
|
229
|
+
|
|
230
|
+
# ============================================================================
|
|
231
|
+
# Bindings Submodule
|
|
232
|
+
# ============================================================================
|
|
233
|
+
|
|
234
|
+
# Bindings submodule (organized by Rust module structure)
|
|
235
|
+
from . import bindings as bindings
|
|
236
|
+
|
|
237
|
+
__all__: List[str]
|
|
238
|
+
|
|
239
|
+
__version__: str
|
|
@@ -0,0 +1,40 @@
|
|
|
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 test_some_inputs
|
|
26
|
+
|
|
27
|
+
__all__ = [
|
|
28
|
+
"bindings",
|
|
29
|
+
"core",
|
|
30
|
+
"discovery",
|
|
31
|
+
"discover_alphaplusplusplus",
|
|
32
|
+
"discover_dfg",
|
|
33
|
+
"discover_dfg_from_locel",
|
|
34
|
+
"discover_oc_declare",
|
|
35
|
+
"index_link_ocel",
|
|
36
|
+
"log_to_activity_projection",
|
|
37
|
+
"num_events",
|
|
38
|
+
"num_objects",
|
|
39
|
+
"test_some_inputs",
|
|
40
|
+
]
|
|
@@ -0,0 +1,128 @@
|
|
|
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_events(ocel: str) -> int:
|
|
30
|
+
"""
|
|
31
|
+
Get the number of events in an [`OCEL`]
|
|
32
|
+
|
|
33
|
+
Args:
|
|
34
|
+
ocel: Registry ID for IndexLinkedOCEL
|
|
35
|
+
|
|
36
|
+
Returns:
|
|
37
|
+
int
|
|
38
|
+
"""
|
|
39
|
+
...
|
|
40
|
+
|
|
41
|
+
def num_objects(ocel: str) -> int:
|
|
42
|
+
"""
|
|
43
|
+
Get the number of objects in an [`OCEL`]
|
|
44
|
+
|
|
45
|
+
Args:
|
|
46
|
+
ocel: Registry ID for IndexLinkedOCEL
|
|
47
|
+
|
|
48
|
+
Returns:
|
|
49
|
+
int
|
|
50
|
+
"""
|
|
51
|
+
...
|
|
52
|
+
|
|
53
|
+
def index_link_ocel(ocel: str) -> str:
|
|
54
|
+
"""
|
|
55
|
+
Convert an [`OCEL`] to an [`IndexLinkedOCEL`]
|
|
56
|
+
|
|
57
|
+
Args:
|
|
58
|
+
ocel: Registry ID for OCEL
|
|
59
|
+
|
|
60
|
+
Returns:
|
|
61
|
+
str
|
|
62
|
+
"""
|
|
63
|
+
...
|
|
64
|
+
|
|
65
|
+
def log_to_activity_projection(log: str) -> str:
|
|
66
|
+
"""
|
|
67
|
+
Convert an [`EventLog`] into an [`EventLogActivityProjection`]
|
|
68
|
+
All traces with the same activity sequence are aggregated into one trace with a frequency count
|
|
69
|
+
|
|
70
|
+
Args:
|
|
71
|
+
log: Registry ID for EventLog
|
|
72
|
+
|
|
73
|
+
Returns:
|
|
74
|
+
str
|
|
75
|
+
"""
|
|
76
|
+
...
|
|
77
|
+
|
|
78
|
+
def discover_dfg_from_locel(locel: str) -> Dict[str, Any]:
|
|
79
|
+
"""
|
|
80
|
+
Construct a [`OCDirectlyFollowsGraph`] from an [`IndexLinkedOCEL`]
|
|
81
|
+
|
|
82
|
+
Args:
|
|
83
|
+
locel: Registry ID for IndexLinkedOCEL
|
|
84
|
+
|
|
85
|
+
Returns:
|
|
86
|
+
Dict[str, Any]
|
|
87
|
+
"""
|
|
88
|
+
...
|
|
89
|
+
|
|
90
|
+
def discover_alphaplusplusplus(log_proj: str, config: Optional[Dict[str, Any]] = None) -> Dict[str, Any]:
|
|
91
|
+
"""
|
|
92
|
+
Discover a [`PetriNet`] using the Alpha+++ Process Discovery algorithm
|
|
93
|
+
|
|
94
|
+
Args:
|
|
95
|
+
log_proj: Registry ID for EventLogActivityProjection
|
|
96
|
+
config: Algorithm parameters for Alpha+++
|
|
97
|
+
|
|
98
|
+
Returns:
|
|
99
|
+
Dict[str, Any]
|
|
100
|
+
"""
|
|
101
|
+
...
|
|
102
|
+
|
|
103
|
+
def discover_dfg(event_log: str) -> Dict[str, Any]:
|
|
104
|
+
"""
|
|
105
|
+
Discover [`DirectlyFollowsGraph`] with default classifier
|
|
106
|
+
|
|
107
|
+
Args:
|
|
108
|
+
event_log: Registry ID for EventLog
|
|
109
|
+
|
|
110
|
+
Returns:
|
|
111
|
+
Dict[str, Any]
|
|
112
|
+
"""
|
|
113
|
+
...
|
|
114
|
+
|
|
115
|
+
def discover_oc_declare(locel: str, options: Optional[Dict[str, Any]] = None) -> List[Any]:
|
|
116
|
+
"""
|
|
117
|
+
Discover behavioral OC-DECLARE constraints
|
|
118
|
+
|
|
119
|
+
Args:
|
|
120
|
+
locel: Registry ID for SlimLinkedOCEL
|
|
121
|
+
options: Options for the automatic discovery of OC-DECLARE constraints
|
|
122
|
+
|
|
123
|
+
Returns:
|
|
124
|
+
List[Any]
|
|
125
|
+
"""
|
|
126
|
+
...
|
|
127
|
+
|
|
128
|
+
__all__: List[str]
|
|
@@ -0,0 +1,90 @@
|
|
|
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_events(ocel: str) -> int:
|
|
35
|
+
"""
|
|
36
|
+
Get the number of events 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_events", json.dumps(args_dict))
|
|
49
|
+
return json.loads(result)
|
|
50
|
+
|
|
51
|
+
def num_objects(ocel: str) -> int:
|
|
52
|
+
"""
|
|
53
|
+
Get the number of objects in an [`OCEL`]
|
|
54
|
+
|
|
55
|
+
Args:
|
|
56
|
+
ocel: Registry ID for IndexLinkedOCEL
|
|
57
|
+
|
|
58
|
+
Returns:
|
|
59
|
+
int
|
|
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::num_objects", json.dumps(args_dict))
|
|
66
|
+
return json.loads(result)
|
|
67
|
+
|
|
68
|
+
def index_link_ocel(ocel: str) -> str:
|
|
69
|
+
"""
|
|
70
|
+
Convert an [`OCEL`] to an [`IndexLinkedOCEL`]
|
|
71
|
+
|
|
72
|
+
Args:
|
|
73
|
+
ocel: Registry ID for OCEL
|
|
74
|
+
|
|
75
|
+
Returns:
|
|
76
|
+
Registry ID for IndexLinkedOCEL
|
|
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::index_link_ocel", json.dumps(args_dict))
|
|
83
|
+
return json.loads(result)
|
|
84
|
+
|
|
85
|
+
__all__ = [
|
|
86
|
+
"test_some_inputs",
|
|
87
|
+
"num_events",
|
|
88
|
+
"num_objects",
|
|
89
|
+
"index_link_ocel",
|
|
90
|
+
]
|
|
@@ -0,0 +1,61 @@
|
|
|
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_events(ocel: str) -> int:
|
|
26
|
+
"""
|
|
27
|
+
Get the number of events in an [`OCEL`]
|
|
28
|
+
|
|
29
|
+
Args:
|
|
30
|
+
ocel: Registry ID for IndexLinkedOCEL
|
|
31
|
+
|
|
32
|
+
Returns:
|
|
33
|
+
int
|
|
34
|
+
"""
|
|
35
|
+
...
|
|
36
|
+
|
|
37
|
+
def num_objects(ocel: str) -> int:
|
|
38
|
+
"""
|
|
39
|
+
Get the number of objects in an [`OCEL`]
|
|
40
|
+
|
|
41
|
+
Args:
|
|
42
|
+
ocel: Registry ID for IndexLinkedOCEL
|
|
43
|
+
|
|
44
|
+
Returns:
|
|
45
|
+
int
|
|
46
|
+
"""
|
|
47
|
+
...
|
|
48
|
+
|
|
49
|
+
def index_link_ocel(ocel: str) -> str:
|
|
50
|
+
"""
|
|
51
|
+
Convert an [`OCEL`] to an [`IndexLinkedOCEL`]
|
|
52
|
+
|
|
53
|
+
Args:
|
|
54
|
+
ocel: Registry ID for OCEL
|
|
55
|
+
|
|
56
|
+
Returns:
|
|
57
|
+
str
|
|
58
|
+
"""
|
|
59
|
+
...
|
|
60
|
+
|
|
61
|
+
__all__: List[str]
|