pm4py-ucm 0.7.10__py3-none-any.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.
Files changed (77) hide show
  1. pm4py_ucm/__init__.py +77 -0
  2. pm4py_ucm/algo/__init__.py +0 -0
  3. pm4py_ucm/algo/dashboards/__init__.py +77 -0
  4. pm4py_ucm/algo/dashboards/assets/dash-engine.js +1598 -0
  5. pm4py_ucm/algo/dashboards/assets/dash-report.js +446 -0
  6. pm4py_ucm/algo/dashboards/assets/dash-styles.css +1020 -0
  7. pm4py_ucm/algo/dashboards/assets/dash-ui.js +2461 -0
  8. pm4py_ucm/algo/dashboards/catalog.py +276 -0
  9. pm4py_ucm/algo/dashboards/contract.py +609 -0
  10. pm4py_ucm/algo/dashboards/engine.py +1349 -0
  11. pm4py_ucm/algo/dashboards/formula.py +579 -0
  12. pm4py_ucm/algo/dashboards/view.py +311 -0
  13. pm4py_ucm/algo/discovery/__init__.py +0 -0
  14. pm4py_ucm/algo/discovery/families/__init__.py +42 -0
  15. pm4py_ucm/algo/discovery/families/advisor.py +268 -0
  16. pm4py_ucm/algo/discovery/families/algorithm.py +231 -0
  17. pm4py_ucm/algo/discovery/families/assembly.py +925 -0
  18. pm4py_ucm/algo/discovery/families/family.py +181 -0
  19. pm4py_ucm/algo/discovery/families/partition.py +706 -0
  20. pm4py_ucm/algo/discovery/families/report.py +1090 -0
  21. pm4py_ucm/algo/discovery/families/scenarios.py +337 -0
  22. pm4py_ucm/algo/discovery/families/stats.py +762 -0
  23. pm4py_ucm/algo/discovery/resources/__init__.py +0 -0
  24. pm4py_ucm/algo/discovery/resources/algorithm.py +112 -0
  25. pm4py_ucm/algo/discovery/resources/variants/__init__.py +0 -0
  26. pm4py_ucm/algo/discovery/resources/variants/activity_attribute.py +254 -0
  27. pm4py_ucm/algo/discovery/scenarios/__init__.py +6 -0
  28. pm4py_ucm/algo/discovery/scenarios/decision_mining.py +755 -0
  29. pm4py_ucm/algo/discovery/scenarios/expression_minimizer.py +520 -0
  30. pm4py_ucm/algo/discovery/scenarios/reports.py +192 -0
  31. pm4py_ucm/algo/discovery/scenarios/synthesis.py +1966 -0
  32. pm4py_ucm/algo/discovery/ucm/__init__.py +0 -0
  33. pm4py_ucm/algo/discovery/ucm/algorithm.py +33 -0
  34. pm4py_ucm/algo/discovery/ucm/variants/__init__.py +0 -0
  35. pm4py_ucm/algo/discovery/ucm/variants/inductive.py +127 -0
  36. pm4py_ucm/algo/discovery/variants/__init__.py +19 -0
  37. pm4py_ucm/algo/discovery/variants/choice_signature.py +988 -0
  38. pm4py_ucm/algo/discovery/variants/clustering.py +353 -0
  39. pm4py_ucm/algo/discovery/variants/parses.py +198 -0
  40. pm4py_ucm/algo/performance.py +779 -0
  41. pm4py_ucm/algo/scenario_traversal.py +617 -0
  42. pm4py_ucm/algo/traversal.py +536 -0
  43. pm4py_ucm/api.py +840 -0
  44. pm4py_ucm/objects/__init__.py +0 -0
  45. pm4py_ucm/objects/ucm/__init__.py +0 -0
  46. pm4py_ucm/objects/ucm/conversion/__init__.py +0 -0
  47. pm4py_ucm/objects/ucm/conversion/decomposition.py +938 -0
  48. pm4py_ucm/objects/ucm/conversion/from_process_tree.py +570 -0
  49. pm4py_ucm/objects/ucm/exporter/__init__.py +0 -0
  50. pm4py_ucm/objects/ucm/exporter/variants/__init__.py +0 -0
  51. pm4py_ucm/objects/ucm/exporter/variants/jucm.py +1224 -0
  52. pm4py_ucm/objects/ucm/importer/__init__.py +0 -0
  53. pm4py_ucm/objects/ucm/importer/variants/__init__.py +0 -0
  54. pm4py_ucm/objects/ucm/importer/variants/jucm.py +572 -0
  55. pm4py_ucm/objects/ucm/layout/__init__.py +0 -0
  56. pm4py_ucm/objects/ucm/layout/graphviz_layouter.py +163 -0
  57. pm4py_ucm/objects/ucm/layout/layouter.py +625 -0
  58. pm4py_ucm/objects/ucm/obj.py +1309 -0
  59. pm4py_ucm/objects/ucm/util/__init__.py +1 -0
  60. pm4py_ucm/objects/ucm/util/component_colors.py +73 -0
  61. pm4py_ucm/objects/ucm/util/name_wrap.py +123 -0
  62. pm4py_ucm/util/__init__.py +1 -0
  63. pm4py_ucm/util/progress.py +76 -0
  64. pm4py_ucm/visualization/__init__.py +0 -0
  65. pm4py_ucm/visualization/ucm/__init__.py +0 -0
  66. pm4py_ucm/visualization/ucm/family_grid.py +685 -0
  67. pm4py_ucm/visualization/ucm/parameters.py +25 -0
  68. pm4py_ucm/visualization/ucm/stacked.py +274 -0
  69. pm4py_ucm/visualization/ucm/svg.py +286 -0
  70. pm4py_ucm/visualization/ucm/variants/__init__.py +0 -0
  71. pm4py_ucm/visualization/ucm/variants/classic.py +1024 -0
  72. pm4py_ucm/visualization/ucm/visualizer.py +95 -0
  73. pm4py_ucm-0.7.10.dist-info/METADATA +1036 -0
  74. pm4py_ucm-0.7.10.dist-info/RECORD +77 -0
  75. pm4py_ucm-0.7.10.dist-info/WHEEL +5 -0
  76. pm4py_ucm-0.7.10.dist-info/licenses/LICENSE +22 -0
  77. pm4py_ucm-0.7.10.dist-info/top_level.txt +1 -0
