Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2.7.13 #513

Merged
merged 147 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
147 commits
Select commit Hold shift + click to select a range
95adc42
chore(deps): update dependency graphviz to v0.20.3
renovate-bot Mar 21, 2024
9a8c4f5
Merge branch 'renovate/graphviz-0.x' into 'integration'
fit-alessandro-berti Mar 21, 2024
e7e3402
Merge branch 'hotfixes' into integration
fit-alessandro-berti Mar 22, 2024
2f1c5a9
docs(pm4py): updated changelog
fit-alessandro-berti Mar 22, 2024
8e1a9ea
Merge branch 'hotfixes' into integration
fit-alessandro-berti Mar 22, 2024
cdcf0d2
bumped version number
fit-alessandro-berti Mar 22, 2024
7b4787b
performed safety check
fit-alessandro-berti Mar 22, 2024
67b7e34
updated dependencies sheet
fit-alessandro-berti Mar 22, 2024
4e4e0a5
Merge branch 'hotfixes' into integration
fit-alessandro-berti Mar 27, 2024
aea8462
Merge branch 'hotfixes' into integration
fit-alessandro-berti Mar 27, 2024
fb6a3d4
Merge branch 'hotfixes' into integration
fit-alessandro-berti Mar 27, 2024
851b264
Merge branch 'hotfixes' into integration
fit-alessandro-berti Mar 27, 2024
2f783ff
Merge branch 'hotfixes' into integration
fit-alessandro-berti Mar 27, 2024
3b60c94
Merge branch 'hotfixes' into integration
fit-alessandro-berti Mar 27, 2024
3b1d9c8
docs(pm4py): updated changelog
fit-alessandro-berti Mar 27, 2024
5d83531
docs(pm4py): performed safety check
fit-alessandro-berti Mar 27, 2024
47f5d77
Merge branch 'hotfixes' into integration
fit-alessandro-berti Mar 27, 2024
5d173e5
Merge branch 'hotfixes' into integration
fit-alessandro-berti Mar 28, 2024
41712aa
Merge branch 'hotfixes' into integration
fit-alessandro-berti Mar 28, 2024
c74d747
docs(pm4py): updated changelog
fit-alessandro-berti Mar 28, 2024
2f30420
Merge branch 'hotfixes' into integration
fit-alessandro-berti Mar 28, 2024
f69beb0
chore(deps): update dependency lxml to v5.2.0
renovate-bot Mar 31, 2024
aad7463
Merge branch 'hotfixes' into integration
fit-alessandro-berti Apr 1, 2024
49c4a89
Merge branch 'renovate/lxml-5.x' into 'integration'
fit-alessandro-berti Apr 1, 2024
6277fb5
chore(deps): update dependency pillow to v10.3.0
renovate-bot Apr 1, 2024
deabbb1
Merge branch 'renovate/pillow-10.x' into 'integration'
fit-alessandro-berti Apr 2, 2024
3a07006
Merge branch 'hotfixes' into integration
fit-alessandro-berti Apr 2, 2024
f3e5050
chore(deps): update dependency contourpy to v1.2.1
renovate-bot Apr 2, 2024
a8174ee
chore(deps): update dependency scipy to v1.13.0
renovate-bot Apr 2, 2024
1e29ec8
chore(deps): update dependency matplotlib to v3.8.4
renovate-bot Apr 4, 2024
4561723
Merge branch 'renovate/matplotlib-3.x' into 'integration'
fit-alessandro-berti Apr 4, 2024
20ce854
Merge branch 'renovate/scipy-1.x' into 'integration'
fit-alessandro-berti Apr 4, 2024
7e93a79
Merge branch 'renovate/contourpy-1.x' into 'integration'
fit-alessandro-berti Apr 4, 2024
ecffd36
updating dependencies
fit-alessandro-berti Apr 4, 2024
53cd107
updating dependencies sheet
fit-alessandro-berti Apr 4, 2024
cd87239
Merge branch 'hotfixes' into integration
fit-alessandro-berti Apr 4, 2024
0025e18
Merge branch 'hotfixes' into integration
fit-alessandro-berti Apr 4, 2024
8fac59a
Merge branch 'hotfixes' into integration
fit-alessandro-berti Apr 5, 2024
23e2ed2
chore(deps): update dependency fonttools to v4.51.0
renovate-bot Apr 5, 2024
8b73a9a
Merge branch 'renovate/fonttools-4.x' into 'integration'
fit-alessandro-berti Apr 5, 2024
b3cf675
chore(deps): update dependency networkx to v3.3
renovate-bot Apr 6, 2024
9dbd778
Merge branch 'renovate/networkx-3.x' into 'integration'
fit-alessandro-berti Apr 7, 2024
dd98f3f
Merge branch 'hotfixes' into integration
fit-alessandro-berti Apr 8, 2024
19db6f2
docs(pm4py): updated changelog
fit-alessandro-berti Apr 8, 2024
ea0c081
feat(pm4py): prefix tree __repr__
fit-alessandro-berti Apr 8, 2024
0198eeb
chore(deps): update python docker tag to v3.12.3
renovate-bot Apr 10, 2024
e2fb8bc
Merge branch 'renovate/python-3.x' into 'integration'
fit-alessandro-berti Apr 10, 2024
0ead2ab
chore(deps): update dependency pandas to v2.2.2
renovate-bot Apr 10, 2024
92b24f5
Merge branch 'hotfixes' into integration
fit-alessandro-berti Apr 11, 2024
5031781
docs(pm4py): updated changelog
fit-alessandro-berti Apr 11, 2024
6fd6791
Merge branch 'renovate/pandas-2.x' into 'integration'
fit-alessandro-berti Apr 11, 2024
6a3bb89
Merge branch 'hotfixes' into integration
fit-alessandro-berti Apr 11, 2024
3b4e11d
Merge branch 'hotfixes' into integration
fit-alessandro-berti Apr 11, 2024
0d1bf1e
Merge branch 'hotfixes' into integration
fit-alessandro-berti Apr 11, 2024
2a0e458
Merge branch 'hotfixes' into integration
fit-alessandro-berti Apr 11, 2024
725c9a7
Merge branch 'hotfixes' into integration
fit-alessandro-berti Apr 11, 2024
2294ddf
Merge branch 'hotfixes' into integration
fit-alessandro-berti Apr 12, 2024
f26d70b
Merge branch 'hotfixes' into integration
fit-alessandro-berti Apr 12, 2024
0ffc9bf
Merge branch 'hotfixes' into integration
fit-alessandro-berti Apr 12, 2024
1323d13
Merge branch 'hotfixes' into integration
fit-alessandro-berti Apr 12, 2024
9b9c952
Merge branch 'hotfixes' into integration
fit-alessandro-berti Apr 12, 2024
43ce62c
Merge branch 'hotfixes' into integration
fit-alessandro-berti Apr 16, 2024
1eef6e5
Merge branch 'hotfixes' into integration
fit-alessandro-berti Apr 16, 2024
d2df937
Merge branch 'hotfixes' into integration
fit-alessandro-berti Apr 16, 2024
a20b378
Merge branch 'hotfixes' into integration
fit-alessandro-berti Apr 16, 2024
7ab0162
feat(pm4py): updated LTL filters documentation in simplified interface
fit-alessandro-berti Apr 16, 2024
5ca253d
Merge branch 'hotfixes' into integration
fit-alessandro-berti Apr 17, 2024
9c4dde0
docs(pm4py): updated changelog
fit-alessandro-berti Apr 17, 2024
3d3f187
bumped release number
fit-alessandro-berti Apr 17, 2024
3cf4e76
performed safety check
fit-alessandro-berti Apr 17, 2024
adcf2cb
Merge branch 'hotfixes' into integration
fit-alessandro-berti Apr 22, 2024
96e0a01
Merge branch 'hotfixes' into integration
fit-alessandro-berti Apr 22, 2024
d362fbc
Merge branch 'hotfixes' into integration
fit-alessandro-berti Apr 29, 2024
397d7d5
docs(pm4py): updated changelog
fit-alessandro-berti Apr 29, 2024
64714a0
Merge branch 'hotfixes' into integration
fit-alessandro-berti May 3, 2024
b2ee6a8
Merge branch 'hotfixes' into integration
fit-alessandro-berti May 13, 2024
01e4545
refactor(pm4py): refactoring OCEL object representation (added unique…
fit-alessandro-berti May 13, 2024
c7500a4
fix(pm4py): trigger warnings in OCEL importing when event/object iden…
fit-alessandro-berti May 13, 2024
5e6ecb4
Merge branch 'hotfixes' into integration
fit-alessandro-berti May 13, 2024
140b9e5
fix(pm4py): hotfixing BPMN import when no waypoints per flow are prov…
fit-alessandro-berti May 13, 2024
fdd5b58
Merge branch 'hotfixes' into integration
fit-alessandro-berti May 13, 2024
c40a993
Merge branch 'hotfixes' into integration
fit-alessandro-berti May 13, 2024
ffc772f
Merge branch 'hotfixes' into integration
fit-alessandro-berti May 14, 2024
6469748
Merge branch 'hotfixes' into integration
fit-alessandro-berti May 14, 2024
be74898
Merge branch 'hotfixes' into integration
fit-alessandro-berti May 21, 2024
6dec0fd
Merge branch 'hotfixes' into integration
fit-alessandro-berti May 23, 2024
59ab283
Merge branch 'hotfixes' into integration
fit-alessandro-berti May 23, 2024
eebb9db
erge branch 'hotfixes' into integration
fit-alessandro-berti May 23, 2024
ee21bd0
Merge branch 'hotfixes' into integration
fit-alessandro-berti May 27, 2024
b2ca0ed
Merge branch 'hotfixes' into integration
fit-alessandro-berti May 27, 2024
709936a
docs(pm4py): updated changelog
fit-alessandro-berti May 27, 2024
013d6f5
performed safety check
fit-alessandro-berti May 27, 2024
e611514
Merge branch 'hotfixes' into integration
fit-alessandro-berti Jun 3, 2024
8d7b85d
Merge branch 'hotfixes' into integration
fit-alessandro-berti Jun 7, 2024
9856deb
Merge branch 'hotfixes' into integration
fit-alessandro-berti Jun 12, 2024
700299c
Merge branch 'hotfixes' into integration
fit-alessandro-berti Jun 19, 2024
1324ffd
Merge branch 'hotfixes' into integration
fit-alessandro-berti Jun 19, 2024
9f8d2c6
Merge branch 'hotfixes' into integration
fit-alessandro-berti Jun 26, 2024
3e633b5
Merge branch 'hotfixes' into integration
fit-alessandro-berti Jun 28, 2024
928f57a
Merge branch 'hotfixes' into integration
fit-alessandro-berti Jul 1, 2024
81f72f3
Merge branch 'hotfixes' into integration
fit-alessandro-berti Jul 1, 2024
1e35b42
Merge branch 'hotfixes' into integration
fit-alessandro-berti Jul 1, 2024
683f438
updated changelog
fit-alessandro-berti Jul 1, 2024
a5ecc69
Merge branch 'integration' into 253-prefix-tree-__repr__
fit-alessandro-berti Jul 1, 2024
07cca0d
Merge branch 'integration' into 256-updated-ltl-filters-documentation…
fit-alessandro-berti Jul 1, 2024
19b436f
Merge branch 'integration' into 260-refactoring-ocel-object-represent…
fit-alessandro-berti Jul 1, 2024
dc4f808
Merge branch 'integration' into 261-trigger-warnings-in-ocel-importin…
fit-alessandro-berti Jul 1, 2024
8228650
feat(pm4py): improved DFG sorting for visualization based on reachabi…
fit-alessandro-berti Jul 1, 2024
236acbe
Revert "feat(pm4py): improved DFG sorting for visualization based on …
fit-alessandro-berti Jul 1, 2024
c533843
feat(pm4py): changes to the header in the dfg vis
fit-alessandro-berti Jul 1, 2024
261c330
feat(pm4py): changes to the header in the dfg vis
fit-alessandro-berti Jul 1, 2024
ac9674c
feat(pm4py): fixing penwidth assignation in start/end edges of DFG vi…
fit-alessandro-berti Jul 1, 2024
ae74349
feat(pm4py): changing petri net visualize imports
fit-alessandro-berti Jul 1, 2024
da9c33b
fix
fit-alessandro-berti Jul 1, 2024
226911e
feat(pm4py): preliminary visualization commit shared by several MRs
fit-alessandro-berti Jul 1, 2024
16b7d98
Merge branch 'integration' into 277-fixing-penwidth-assignation-in-st…
fit-alessandro-berti Jul 1, 2024
b13800b
feat(pm4py): intermediate commit shared by some MRs
fit-alessandro-berti Jul 1, 2024
96c54b0
feat(pm4py): possibility to set the visualization's title in pm4py vi…
fit-alessandro-berti Jul 1, 2024
7967e5d
Merge branch 'hotfixes' into integration
fit-alessandro-berti Jul 1, 2024
b34996b
fix(pm4py): consistency check in OCEL 1.0/2.0 exporting
fit-alessandro-berti Jul 1, 2024
07b169b
updating third party dependencies
fit-alessandro-berti Jul 3, 2024
e45d713
Merge branch 'hotfixes' into integration
fit-alessandro-berti Jul 3, 2024
3c649d2
updated third party dependencies
fit-alessandro-berti Jul 4, 2024
827e1ea
Merge branch 'hotfixes' into integration
fit-alessandro-berti Jul 4, 2024
44bccfa
added third party dependencies
fit-alessandro-berti Jul 8, 2024
2879a77
Merge branch 'hotfixes' into integration
fit-alessandro-berti Jul 8, 2024
5e5503c
chore(deps): update dependency setuptools to v70.3.0
renovate-bot Jul 9, 2024
ca5698f
Merge branch 'renovate/setuptools-70.x' into 'integration'
fit-alessandro-berti Jul 11, 2024
c753425
Merge branch 'hotfix-ocel-exporters' into 'hotfixes'
fit-alessandro-berti Jul 11, 2024
6c1ea7a
Merge branch '279-possibility-to-set-the-visualization-s-title-in-pm4…
fit-alessandro-berti Jul 11, 2024
df45721
Merge branch 'hotfixes' into integration
fit-alessandro-berti Jul 11, 2024
311033c
Merge branch 'integration' of https://gitlab.fit.fraunhofer.de/proces…
fit-alessandro-berti Jul 11, 2024
e98d795
Merge branch '256-updated-ltl-filters-documentation-in-simplified-int…
fit-alessandro-berti Jul 11, 2024
7c86414
Merge branch '253-prefix-tree-__repr__' into 'integration'
fit-alessandro-berti Jul 11, 2024
2fb8e6b
Merge branch '277-fixing-penwidth-assignation-in-start-end-edges-of-d…
fit-alessandro-berti Jul 11, 2024
5fee9b4
Merge branch '260-refactoring-ocel-object-representation-added-unique…
fit-alessandro-berti Jul 11, 2024
6983c35
Merge branch '261-trigger-warnings-in-ocel-importing-when-event-objec…
fit-alessandro-berti Jul 11, 2024
9bd7e5e
docs(pm4py): updated changelog
fit-alessandro-berti Jul 11, 2024
264c2d4
Merge branch 'integration' of https://gitlab.fit.fraunhofer.de/proces…
fit-alessandro-berti Jul 11, 2024
38df0f3
docs(pm4py): updating third-party dependencies
fit-alessandro-berti Jul 11, 2024
29367e7
Merge tag '2.7.13' into dev
fit-alessandro-berti Dec 18, 2024
a94a874
revert
fit-alessandro-berti Dec 18, 2024
64b07c7
revert
fit-alessandro-berti Dec 18, 2024
5538003
Merge branch 'release' into dev
fit-alessandro-berti Dec 29, 2024
fadfca4
Merge remote-tracking branch 'upstream/hotfixes' into dev
fit-alessandro-berti Dec 30, 2024
ea115cc
Merge branch 'release' into dev
fit-alessandro-berti Dec 30, 2024
f1e42d1
Merge branch 'release' into dev
fit-alessandro-berti Jan 7, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
123 changes: 123 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,127 @@
# Changelog of pm4py


## pm4py 2.7.14 (2024.XX.YY)

### Added

### Changed

### Deprecated

### Fixed

### Removed

### Other


---


## pm4py 2.7.13 (2024.07.11)

### Added

### Changed
* 75c893999e32b3a1a6081db854b9a3cd10eaaa44
* Dockerfile refactoring
* 7b80dad1fcc6955730357f46754c4a511b83ee58
* updating requirements list
* 52459f95d42e2fc39568b0d685bd794c319f205a
* refactoring dependencies generation script
* 928ecf5f8192ff1ef7944c5b0a7be7c530814ad9
* refactoring OpenAI query interface
* 5fee9b4ac61c227ac77cbd28b888a7321ba401bf
* refactor OCEL object repr
* 6c1ea7a38b3ef18fe9d490164ecebd85c432915f
* possibility to set the title in pm4py visualizations

### Deprecated

### Fixed
* 954c2fbdc258b90bcba85001592a5d2950a79724
* bug fix temporal profile conformance checking
* cd8f9fb9f49a5955f0a26f547770aefa8ff222b8
* issue with closing in-memory files when parsing a XES from string
* d51bd9e24aed442f011917d6b77793b118bbf89f
* minor fix OCEL interleavings computation
* 39d769cad1327c47d5948b0c40be4a90e41fcce7
* removed indeterminism in TBR with duplicate transitions
* 2fb8e6bffcac11b14fe13f152ac0b096cdc0d03a
* penwidth assignation in DFG edges
* c753425ffd63da55fc0d3e71ab5b5fb62a2bf359
* OCEL exporters consistency check
* e98d795c977348dcbe7495d62c8975fae0b9499c
* LTL filters documentation in the simplified interface

### Removed

### Other
* ed708047252f96f3bf103ba81d6139b433c39b85
* printing Python versions in tests and examples
* c48882b88326608dc5c6a4101b8123c71a852e18
* parameter to enable/disable visualizations
* 607d2eb601299a23335f8c1976cc59f63bcae5f2
* added example for Inductive Miner LC

---


## pm4py 2.7.12.1 (2024.04.17)

### Added

### Changed
* 5641f9f2c830b567c138524a0b5e705a3836102a
* minor change OCEL names_stripping
* c48882b88326608dc5c6a4101b8123c71a852e18
* parameter to enable/disable visualizations' view

### Deprecated

### Fixed
* 1c6887fda74d2b0a36f483351a6978738517e61e
* bug fix inductive miner infreuent
* e7e8ebf6894d9bc85febc43c82613d185e16ee3b
* solving performance bottleneck in IM
* 4811bbde07f6639deb7c87bdda61504de0889873
* resolved indeterminism in IM fallthroughs
* df1db968adf8bb5f483410be0ceef2928c2b3e6c
* missing tree sort in IM
* 4958e2b8407c01923e5b65c7e46a5f89d8f927dc
* missing fold of PT objects in IM
* 8e404c6c2b53cf14687d1f82d53a4a0fc4ac99d6
* fixed folding of PTs
* a871cbc4bdeaa81013fbfa7a6ec5054d494cb329
* fixed parsing of PTs
* a72cd92410653bf2f0b2ff35ab5d06bf73a95305
eddae51259114caf4e1447beee4981f2e00bcb9c
69dcf7a836a5af3ab5da64701f43e3d8cf6b07aa
* fixed WF-net-to-PT conversion
* 0980ac460d69beb9ede4403a3ed002c1cd30536e
* fixed docstring OCEL flattening
* 6f9c67f48ad89e88d58c2481e85c6f3de9e6e1a5
* fix small issues with stochastic Petri net
* 6781a90df2ba8d90155e7b5135520076843cac33
* bug fix DECLARE discovery and conformance checking
* 7330d5100c8b8916eba9e4b0f31e8fa1f9157c98
* bug fix log skeleton discovery (always after, always before)
* ec2f0b5b43d83a7b9fa154456241e3c685fcb721
* bug fix log-to-prefix-tree discovery (final nodes)
* d580fedd4b770ed85f6864cd6d435db2477684f2
* bumping release number. forcing numpy<2 and pandas<3
* 4f8bbf6d884e25c5474479fd86fe7331076ac2fe
* bug fixes for Pandas >= 3.0 future support

### Removed

### Other


---


## pm4py 2.7.12 (2024.03.21)

### Added
Expand Down Expand Up @@ -34,8 +155,10 @@

### Other


---


## pm4py 2.7.11 (2024.03.01)

### Added
Expand Down
2 changes: 1 addition & 1 deletion pm4py/meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
'''

__name__ = 'pm4py'
VERSION = '2.7.12.4'
VERSION = '2.7.13'
__version__ = VERSION
__doc__ = 'Process mining for Python'
__author__ = 'Process Intelligence Solutions (PIS)'
Expand Down
6 changes: 2 additions & 4 deletions pm4py/objects/bpmn/importer/variants/lxml.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,15 +305,13 @@ def parse_element(bpmn_graph, counts, curr_el, parents, incoming_dict, outgoing_
incoming_dict[seq_flow_id][3], incoming_dict[seq_flow_id][4])
for seq_flow_id in outgoing_dict:
if outgoing_dict[seq_flow_id][0] in nodes_dict:
outgoing_dict[seq_flow_id] = (
nodes_dict[outgoing_dict[seq_flow_id][0]], outgoing_dict[seq_flow_id][1], outgoing_dict[seq_flow_id][2],
outgoing_dict[seq_flow_id][3], outgoing_dict[seq_flow_id][4])
outgoing_dict[seq_flow_id] = (nodes_dict[outgoing_dict[seq_flow_id][0]], outgoing_dict[seq_flow_id][1], outgoing_dict[seq_flow_id][2], outgoing_dict[seq_flow_id][3], outgoing_dict[seq_flow_id][4])

# also supports flows without waypoints
flows_without_waypoints = set(flow_info).union(set(outgoing_dict).intersection(set(incoming_dict)))
for flow_id in flows_without_waypoints:
flow_info[flow_id] = []

for flow_id in flow_info:
if flow_id in outgoing_dict and flow_id in incoming_dict:
flow = None
Expand Down
33 changes: 23 additions & 10 deletions pm4py/objects/ocel/obj.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
from pm4py.util import exec_utils, pandas_utils
import pandas as pd
import numpy as np
from collections import Counter
from copy import copy, deepcopy


Expand All @@ -39,7 +40,8 @@ class Parameters(Enum):


class OCEL(object):
def __init__(self, events=None, objects=None, relations=None, globals=None, parameters=None, o2o=None, e2e=None, object_changes=None):
def __init__(self, events=None, objects=None, relations=None, globals=None, parameters=None, o2o=None, e2e=None,
object_changes=None):
if parameters is None:
parameters = {}

Expand All @@ -54,10 +56,12 @@ def __init__(self, events=None, objects=None, relations=None, globals=None, para
self.event_timestamp = exec_utils.get_param_value(Parameters.EVENT_TIMESTAMP, parameters,
constants.DEFAULT_EVENT_TIMESTAMP)
self.qualifier = exec_utils.get_param_value(Parameters.QUALIFIER, parameters, constants.DEFAULT_QUALIFIER)
self.changed_field = exec_utils.get_param_value(Parameters.CHANGED_FIELD, parameters, constants.DEFAULT_CHNGD_FIELD)
self.changed_field = exec_utils.get_param_value(Parameters.CHANGED_FIELD, parameters,
constants.DEFAULT_CHNGD_FIELD)

if events is None:
events = pandas_utils.instantiate_dataframe({self.event_id_column: [], self.event_activity: [], self.event_timestamp: []})
events = pandas_utils.instantiate_dataframe(
{self.event_id_column: [], self.event_activity: [], self.event_timestamp: []})
if objects is None:
objects = pandas_utils.instantiate_dataframe({self.object_id_column: [], self.object_type_column: []})
if relations is None:
Expand All @@ -67,11 +71,15 @@ def __init__(self, events=None, objects=None, relations=None, globals=None, para
if globals is None:
globals = {}
if o2o is None:
o2o = pandas_utils.instantiate_dataframe({self.object_id_column: [], self.object_id_column+"_2": [], self.qualifier: []})
o2o = pandas_utils.instantiate_dataframe(
{self.object_id_column: [], self.object_id_column + "_2": [], self.qualifier: []})
if e2e is None:
e2e = pandas_utils.instantiate_dataframe({self.event_id_column: [], self.event_id_column+"_2": [], self.qualifier: []})
e2e = pandas_utils.instantiate_dataframe(
{self.event_id_column: [], self.event_id_column + "_2": [], self.qualifier: []})
if object_changes is None:
object_changes = pandas_utils.instantiate_dataframe({self.object_id_column: [], self.object_type_column: [], self.event_timestamp: [], self.changed_field: []})
object_changes = pandas_utils.instantiate_dataframe(
{self.object_id_column: [], self.object_type_column: [], self.event_timestamp: [],
self.changed_field: []})
if self.qualifier not in relations:
relations[self.qualifier] = [None] * len(relations)

Expand Down Expand Up @@ -111,10 +119,13 @@ def get_summary(self) -> str:
ret.append(", number of object types: %d" % (self.objects[self.object_type_column].nunique()))
ret.append(", events-objects relationships: %d)" % (len(self.relations)))
ret.append("\n")
ret.append("Activities occurrences: " + str(self.events[self.event_activity].value_counts().to_dict()))
ret.append("Activities occurrences: " + str(Counter(self.events[self.event_activity].value_counts().to_dict())))
ret.append("\n")
ret.append("Object types occurrences (number of objects): " + str(
self.objects[self.object_type_column].value_counts().to_dict()))
Counter(self.objects[self.object_type_column].value_counts().to_dict())))
ret.append("\n")
ret.append("Unique activities per object type: " + str(
Counter(self.relations.groupby(self.object_type_column)[self.event_activity].nunique().to_dict())))
ret.append("\n")
ret.append(
"Please use <THIS>.get_extended_table() to get a dataframe representation of the events related to the objects.")
Expand All @@ -123,7 +134,8 @@ def get_summary(self) -> str:
def is_ocel20(self):
unique_qualifiers = []
if self.qualifier in self.relations.columns:
unique_qualifiers = [x for x in pandas_utils.format_unique(self.relations[self.qualifier].unique()) if not self.__check_is_nan(x)]
unique_qualifiers = [x for x in pandas_utils.format_unique(self.relations[self.qualifier].unique()) if
not self.__check_is_nan(x)]

return len(self.o2o) > 0 or len(self.object_changes) > 0 or len(unique_qualifiers) > 0

Expand All @@ -143,7 +155,8 @@ def __repr__(self):
return str(self.get_summary())

def __copy__(self):
return OCEL(self.events, self.objects, self.relations, copy(self.globals), copy(self.parameters), copy(self.o2o), copy(self.e2e), copy(self.object_changes))
return OCEL(self.events, self.objects, self.relations, copy(self.globals), copy(self.parameters),
copy(self.o2o), copy(self.e2e), copy(self.object_changes))

def __deepcopy__(self, memo):
return OCEL(self.events.copy(), self.objects.copy(), self.relations.copy(), deepcopy(self.globals),
Expand Down
23 changes: 17 additions & 6 deletions pm4py/objects/ocel/util/ocel_consistency.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

from pm4py.objects.ocel.obj import OCEL
from typing import Optional, Dict, Any
import warnings


def apply(ocel: OCEL, parameters: Optional[Dict[Any, Any]] = None) -> OCEL:
Expand All @@ -45,12 +46,12 @@ def apply(ocel: OCEL, parameters: Optional[Dict[Any, Any]] = None) -> OCEL:
parameters = {}

fields = {
"events": ["ocel:eid", "ocel:activity"],
"objects": ["ocel:oid", "ocel:type"],
"relations": ["ocel:eid", "ocel:oid", "ocel:activity", "ocel:type"],
"o2o": ["ocel:oid", "ocel:oid_2"],
"e2e": ["ocel:eid", "ocel:eid_2"],
"object_changes": ["ocel:oid"]
"events": [ocel.event_id_column, ocel.event_activity],
"objects": [ocel.object_id_column, ocel.object_type_column],
"relations": [ocel.event_id_column, ocel.object_id_column, ocel.event_activity, ocel.object_type_column],
"o2o": [ocel.object_id_column, ocel.object_id_column+"_2"],
"e2e": [ocel.event_id_column, ocel.event_id_column+"_2"],
"object_changes": [ocel.object_id_column]
}

for tab in fields:
Expand All @@ -62,4 +63,14 @@ def apply(ocel: OCEL, parameters: Optional[Dict[Any, Any]] = None) -> OCEL:
df = df[df[fie].str.len() > 0]
setattr(ocel, tab, df)

# check if the event IDs or object IDs are unique
num_ev_ids = ocel.events[ocel.event_id_column].nunique()
num_obj_ids = ocel.objects[ocel.object_id_column].nunique()

if num_ev_ids < len(ocel.events):
warnings.warn("The event identifiers in the OCEL are not unique!")

if num_obj_ids < len(ocel.objects):
warnings.warn("The object identifiers in the OCEL are not unique!")

return ocel
19 changes: 19 additions & 0 deletions pm4py/objects/trie/obj.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,22 @@ def _get_depth(self):
label = property(_get_label, _set_label)
final = property(_get_final, _set_final)
depth = property(_get_depth, _set_depth)

def repr_trie(self, indent_level=0):
stri = []

if self.label:
stri.append("\t"*indent_level + self.label)
indent_level += 1
for child in self.children:
stri.append(child.repr_trie(indent_level=indent_level))
if self.final:
stri.append("\t"*indent_level + "-- END --")

return "\n".join(stri)

def __repr__(self):
return self.repr_trie()

def __str__(self):
return self.repr_trie()
1 change: 1 addition & 0 deletions pm4py/util/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ def get_default_is_aware_enabled():
OPENAI_EXEC_RESULT = True if get_param_from_env("PM4PY_OPENAI_EXEC_RESULT", "False").lower() == "true" else False
DEFAULT_GVIZ_VIEW = get_param_from_env("PM4PY_DEFAULT_GVIZ_VIEW", None)
DEFAULT_ENABLE_VISUALIZATIONS_VIEW = get_param_from_env("PM4PY_DEFAULT_ENABLE_VISUALIZATIONS_VIEW", True)
DEFAULT_ENABLE_GRAPH_TITLES = get_param_from_env("PM4PY_DEFAULT_ENABLE_GRAPH_TITLES", False)

JQUERY_LINK = "https://code.jquery.com/jquery-3.6.3.min.js"
GRAPHVIZJS_LINK = "https://github.com/mdaines/viz-js/releases/download/v1.8.2/viz.js"
Expand Down
Loading
Loading