Skip to content

Commit

Permalink
Merge branch 'release' into ft-alignments-dynamic-programming
Browse files Browse the repository at this point in the history
  • Loading branch information
fit-alessandro-berti committed Nov 13, 2024
2 parents d4ad083 + 256408a commit f092c88
Show file tree
Hide file tree
Showing 1,321 changed files with 21,608 additions and 14,672 deletions.
17 changes: 16 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
# Changelog of pm4py


## pm4py 2.7.12 (2024.03.XX)
## pm4py 2.7.12 (2024.03.21)

### Added
* 458ee9abf2fc155a7531be96992c9a0c27f8cb81
* maximum number of consecutive occurrences of the same activity in pm4py.get_variants
* b4c914722605b37f787e156f407ea9333a8dd959
* more general between and activity split filters

### Changed
* 100b95c22a47eace59fc631541b2c34c9179765d
09d4e7a07f92fddd90c1b1bbe572308380d7c8f3
* changed BPMN visualizer
* f7b44a41a79760e4f092be2bf98087ea48b63de4
* changed BPMN conversion
* db98b6fbf16847eceab4b53216cc1a1096936785
* improved BPMN support (collaboration, gateways, ...)

### Deprecated

Expand All @@ -14,6 +25,10 @@
* fixing random variables support
* bb759da149b434d0e279256c8c6d397b06079729
* fixing sampling
* a816fb5f000a907b603b44aba1470463109028f0
* bug fix OC-DFG visualization
* 419a95362472c0807b73f4eb3d601f70b3d7c986
* bug fix POWL visualizer

### Removed

Expand Down
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ RUN apt-get -y install gcc g++ flex bison pkg-config automake autoconf cmake
RUN apt-get -y install python3-dev python3-pydot python3-tk
RUN apt-get -y install libopenblas-dev liblapack-dev libboost-all-dev libncurses5-dev libtool libssl-dev libjemalloc-dev libboost-dev libboost-filesystem-dev libboost-system-dev libboost-regex-dev libxml2-dev libxslt-dev libfreetype6-dev libsuitesparse-dev libclang-16-dev llvm-16-dev libthrift-dev libfftw3-dev
RUN python3 -m pip install --upgrade pip
RUN pip3 install deprecation==2.1.0 graphviz==0.20.3 intervaltree==3.1.0 networkx==3.4.2 packaging==24.1 python-dateutil==2.9.0.post0 pytz==2024.2 setuptools==75.3.0 six==1.16.0 sortedcontainers==2.4.0 tzdata==2024.2 wheel==0.44.0
RUN pip3 install colorama==0.4.6 cycler==0.12.1 pydotplus==2.0.2 pyparsing==3.2.0 tqdm==4.66.6
RUN pip3 install deprecation==2.1.0 graphviz==0.20.3 intervaltree==3.1.0 networkx==3.4.2 packaging==24.2 python-dateutil==2.9.0.post0 pytz==2024.2 setuptools==75.3.0 six==1.16.0 sortedcontainers==2.4.0 tzdata==2024.2 wheel==0.45.0
RUN pip3 install colorama==0.4.6 cycler==0.12.1 pydotplus==2.0.2 pyparsing==3.2.0 tqdm==4.67.0
RUN pip3 install lxml==5.3.0 numpy==2.1.3 pandas==2.2.3 scipy==1.14.1
RUN pip3 install contourpy==1.3.0 fonttools==4.54.1 kiwisolver==1.4.7 matplotlib==3.9.2 pillow==11.0.0
RUN pip3 install anyio==4.6.2.post1 asttokens==2.4.1 attrs==24.2.0 certifi==2024.8.30 charset-normalizer==3.4.0 convertdate==2.4.0 decorator==5.1.1 distro==1.9.0 executing==2.1.0 h11==0.14.0 httpcore==1.0.6 httpx==0.27.2 idna==3.10 ipython==8.29.0 jedi==0.19.1 Jinja2==3.1.4 jsonpickle==3.4.2 jsonschema-specifications==2024.10.1 lunardate==0.2.2 MarkupSafe==3.0.2 matplotlib-inline==0.1.7 parso==0.8.4 prompt-toolkit==3.0.48 pure-eval==0.2.3 pydantic==2.9.2 Pygments==2.18.0 pyluach==2.2.0 PyMeeus==0.5.12 referencing==0.35.1 rpds-py==0.20.1 sniffio==1.3.1 stack-data==0.6.3 traitlets==5.14.3 typing_extensions==4.12.2 urllib3==2.2.3 wcwidth==0.2.13
RUN pip3 install jsonschema==4.23.0 openai==1.54.1 pyvis==0.3.2 requests==2.32.3 workalendar==17.0.0
RUN pip3 install anyio==4.6.2.post1 asttokens==2.4.1 attrs==24.2.0 certifi==2024.8.30 charset-normalizer==3.4.0 convertdate==2.4.0 decorator==5.1.1 distro==1.9.0 executing==2.1.0 h11==0.14.0 httpcore==1.0.6 httpx==0.27.2 idna==3.10 ipython==8.29.0 jedi==0.19.1 Jinja2==3.1.4 jsonpickle==3.4.2 jsonschema-specifications==2024.10.1 lunardate==0.2.2 MarkupSafe==3.0.2 matplotlib-inline==0.1.7 parso==0.8.4 prompt-toolkit==3.0.48 pure-eval==0.2.3 pydantic==2.9.2 Pygments==2.18.0 pyluach==2.2.0 PyMeeus==0.5.12 referencing==0.35.1 rpds-py==0.21.0 sniffio==1.3.1 stack-data==0.6.3 traitlets==5.14.3 typing_extensions==4.12.2 urllib3==2.2.3 wcwidth==0.2.13
RUN pip3 install jsonschema==4.23.0 openai==1.54.3 pyvis==0.3.2 requests==2.32.3 workalendar==17.0.0
RUN pip3 install -U meson-python==0.15.0 Cython==3.0.10 ninja==1.11.1.1 spin==0.8 build==1.2.1 setuptools_scm==8.0.4