pm4py_ucm/__init__.py ADDED
@@ -0,0 +1,77 @@
1
+ """``pm4py-ucm`` — Use Case Map (URN/UCM) extension for PM4Py.
2
+
3
+ This package adds first-class support for the Use Case Map modelling
4
+ notation — part of the ITU-T Z.151 *User Requirements Notation* (URN)
5
+ standard and supported by the open-source jUCMNav tool — to PM4Py-style
6
+ process-mining workflows.
7
+
8
+ The high-level API mirrors PM4Py's BPMN helpers; see :mod:`pm4py_ucm.api`
9
+ for the details. The most common entry points are re-exported here::
10
+
11
+ import pm4py
12
+ import pm4py_ucm
13
+
14
+ log = pm4py.read_xes("log.xes")
15
+ ucm = pm4py_ucm.discover_ucm_inductive(log)
16
+ pm4py_ucm.write_ucm(ucm, "log.jucm")
17
+ """
18
+
19
+ from .api import (
20
+ read_ucm,
21
+ write_ucm,
22
+ discover_ucm_inductive,
23
+ discover_resources,
24
+ discover_components,
25
+ bind_performers,
26
+ convert_to_ucm,
27
+ view_ucm,
28
+ save_vis_ucm,
29
+ discover_scenarios,
30
+ write_variants_report,
31
+ write_case_variant_map,
32
+ write_condition_mining_report,
33
+ discover_ucm_family,
34
+ rank_partition_attributes,
35
+ write_ucm_family,
36
+ assemble_ucm_family,
37
+ save_vis_ucm_family,
38
+ view_ucm_family,
39
+ compute_family_stats,
40
+ write_family_report,
41
+ annotate_performance,
42
+ compute_traversal_stats,
43
+ suggest_decomposition,
44
+ suggest_loop_iterations,
45
+ )
46
+ from .objects.ucm.obj import UCM
47
+
48
+ __all__ = [
49
+ "UCM",
50
+ "read_ucm",
51
+ "write_ucm",
52
+ "discover_ucm_inductive",
53
+ "discover_resources",
54
+ "discover_components",
55
+ "bind_performers",
56
+ "convert_to_ucm",
57
+ "view_ucm",
58
+ "save_vis_ucm",
59
+ "discover_scenarios",
60
+ "write_variants_report",
61
+ "write_case_variant_map",
62
+ "write_condition_mining_report",
63
+ "discover_ucm_family",
64
+ "write_ucm_family",
65
+ "assemble_ucm_family",
66
+ "save_vis_ucm_family",
67
+ "view_ucm_family",
68
+ "compute_family_stats",
69
+ "write_family_report",
70
+ "annotate_performance",
71
+ "compute_traversal_stats",
72
+ "suggest_decomposition",
73
+ "suggest_loop_iterations",
74
+ "rank_partition_attributes",
75
+ ]
76
+
77
+ __version__ = "0.7.10"
File without changes
@@ -0,0 +1,77 @@
1
+ """User-defined dashboards over an event log.
2
+
3
+ A dashboard is an ordered list of *widget specs* plus a dashboard-level
4
+ filter. A widget spec — the core artifact, serialised as JSON — names a
5
+ catalog metric, its parameters, an aggregation, a filter, segmentation
6
+ axes, a visualisation and an optional target::
7
+
8
+ {
9
+ "id": "w1", "title": "avg Send Fine → Payment",
10
+ "metric": "timeBetween",
11
+ "params": {"from": "Send Fine", "to": "Payment"},
12
+ "agg": "avg",
13
+ "filter": [{"field": "attr:amount", "op": ">", "value": 100}],
14
+ "segment": {"rows": "resource", "cols": "quarter"},
15
+ "viz": "table",
16
+ "target": {"on": true, "dir": "<=", "value": 14, "warn": 18,
17
+ "mode": "aggregate"}
18
+ }
19
+
20
+ Modules:
21
+
22
+ * :mod:`.contract` — the per-case fact table shipped to the client;
23
+ * :mod:`.catalog` — what a widget can measure;
24
+ * :mod:`.engine` — per-case values, filters, segmentation, aggregation,
25
+ targets and widget computation;
26
+ * :mod:`.view` — assembles the self-contained HTML artifact that serves
27
+ as *both* the app's Dashboards view and the exported report.
28
+
29
+ The engine exists twice: here, and in JS (``web/assets/dash-engine.js``)
30
+ for the browser and the self-contained HTML export. Both read the same
31
+ :mod:`.contract` payload and return the same widget structure. The pair
32
+ is pinned by a parity test rather than by good intentions — see
33
+ ``tests/test_dashboards.py``.
34
+ """
35
+
36
+ from .contract import ( # noqa: F401
37
+ CONTRACT_VERSION,
38
+ CaseAttribute,
39
+ FactTable,
40
+ NumericBin,
41
+ build_fact_table,
42
+ )
43
+ from .catalog import ( # noqa: F401
44
+ CATALOG,
45
+ BY_ID,
46
+ MetricSpec,
47
+ Param,
48
+ catalog_json,
49
+ )
50
+ from .view import ( # noqa: F401
51
+ bundle_script,
52
+ dashboard_html,
53
+ write_dashboard,
54
+ )
55
+ from .formula import ( # noqa: F401
56
+ FUNCTIONS,
57
+ FormulaError,
58
+ compile_formula,
59
+ parse as parse_formula,
60
+ result_type,
61
+ )
62
+ from .engine import ( # noqa: F401
63
+ AGGS,
64
+ STATE_UI,
65
+ aggregate,
66
+ apply_filters,
67
+ compute_widget,
68
+ fmt,
69
+ per_case_values,
70
+ predicate_case_ids,
71
+ scorecard,
72
+ segment_axes,
73
+ segment_keys,
74
+ series_values,
75
+ target_state,
76
+ worst_state,
77
+ )