#RUN cd / && git clone https://github.com/numpy/numpy.git && cd /numpy && git submodule update --init && pip3 install .
Expand Down
185 changes: 94 additions & 91 deletions LICENSE

Large diffs are not rendered by default.

46 changes: 27 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
# pm4py
pm4py is a python library that supports (state-of-the-art) process mining algorithms in python.
It is open source (licensed under GPL) and intended to be used in both academia and industry projects.
pm4py is managed and developed by Process Intelligence Solutions (https://processintelligence.solutions/).
pm4py was initially developed at the Fraunhofer Institute for Applied Information Technology FIT.
# PM4Py
PM4Py is a python library that supports state-of-the-art process mining algorithms in python.
It is open source and intended to be used in both academia and industry projects.

PM4Py is managed and developed by Process Intelligence Solutions (https://processintelligence.solutions/),
a spin-off from the Fraunhofer Institute for Applied Information Technology FIT where PM4Py was initially developed.

Further information on the license options for using PM4Py closed source (especially in industry contexts) can be found at https://processintelligence.solutions/.


## Documentation / API
The full documentation of pm4py can be found at https://processintelligence.solutions/
The full documentation of PM4Py can be found at https://processintelligence.solutions/

## First Example
A very simple example, to whet your appetite:
Here is a simple example to spark your interest:

```python
import pm4py
Expand All @@ -20,30 +24,31 @@ if __name__ == "__main__":
```

## Installation
pm4py can be installed on Python 3.9.x / 3.10.x / 3.11.x / 3.12.x by invoking:
*pip install -U pm4py*
PM4Py can be installed on Python 3.9.x / 3.10.x / 3.11.x / 3.12.x by invoking:

pm4py is also running on older Python environments with different requirements sets, including:
- Python 3.8 (3.8.10): third_party/old_python_deps/requirements_py38.txt
`pip install -U pm4py`

PM4Py is also running on older Python environments with different requirements sets, including:
- Python 3.8 (3.8.10): `third_party/old_python_deps/requirements_py38.txt`

## Requirements
pm4py depends on some other Python packages, with different levels of importance:
PM4Py depends on some other Python packages, with different levels of importance:
* *Essential requirements*: numpy, pandas, deprecation, networkx
* *Normal requirements* (installed by default with the pm4py package, important for mainstream usage): graphviz, intervaltree, lxml, matplotlib, pydotplus, pytz, scipy, tqdm
* *Normal requirements* (installed by default with the PM4Py package, important for mainstream usage): graphviz, intervaltree, lxml, matplotlib, pydotplus, pytz, scipy, tqdm
* *Optional requirements* (not installed by default): requests, pyvis, jsonschema, workalendar, pyarrow, scikit-learn, polars, openai, pyemd, pyaudio, pydub, pygame, pywin32, pygetwindow, pynput

## Release Notes
To track the incremental updates, please refer to the *CHANGELOG* file.
To track the incremental updates, please refer to the `CHANGELOG.md` file.

## Third Party Dependencies
As scientific library in the Python ecosystem, we rely on external libraries to offer our features.
In the */third_party* folder, we list all the licenses of our direct dependencies.
Please check the */third_party/LICENSES_TRANSITIVE* file to get a full list of all transitive dependencies and the corresponding license.
In the `/third_party` folder, we list all the licenses of our direct dependencies.
Please check the `/third_party/LICENSES_TRANSITIVE` file to get a full list of all transitive dependencies and the corresponding license.

## Citing pm4py
If you are using pm4py in your scientific work, please cite pm4py as follows:
## Citing PM4Py
If you are using PM4Py in your scientific work, please cite PM4Py as follows:

**Alessandro Berti, Sebastiaan van Zelst, Daniel Schuster**. (2023). *PM4Py: A process mining library for Python*. Software Impacts, 17, 100556. [DOI](https://doi.org/10.1016/j.simpa.2023.100556) | [Article Link](https://www.sciencedirect.com/science/article/pii/S2665963823000933)
> **Alessandro Berti, Sebastiaan van Zelst, Daniel Schuster**. (2023). *PM4Py: A process mining library for Python*. Software Impacts, 17, 100556. [DOI](https://doi.org/10.1016/j.simpa.2023.100556) | [Article Link](https://www.sciencedirect.com/science/article/pii/S2665963823000933)
BiBTeX:

Expand All @@ -61,3 +66,6 @@ author = {Alessandro Berti and Sebastiaan van Zelst and Daniel Schuster},
}
```

## Legal Notice

This repository is managed by Process Intelligence Solutions (PIS). Further information about PIS can be found online at www.processintelligence.solutions.
27 changes: 16 additions & 11 deletions docs/LICENSE_HEADER_GITHUB.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
'''
This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de).
PM4Py – A Process Mining Library for Python
Copyright (C) 2024 Process Intelligence Solutions UG (haftungsbeschränkt)

PM4Py is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or any later version.

PM4Py is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU General Public License
along with PM4Py. If not, see <https://www.gnu.org/licenses/>.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see this software project's root or
visit <https://www.gnu.org/licenses/>.

Website: https://processintelligence.solutions
Contact: info@processintelligence.solutions
'''
2 changes: 1 addition & 1 deletion docs/header_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
for filename in glob.iglob('../pm4py/' + '**/*.py', recursive=True):
with open(filename, 'r', encoding='utf-8') as original:
data = original.read()
if (data.find(license) == -1):
if "Copyright (C) 2024 Process Intelligence Solutions UG" not in data:
with open(filename, 'w', encoding='utf-8') as modified:
print('adding license to: ' + filename)
modified.write(license + '\n' + data)
Expand Down
14 changes: 7 additions & 7 deletions docs/source/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@ In order to support interoperability between different process mining tools and

In the remainder of this tutorial, we will use an oftenly used dummy example event log to explain the basic process mining operations. The process that we are considering is a simplified process related to customer complaint handling, i.e., *taken from the book of van der Aalst*. The process, and the event data we are going to use, looks as follows.

.. image:: https://pm4py.fit.fraunhofer.de/static/assets/images/getting_started/bpmn_running_example.png
.. image:: https://processintelligence.solutions/static/images/getting_started/bpmn_running_example.png

*Figure 3: Running example BPMN-based process model describing the behavior of the simple process that we use in this tutorial.*

Let’s get started! We have prepared a small sample event log, containing behavior similar equal to the process model in Figure 3. `You can find the sample event log here </static/assets/data/getting_started/running-example.csv>`_. Please download the file and store it somewhere on your computer, e.g., your Downloads folder (On Windows: this is 'C:/Users/user_name/Dowloads'). Consider Figure 4, in which we depict the first 25 rows of the example file.

.. image:: https://pm4py.fit.fraunhofer.de/static/assets/images/getting_started/csv_snapshot.png
.. image:: https://processintelligence.solutions/static/images/getting_started/csv_snapshot.png

*Figure 4: Running example csv data set which we will use in this tutorial.*

Expand Down Expand Up @@ -146,7 +146,7 @@ Next to CSV files, event data can also be stored in an XML-based format, i.e., i
Consider Figure 5, in which we depict a snapshot of the running example data stored in the .xes file format. The complete file can be downloaded
`here <https://pm4py.fit.fraunhofer.de/static/assets/data/getting_started/running-example.xes>`_.

.. image:: https://pm4py.fit.fraunhofer.de/static/assets/images/getting_started/csv_snapshot.png
.. image:: https://processintelligence.solutions/static/images/getting_started/csv_snapshot.png

*Figure 5: Running example xes data set.*

Expand Down Expand Up @@ -333,7 +333,7 @@ Interestingly, none of the algorithms implemented in PM4Py directly discovers a
Note that the resulting process model is the following image:

.. image:: https://pm4py.fit.fraunhofer.de/static/assets/images/getting_started/bpmn_inductive_running_example.png
.. image:: https://processintelligence.solutions/static/images/getting_started/bpmn_inductive_running_example.png

*Figure 6: BPMN model discovered based on the running example event data set, using the Inductive Miner implementation of PM4Py.*

Expand All @@ -353,7 +353,7 @@ As indicated, the algorithm used in this example actually discovers a Process Tr
pm4py.view_process_tree(process_tree)
.. image:: https://pm4py.fit.fraunhofer.de/static/assets/images/getting_started/process_tree_running_example.png
.. image:: https://processintelligence.solutions/static/images/getting_started/process_tree_running_example.png

*Figure 7: Process Tree model discovered based on the running example event data set, using the Inductive Miner implementation of PM4Py.*

Expand All @@ -376,7 +376,7 @@ Many `commercial process mining solutions <https://www.gartner.com/reviews/marke
.. image:: https://pm4py.fit.fraunhofer.de/static/assets/images/getting_started/dfg_running_example.png
.. image:: https://processintelligence.solutions/static/images/getting_started/dfg_running_example.png

*Figure 8: Process Map (DFG-based) discovered based on the running example event data set.*

Expand All @@ -395,7 +395,7 @@ In PM4Py, we also implemented the `Heuristics Miner <https://ieeexplore.ieee.org
pm4py.view_heuristics_net(map)
.. image:: https://pm4py.fit.fraunhofer.de/static/assets/images/getting_started/hnet_running_example.png
.. image:: https://processintelligence.solutions/static/images/getting_started/hnet_running_example.png

*Figure 9: Process Map (HM-based) discovered based on the running example event data set.*

Expand Down
27 changes: 16 additions & 11 deletions pm4py/__init__.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
'''
This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de).
PM4Py – A Process Mining Library for Python
Copyright (C) 2024 Process Intelligence Solutions UG (haftungsbeschränkt)
PM4Py is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or any later version.
PM4Py is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU General Public License
along with PM4Py. If not, see <https://www.gnu.org/licenses/>.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see this software project's root or
visit <https://www.gnu.org/licenses/>.
Website: https://processintelligence.solutions
Contact: info@processintelligence.solutions
'''
import time

Expand Down
27 changes: 16 additions & 11 deletions pm4py/algo/__init__.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
'''
This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de).
PM4Py – A Process Mining Library for Python
Copyright (C) 2024 Process Intelligence Solutions UG (haftungsbeschränkt)
PM4Py is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or any later version.
PM4Py is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU General Public License
along with PM4Py. If not, see <https://www.gnu.org/licenses/>.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see this software project's root or
visit <https://www.gnu.org/licenses/>.
Website: https://processintelligence.solutions
Contact: info@processintelligence.solutions
'''
from pm4py.algo import discovery, conformance, analysis, evaluation, simulation, organizational_mining, transformation
27 changes: 16 additions & 11 deletions pm4py/algo/analysis/__init__.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
'''
This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de).
PM4Py – A Process Mining Library for Python
Copyright (C) 2024 Process Intelligence Solutions UG (haftungsbeschränkt)
PM4Py is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or any later version.
PM4Py is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU General Public License
along with PM4Py. If not, see <https://www.gnu.org/licenses/>.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see this software project's root or
visit <https://www.gnu.org/licenses/>.
Website: https://processintelligence.solutions
Contact: info@processintelligence.solutions
'''
from pm4py.algo.analysis import extended_marking_equation, marking_equation, workflow_net, woflan
Loading

0 comments on commit f092c88

Please sign in to comment.