sampling-mining-workflows-dsl 0.0.1__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 (79) hide show
  1. sampling_mining_workflows_dsl/ __init__.py +0 -0
  2. sampling_mining_workflows_dsl/CompleteWorkflow.py +23 -0
  3. sampling_mining_workflows_dsl/Workflow.py +242 -0
  4. sampling_mining_workflows_dsl/WorkflowBuilder.py +11 -0
  5. sampling_mining_workflows_dsl/analysis/ChiSquareAnalysis.py +37 -0
  6. sampling_mining_workflows_dsl/analysis/CochranTest.py +44 -0
  7. sampling_mining_workflows_dsl/analysis/CochranWorkflowAnalysis.py +37 -0
  8. sampling_mining_workflows_dsl/analysis/CoverageTest.py +60 -0
  9. sampling_mining_workflows_dsl/analysis/DistributionWorkflowAnalysis.py +57 -0
  10. sampling_mining_workflows_dsl/analysis/HistAnalysis.py +201 -0
  11. sampling_mining_workflows_dsl/analysis/HistWorkflowAnalysis.py +72 -0
  12. sampling_mining_workflows_dsl/analysis/KSWorkflowAnalysis.py +217 -0
  13. sampling_mining_workflows_dsl/analysis/WorkflowAnalysis.py +7 -0
  14. sampling_mining_workflows_dsl/analysis/YamaneTest.py +16 -0
  15. sampling_mining_workflows_dsl/analysis/YamaneWorkflowAnalysis.py +27 -0
  16. sampling_mining_workflows_dsl/analysis/kolmogorov_smirnov.py +31 -0
  17. sampling_mining_workflows_dsl/constraint/BoolComparator.py +23 -0
  18. sampling_mining_workflows_dsl/constraint/BoolConstraint.py +50 -0
  19. sampling_mining_workflows_dsl/constraint/BoolConstraintString.py +66 -0
  20. sampling_mining_workflows_dsl/constraint/Comparator.py +16 -0
  21. sampling_mining_workflows_dsl/constraint/Constraint.py +23 -0
  22. sampling_mining_workflows_dsl/constraint/NaturalComparator.py +17 -0
  23. sampling_mining_workflows_dsl/element/Element.py +45 -0
  24. sampling_mining_workflows_dsl/element/Loader.py +17 -0
  25. sampling_mining_workflows_dsl/element/Repository.py +28 -0
  26. sampling_mining_workflows_dsl/element/Set.py +210 -0
  27. sampling_mining_workflows_dsl/element/Writer.py +9 -0
  28. sampling_mining_workflows_dsl/element/loader/CsvLoader.py +67 -0
  29. sampling_mining_workflows_dsl/element/loader/JsonLoader.py +84 -0
  30. sampling_mining_workflows_dsl/element/loader/LoaderFactory.py +14 -0
  31. sampling_mining_workflows_dsl/element/writer/CsvWriter.py +46 -0
  32. sampling_mining_workflows_dsl/element/writer/JsonWriter.py +58 -0
  33. sampling_mining_workflows_dsl/element/writer/WriterFactory.py +7 -0
  34. sampling_mining_workflows_dsl/exec_visualizer/WorkflowVisualizer.py +189 -0
  35. sampling_mining_workflows_dsl/github_seart/loader.py +17 -0
  36. sampling_mining_workflows_dsl/github_seart/metadata.py +106 -0
  37. sampling_mining_workflows_dsl/metadata/Metadata.py +117 -0
  38. sampling_mining_workflows_dsl/metadata/MetadataBoolean.py +14 -0
  39. sampling_mining_workflows_dsl/metadata/MetadataDate.py +75 -0
  40. sampling_mining_workflows_dsl/metadata/MetadataDict.py +33 -0
  41. sampling_mining_workflows_dsl/metadata/MetadataList.py +32 -0
  42. sampling_mining_workflows_dsl/metadata/MetadataNumber.py +29 -0
  43. sampling_mining_workflows_dsl/metadata/MetadataString.py +13 -0
  44. sampling_mining_workflows_dsl/metadata/MetadataValue.py +24 -0
  45. sampling_mining_workflows_dsl/operator/Operator.py +165 -0
  46. sampling_mining_workflows_dsl/operator/OperatorBuilder.py +191 -0
  47. sampling_mining_workflows_dsl/operator/OperatorFactory.py +76 -0
  48. sampling_mining_workflows_dsl/operator/clustering/GroupingOperator.py +36 -0
  49. sampling_mining_workflows_dsl/operator/clustering/SubWorkflowOperatorBuilder.py +76 -0
  50. sampling_mining_workflows_dsl/operator/selection/SelectionOperator.py +5 -0
  51. sampling_mining_workflows_dsl/operator/selection/filter/FilterOperator.py +30 -0
  52. sampling_mining_workflows_dsl/operator/selection/sampling/SamplingOperator.py +11 -0
  53. sampling_mining_workflows_dsl/operator/selection/sampling/automatic/AutomaticSamplingOperator.py +9 -0
  54. sampling_mining_workflows_dsl/operator/selection/sampling/automatic/RandomSelectionOperator.py +24 -0
  55. sampling_mining_workflows_dsl/operator/selection/sampling/automatic/RandomSelectionPartitionOperator.py +62 -0
  56. sampling_mining_workflows_dsl/operator/selection/sampling/automatic/SystematicRandomSelectionOperator.py +14 -0
  57. sampling_mining_workflows_dsl/operator/selection/sampling/automatic/SystematicSelectionOperator.py +31 -0
  58. sampling_mining_workflows_dsl/operator/selection/sampling/manual/InteractiveManualSamplingOperator.py +40 -0
  59. sampling_mining_workflows_dsl/operator/selection/sampling/manual/ManualSamplingOperator.py +28 -0
  60. sampling_mining_workflows_dsl/operator/set_algebra/ExternalSetOperator.py +33 -0
  61. sampling_mining_workflows_dsl/operator/set_algebra/InternalSetOperator.py +47 -0
  62. sampling_mining_workflows_dsl/operator/set_algebra/SetOperator.py +30 -0
  63. sampling_mining_workflows_dsl/operator/set_algebra/external_set_operator/DifferenceOperator.py +17 -0
  64. sampling_mining_workflows_dsl/operator/set_algebra/external_set_operator/IntersectionOperator.py +19 -0
  65. sampling_mining_workflows_dsl/operator/set_algebra/external_set_operator/UnionOperator.py +17 -0
  66. sampling_mining_workflows_dsl/operator/set_algebra/internal_set_operator/DifferenceOperator.py +17 -0
  67. sampling_mining_workflows_dsl/operator/set_algebra/internal_set_operator/IntersectionOperator.py +18 -0
  68. sampling_mining_workflows_dsl/operator/set_algebra/internal_set_operator/UnionOperator.py +17 -0
  69. sampling_mining_workflows_dsl/operator/set_algebra/set_operator/DifferenceOperator.py +15 -0
  70. sampling_mining_workflows_dsl/operator/set_algebra/set_operator/IntersectionOperator.py +18 -0
  71. sampling_mining_workflows_dsl/operator/set_algebra/set_operator/UnionOperator.py +17 -0
  72. sampling_mining_workflows_dsl/test/ __init__.py +0 -0
  73. sampling_mining_workflows_dsl/test/Workflow_simple.py +38 -0
  74. sampling_mining_workflows_dsl/test/input.json +401 -0
  75. sampling_mining_workflows_dsl/toolbox.py +42 -0
  76. sampling_mining_workflows_dsl-0.0.1.dist-info/METADATA +236 -0
  77. sampling_mining_workflows_dsl-0.0.1.dist-info/RECORD +79 -0
  78. sampling_mining_workflows_dsl-0.0.1.dist-info/WHEEL +4 -0
  79. sampling_mining_workflows_dsl-0.0.1.dist-info/licenses/LICENSE.txt +674 -0
@@ -0,0 +1,401 @@
1
+ [
2
+ {"id": "1",
3
+ "url": "https://github.com/user/repo1",
4
+ "commitNb": 3106,
5
+ "language": "C#"},
6
+ {"id": "2",
7
+ "url": "https://github.com/user/repo2",
8
+ "commitNb": 7162,
9
+ "language": "Ruby"},
10
+ {"id": "3",
11
+ "url": "https://github.com/user/repo3",
12
+ "commitNb": 8764,
13
+ "language": "Python"},
14
+ {"id": "4",
15
+ "url": "https://github.com/user/repo4",
16
+ "commitNb": 3990,
17
+ "language": "PHP"},
18
+ {"id": "5",
19
+ "url": "https://github.com/user/repo5",
20
+ "commitNb": 4573,
21
+ "language": "Python"},
22
+ {"id": "6",
23
+ "url": "https://github.com/user/repo6",
24
+ "commitNb": 9646,
25
+ "language": "C++"},
26
+ {"id": "7",
27
+ "url": "https://github.com/user/repo7",
28
+ "commitNb": 5301,
29
+ "language": "Python"},
30
+ {"id": "8",
31
+ "url": "https://github.com/user/repo8",
32
+ "commitNb": 2594,
33
+ "language": "JavaScript"},
34
+ {"id": "9",
35
+ "url": "https://github.com/user/repo9",
36
+ "commitNb": 6264,
37
+ "language": "Go"},
38
+ {"id": "10",
39
+ "url": "https://github.com/user/repo10",
40
+ "commitNb": 8409,
41
+ "language": "PHP"},
42
+ {"id": "11",
43
+ "url": "https://github.com/user/repo11",
44
+ "commitNb": 7250,
45
+ "language": "PHP"},
46
+ {"id": "12",
47
+ "url": "https://github.com/user/repo12",
48
+ "commitNb": 4266,
49
+ "language": "C++"},
50
+ {"id": "13",
51
+ "url": "https://github.com/user/repo13",
52
+ "commitNb": 5771,
53
+ "language": "C++"},
54
+ {"id": "14",
55
+ "url": "https://github.com/user/repo14",
56
+ "commitNb": 7086,
57
+ "language": "C#"},
58
+ {"id": "15",
59
+ "url": "https://github.com/user/repo15",
60
+ "commitNb": 619,
61
+ "language": "Ruby"},
62
+ {"id": "16",
63
+ "url": "https://github.com/user/repo16",
64
+ "commitNb": 6450,
65
+ "language": "Ruby"},
66
+ {"id": "17",
67
+ "url": "https://github.com/user/repo17",
68
+ "commitNb": 2885,
69
+ "language": "JAVA"},
70
+ {"id": "18",
71
+ "url": "https://github.com/user/repo18",
72
+ "commitNb": 5279,
73
+ "language": "Ruby"},
74
+ {"id": "19",
75
+ "url": "https://github.com/user/repo19",
76
+ "commitNb": 1502,
77
+ "language": "Ruby"},
78
+ {"id": "20",
79
+ "url": "https://github.com/user/repo20",
80
+ "commitNb": 8052,
81
+ "language": "JavaScript"},
82
+ {"id": "21",
83
+ "url": "https://github.com/user/repo21",
84
+ "commitNb": 3349,
85
+ "language": "C#"},
86
+ {"id": "22",
87
+ "url": "https://github.com/user/repo22",
88
+ "commitNb": 8068,
89
+ "language": "Go"},
90
+ {"id": "23",
91
+ "url": "https://github.com/user/repo23",
92
+ "commitNb": 9407,
93
+ "language": "JavaScript"},
94
+ {"id": "24",
95
+ "url": "https://github.com/user/repo24",
96
+ "commitNb": 5288,
97
+ "language": "C#"},
98
+ {"id": "25",
99
+ "url": "https://github.com/user/repo25",
100
+ "commitNb": 2139,
101
+ "language": "PHP"},
102
+ {"id": "26",
103
+ "url": "https://github.com/user/repo26",
104
+ "commitNb": 2700,
105
+ "language": "JavaScript"},
106
+ {"id": "27",
107
+ "url": "https://github.com/user/repo27",
108
+ "commitNb": 5138,
109
+ "language": "JAVA"},
110
+ {"id": "28",
111
+ "url": "https://github.com/user/repo28",
112
+ "commitNb": 7995,
113
+ "language": "Go"},
114
+ {"id": "29",
115
+ "url": "https://github.com/user/repo29",
116
+ "commitNb": 6355,
117
+ "language": "PHP"},
118
+ {"id": "30",
119
+ "url": "https://github.com/user/repo30",
120
+ "commitNb": 5613,
121
+ "language": "Go"},
122
+ {"id": "31",
123
+ "url": "https://github.com/user/repo31",
124
+ "commitNb": 8482,
125
+ "language": "Go"},
126
+ {"id": "32",
127
+ "url": "https://github.com/user/repo32",
128
+ "commitNb": 3525,
129
+ "language": "JavaScript"},
130
+ {"id": "33",
131
+ "url": "https://github.com/user/repo33",
132
+ "commitNb": 13,
133
+ "language": "JAVA"},
134
+ {"id": "34",
135
+ "url": "https://github.com/user/repo34",
136
+ "commitNb": 9692,
137
+ "language": "C#"},
138
+ {"id": "35",
139
+ "url": "https://github.com/user/repo35",
140
+ "commitNb": 8982,
141
+ "language": "Python"},
142
+ {"id": "36",
143
+ "url": "https://github.com/user/repo36",
144
+ "commitNb": 2846,
145
+ "language": "JAVA"},
146
+ {"id": "37",
147
+ "url": "https://github.com/user/repo37",
148
+ "commitNb": 644,
149
+ "language": "Python"},
150
+ {"id": "38",
151
+ "url": "https://github.com/user/repo38",
152
+ "commitNb": 4107,
153
+ "language": "Python"},
154
+ {"id": "39",
155
+ "url": "https://github.com/user/repo39",
156
+ "commitNb": 2100,
157
+ "language": "Go"},
158
+ {"id": "40",
159
+ "url": "https://github.com/user/repo40",
160
+ "commitNb": 9951,
161
+ "language": "Go"},
162
+ {"id": "41",
163
+ "url": "https://github.com/user/repo41",
164
+ "commitNb": 8932,
165
+ "language": "Go"},
166
+ {"id": "42",
167
+ "url": "https://github.com/user/repo42",
168
+ "commitNb": 5977,
169
+ "language": "Go"},
170
+ {"id": "43",
171
+ "url": "https://github.com/user/repo43",
172
+ "commitNb": 7116,
173
+ "language": "Python"},
174
+ {"id": "44",
175
+ "url": "https://github.com/user/repo44",
176
+ "commitNb": 4999,
177
+ "language": "Python"},
178
+ {"id": "45",
179
+ "url": "https://github.com/user/repo45",
180
+ "commitNb": 3444,
181
+ "language": "Python"},
182
+ {"id": "46",
183
+ "url": "https://github.com/user/repo46",
184
+ "commitNb": 3292,
185
+ "language": "C++"},
186
+ {"id": "47",
187
+ "url": "https://github.com/user/repo47",
188
+ "commitNb": 6920,
189
+ "language": "Go"},
190
+ {"id": "48",
191
+ "url": "https://github.com/user/repo48",
192
+ "commitNb": 1622,
193
+ "language": "C++"},
194
+ {"id": "49",
195
+ "url": "https://github.com/user/repo49",
196
+ "commitNb": 5549,
197
+ "language": "JavaScript"},
198
+ {"id": "50",
199
+ "url": "https://github.com/user/repo50",
200
+ "commitNb": 9495,
201
+ "language": "C++"},
202
+ {"id": "51",
203
+ "url": "https://github.com/user/repo51",
204
+ "commitNb": 2266,
205
+ "language": "C++"},
206
+ {"id": "52",
207
+ "url": "https://github.com/user/repo52",
208
+ "commitNb": 5813,
209
+ "language": "Go"},
210
+ {"id": "53",
211
+ "url": "https://github.com/user/repo53",
212
+ "commitNb": 3747,
213
+ "language": "Python"},
214
+ {"id": "54",
215
+ "url": "https://github.com/user/repo54",
216
+ "commitNb": 9083,
217
+ "language": "JAVA"},
218
+ {"id": "55",
219
+ "url": "https://github.com/user/repo55",
220
+ "commitNb": 2236,
221
+ "language": "Python"},
222
+ {"id": "56",
223
+ "url": "https://github.com/user/repo56",
224
+ "commitNb": 9220,
225
+ "language": "PHP"},
226
+ {"id": "57",
227
+ "url": "https://github.com/user/repo57",
228
+ "commitNb": 2786,
229
+ "language": "Ruby"},
230
+ {"id": "58",
231
+ "url": "https://github.com/user/repo58",
232
+ "commitNb": 5720,
233
+ "language": "JavaScript"},
234
+ {"id": "59",
235
+ "url": "https://github.com/user/repo59",
236
+ "commitNb": 5743,
237
+ "language": "PHP"},
238
+ {"id": "60",
239
+ "url": "https://github.com/user/repo60",
240
+ "commitNb": 6317,
241
+ "language": "C#"},
242
+ {"id": "61",
243
+ "url": "https://github.com/user/repo61",
244
+ "commitNb": 631,
245
+ "language": "C++"},
246
+ {"id": "62",
247
+ "url": "https://github.com/user/repo62",
248
+ "commitNb": 1436,
249
+ "language": "JavaScript"},
250
+ {"id": "63",
251
+ "url": "https://github.com/user/repo63",
252
+ "commitNb": 6118,
253
+ "language": "C++"},
254
+ {"id": "64",
255
+ "url": "https://github.com/user/repo64",
256
+ "commitNb": 6124,
257
+ "language": "PHP"},
258
+ {"id": "65",
259
+ "url": "https://github.com/user/repo65",
260
+ "commitNb": 4839,
261
+ "language": "Go"},
262
+ {"id": "66",
263
+ "url": "https://github.com/user/repo66",
264
+ "commitNb": 9043,
265
+ "language": "Python"},
266
+ {"id": "67",
267
+ "url": "https://github.com/user/repo67",
268
+ "commitNb": 6498,
269
+ "language": "C#"},
270
+ {"id": "68",
271
+ "url": "https://github.com/user/repo68",
272
+ "commitNb": 4579,
273
+ "language": "PHP"},
274
+ {"id": "69",
275
+ "url": "https://github.com/user/repo69",
276
+ "commitNb": 1455,
277
+ "language": "JavaScript"},
278
+ {"id": "70",
279
+ "url": "https://github.com/user/repo70",
280
+ "commitNb": 1612,
281
+ "language": "Ruby"},
282
+ {"id": "71",
283
+ "url": "https://github.com/user/repo71",
284
+ "commitNb": 811,
285
+ "language": "C#"},
286
+ {"id": "72",
287
+ "url": "https://github.com/user/repo72",
288
+ "commitNb": 8100,
289
+ "language": "C#"},
290
+ {"id":"73",
291
+ "url": "https://github.com/user/repo73",
292
+ "commitNb": 4979,
293
+ "language": "JavaScript"},
294
+ {"id": "74",
295
+ "url": "https://github.com/user/repo74",
296
+ "commitNb": 5236,
297
+ "language": "PHP"},
298
+ {"id": "75",
299
+ "url": "https://github.com/user/repo75",
300
+ "commitNb": 329,
301
+ "language": "C++"},
302
+ {"id": "76",
303
+ "url": "https://github.com/user/repo76",
304
+ "commitNb": 4835,
305
+ "language": "PHP"},
306
+ {"id": "77",
307
+ "url": "https://github.com/user/repo77",
308
+ "commitNb": 8224,
309
+ "language": "C++"},
310
+ {"id": "78",
311
+ "url": "https://github.com/user/repo78",
312
+ "commitNb": 9351,
313
+ "language": "JAVA"},
314
+ {"id": "79",
315
+ "url": "https://github.com/user/repo79",
316
+ "commitNb": 2057,
317
+ "language": "Go"},
318
+ {"id": "80",
319
+ "url": "https://github.com/user/repo80",
320
+ "commitNb": 3374,
321
+ "language": "JavaScript"},
322
+ {"id": "81",
323
+ "url": "https://github.com/user/repo81",
324
+ "commitNb": 4510,
325
+ "language": "Python"},
326
+ {"id": "82",
327
+ "url": "https://github.com/user/repo82",
328
+ "commitNb": 2173,
329
+ "language": "Python"},
330
+ {"id": "83",
331
+ "url": "https://github.com/user/repo83",
332
+ "commitNb": 5422,
333
+ "language": "JAVA"},
334
+ {"id": "84",
335
+ "url": "https://github.com/user/repo84",
336
+ "commitNb": 2890,
337
+ "language": "JavaScript"},
338
+ {"id": "85",
339
+ "url": "https://github.com/user/repo85",
340
+ "commitNb": 8573,
341
+ "language": "Go"},
342
+ {"id": "86",
343
+ "url": "https://github.com/user/repo86",
344
+ "commitNb": 1291,
345
+ "language": "C++"},
346
+ {"id": "87",
347
+ "url": "https://github.com/user/repo87",
348
+ "commitNb": 4266,
349
+ "language": "PHP"},
350
+ {"id": "88",
351
+ "url": "https://github.com/user/repo88",
352
+ "commitNb": 4237,
353
+ "language": "JavaScript"},
354
+ {"id": "89",
355
+ "url": "https://github.com/user/repo89",
356
+ "commitNb": 5505,
357
+ "language": "PHP"},
358
+ {"id": "90",
359
+ "url": "https://github.com/user/repo90",
360
+ "commitNb": 5962,
361
+ "language": "JavaScript"},
362
+ {"id": "91",
363
+ "url": "https://github.com/user/repo91",
364
+ "commitNb": 6689,
365
+ "language": "PHP"},
366
+ {"id": "92",
367
+ "url": "https://github.com/user/repo92",
368
+ "commitNb": 3520,
369
+ "language": "Python"},
370
+ {"id": "93",
371
+ "url": "https://github.com/user/repo93",
372
+ "commitNb": 9591,
373
+ "language": "Go"},
374
+ {"id": "94",
375
+ "url": "https://github.com/user/repo94",
376
+ "commitNb": 4732,
377
+ "language": "JAVA"},
378
+ {"id": "95",
379
+ "url": "https://github.com/user/repo95",
380
+ "commitNb": 2025,
381
+ "language": "C++"},
382
+ {"id": "96",
383
+ "url": "https://github.com/user/repo96",
384
+ "commitNb": 2431,
385
+ "language": "Python"},
386
+ {"id": "97",
387
+ "url": "https://github.com/user/repo97",
388
+ "commitNb": 5700,
389
+ "language": "PHP"},
390
+ {"id": "98",
391
+ "url": "https://github.com/user/repo98",
392
+ "commitNb": 1672,
393
+ "language": "C#"},
394
+ {"id": "99",
395
+ "url": "https://github.com/user/repo99",
396
+ "commitNb": 3007,
397
+ "language": "PHP"},
398
+ {"id": "100",
399
+ "url": "https://github.com/user/repo100",
400
+ "commitNb": 6880,
401
+ "language": "JavaScript"}]
@@ -0,0 +1,42 @@
1
+ import ast
2
+
3
+
4
+ def get_variable_names(code_str):
5
+ tree = ast.parse(code_str)
6
+ variable_names = set()
7
+
8
+ class VariableVisitor(ast.NodeVisitor):
9
+ def visit_Name(self, node):
10
+ if isinstance(node.ctx, ast.Store): # Variable being assigned
11
+ variable_names.add(node.id)
12
+ self.generic_visit(node)
13
+
14
+ def visit_arg(self, node): # Function arguments
15
+ variable_names.add(node.arg)
16
+
17
+ def visit_FunctionDef(self, node): # Also visit function arguments
18
+ for arg in node.args.args:
19
+ variable_names.add(arg.arg)
20
+ self.generic_visit(node)
21
+
22
+ def visit_For(self, node): # For loop target
23
+ self.visit(node.target)
24
+ self.generic_visit(node)
25
+
26
+ VariableVisitor().visit(tree)
27
+ return variable_names
28
+
29
+
30
+ def setup_logging(log_file="app.log", level="DEBUG"):
31
+ import logging
32
+
33
+ numeric_level = getattr(logging, level.upper(), None)
34
+ if not isinstance(numeric_level, int):
35
+ raise ValueError(f"Invalid log level: {level}")
36
+
37
+ logging.basicConfig(
38
+ level=numeric_level,
39
+ format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
40
+ filename=log_file,
41
+ filemode="a", # Append to file (use "w" to overwrite each run)
42
+ )
@@ -0,0 +1,236 @@
1
+ Metadata-Version: 2.4
2
+ Name: sampling-mining-workflows-dsl
3
+ Version: 0.0.1
4
+ Summary: A python internal DSL to specify, execute and analyse mining software repositories sampling workflows.
5
+ Author: Maïwenn Le Goasteller
6
+ Author-email: Romain Lefeuvre <contact@romainlefeuvre.com>
7
+ License-File: LICENSE.txt
8
+ Requires-Python: >=3.13
9
+ Requires-Dist: graphviz>=0.21
10
+ Requires-Dist: matplotlib>=3.10.6
11
+ Requires-Dist: pandas>=2.3.2
12
+ Requires-Dist: python-dateutil>=2.9.0
13
+ Requires-Dist: requests>=2.32.5
14
+ Requires-Dist: scipy>=1.16.2
15
+ Requires-Dist: tqdm>=4.66.4
16
+ Description-Content-Type: text/markdown
17
+
18
+ <a id="readme-top"></a>
19
+
20
+ [![Contributors][contributors-shield]][contributors-url]
21
+ [![Forks][forks-shield]][forks-url]
22
+ [![Stargazers][stars-shield]][stars-url]
23
+ [![Issues][issues-shield]][issues-url]
24
+ [![project_license][license-shield]][license-url]
25
+
26
+
27
+
28
+ <!-- PROJECT LOGO -->
29
+ <br />
30
+ <div align="center">
31
+ <a href="https://github.com/RomainLefeuvre/SamplingMiningWorflowDSL">
32
+ <img src=".logo.png" alt="Logo" width="300" height="300">
33
+ </a>
34
+ </div>
35
+
36
+
37
+
38
+ <!-- TABLE OF CONTENTS -->
39
+ <details>
40
+ <summary>Table of Contents</summary>
41
+ <ol>
42
+ <li>
43
+ <a href="#about-the-repository">About The Repository</a>
44
+ <ul>
45
+ <li><a href="#project-structure">Project Structure</a></li>
46
+ <li><a href="#key-features">Key Features</a></li>
47
+ </ul>
48
+ </li>
49
+ <li>
50
+ <a href="#getting-started">Getting Started</a>
51
+ <ul>
52
+ <li><a href="#prerequisites">Prerequisites</a></li>
53
+ <li><a href="#installation">Installation</a></li>
54
+ <li><a href="#template-repository">Template Repository</a></li>
55
+ </ul>
56
+ </li>
57
+ <li><a href="#usage">Usage</a></li>
58
+ <li><a href="#license">License</a></li>
59
+ </ol>
60
+ </details>
61
+
62
+
63
+
64
+ ## About The Repository
65
+
66
+ This repository provides a Python internal DSL (Domain Specific Language) to model sampling workflows for MSR (Mining Software Repositories) studies. The DSL offers a structured and intuitive approach to define, execute, and analyze complex data sampling and processing workflows commonly used in software engineering research.
67
+
68
+ ### Project Structure
69
+
70
+ ```
71
+ PythonWorkflowDSL/
72
+ ├── pyproject.toml # Python package configuration
73
+ ├── README.md # Project documentation
74
+ └── src/
75
+ └── sampling_mining_workflows_dsl/ # Main DSL package
76
+ ├── __init__.py # Package initialization
77
+ ├── CompleteWorkflow.py # Complete workflow implementation
78
+ ├── toolbox.py # Utility functions and tools
79
+ ├── Workflow.py # Core workflow class
80
+ ├── WorkflowBuilder.py # Builder pattern for workflows
81
+ ├── analysis/ # Statistical analysis modules
82
+ │ └── ... # Chi-square, coverage, distribution analysis
83
+ ├── constraint/ # Constraint system
84
+ │ └── ... # Boolean constraints and comparators
85
+ ├── element/ # Data element management
86
+ │ ├── loader/ # Data loader implementations
87
+ │ └── writer/ # Data writer implementations
88
+ ├── exec_visualizer/ # Execution visualization
89
+ │ └── ... # Local server and visualization tools
90
+ ├── github_seart/ # GitHub SEART integration
91
+ │ └── ... # SEART data loader and metadata
92
+ ├── metadata/ # Metadata system
93
+ │ └── ... # Boolean, date, string metadata types
94
+ ├── operator/ # Workflow operators
95
+ │ ├── clustering/ # Clustering operators
96
+ │ ├── selection/ # Selection operators (filter/sampling)
97
+ │ └── set_algebra/ # Set algebra operations
98
+ └── test/ # Test files and examples
99
+ └── ... # JSON test data and workflow examples
100
+ ```
101
+
102
+
103
+
104
+ ## Getting Started
105
+
106
+ ### Prerequisites
107
+
108
+ Before using this DSL, ensure you have Python 3.8+ installed on your system.
109
+
110
+ Recommended: install and use [`uv`](https://github.com/astral-sh/uv)
111
+
112
+ ### Starting from scratch
113
+
114
+ 1. ```uv init```
115
+ 2. ```uv pip install https://github.com/RomainLefeuvre/samplingMiningWorkflowDSL.git```
116
+ ### Template Repository
117
+
118
+ A complete template with examples is available at:
119
+ ```
120
+ git@github.com:RomainLefeuvre/msr_papers_sampling_workflows.git
121
+ ```
122
+
123
+ Clone the template to get started quickly:
124
+ ```bash
125
+ git clone https://github.com/RomainLefeuvre/SamplinMiningWorkflowDSLTemplate.git
126
+ ```
127
+
128
+
129
+ ### Dev environment installation
130
+ If you want to contribute to this repository, you can clone and setup locally this project :
131
+
132
+ 1. Clone this repository:
133
+ ```bash
134
+ git clone https://github.com/RomainLefeuvre/SamplingMiningWorflowDSL.git
135
+ cd SamplingMiningWorflowDSL
136
+ ```
137
+
138
+ 2. (Recommended) Install dependencies with `uv`:
139
+ ```bash
140
+ uv sync
141
+ ```
142
+
143
+ 3. Activate the virtual environment created by `uv`:
144
+ ```bash
145
+ source .venv/bin/activate
146
+ ```
147
+
148
+
149
+
150
+
151
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
152
+
153
+
154
+
155
+ ## Usage
156
+
157
+ ### Basic Workflow Example
158
+
159
+ ```python
160
+ from sampling_mining_workflows_dsl.WorkflowBuilder import WorkflowBuilder
161
+ from sampling_mining_workflows_dsl.element.loader.LoaderFactory import LoaderFactory
162
+ from sampling_mining_workflows_dsl.element.writer.WriterFactory import WritterFactory
163
+ from sampling_mining_workflows_dsl.metadata.Metadata import Metadata
164
+
165
+ # Define metadata for your data
166
+ id_metadata = Metadata.of_string("id")
167
+ language_metadata = Metadata.of_string("language")
168
+ commit_count_metadata = Metadata.of_integer("commitNb")
169
+
170
+ # Create loaders and writers
171
+ json_loader = LoaderFactory.json_loader
172
+ json_writer = WritterFactory.json_writer
173
+
174
+ # Create a basic sampling workflow
175
+ workflow = (
176
+ WorkflowBuilder()
177
+ .input(json_loader("input_data.json", id_metadata, commit_count_metadata, language_metadata))
178
+ .filter_operator("commitNb > 1000")
179
+ .random_selection_operator(50)
180
+ .output(json_writer("output_data.json"))
181
+ )
182
+
183
+ # Execute the workflow
184
+ results = workflow.execute_workflow()
185
+ ```
186
+
187
+ <!-- LICENSE -->
188
+ ## License
189
+
190
+ Distributed under the GNU General Public License v3.0. See `LICENSE` for more information.
191
+
192
+ This program 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.
193
+
194
+ 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 General Public License for more details.
195
+
196
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
197
+
198
+
199
+
200
+
201
+
202
+
203
+
204
+
205
+
206
+ <!-- MARKDOWN LINKS & IMAGES -->
207
+ <!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->
208
+ [contributors-shield]: https://img.shields.io/github/contributors/RomainLefeuvre/SamplingMiningWorflowDSL.svg?style=for-the-badge
209
+ [contributors-url]: https://github.com/RomainLefeuvre/SamplingMiningWorflowDSL/graphs/contributors
210
+ [forks-shield]: https://img.shields.io/github/forks/RomainLefeuvre/SamplingMiningWorflowDSL.svg?style=for-the-badge
211
+ [forks-url]: https://github.com/RomainLefeuvre/SamplingMiningWorflowDSL/network/members
212
+ [stars-shield]: https://img.shields.io/github/stars/RomainLefeuvre/SamplingMiningWorflowDSL.svg?style=for-the-badge
213
+ [stars-url]: https://github.com/RomainLefeuvre/SamplingMiningWorflowDSL/stargazers
214
+ [issues-shield]: https://img.shields.io/github/issues/RomainLefeuvre/SamplingMiningWorflowDSL.svg?style=for-the-badge
215
+ [issues-url]: https://github.com/RomainLefeuvre/SamplingMiningWorflowDSL/issues
216
+ [license-shield]: https://img.shields.io/github/license/RomainLefeuvre/SamplingMiningWorflowDSL.svg?style=for-the-badge
217
+ [license-url]: https://github.com/RomainLefeuvre/SamplingMiningWorflowDSL/blob/master/LICENSE.txt
218
+ [linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge&logo=linkedin&colorB=555
219
+ [linkedin-url]: https://linkedin.com/in/linkedin_username
220
+ [product-screenshot]: images/screenshot.png
221
+ [Next.js]: https://img.shields.io/badge/next.js-000000?style=for-the-badge&logo=nextdotjs&logoColor=white
222
+ [Next-url]: https://nextjs.org/
223
+ [React.js]: https://img.shields.io/badge/React-20232A?style=for-the-badge&logo=react&logoColor=61DAFB
224
+ [React-url]: https://reactjs.org/
225
+ [Vue.js]: https://img.shields.io/badge/Vue.js-35495E?style=for-the-badge&logo=vuedotjs&logoColor=4FC08D
226
+ [Vue-url]: https://vuejs.org/
227
+ [Angular.io]: https://img.shields.io/badge/Angular-DD0031?style=for-the-badge&logo=angular&logoColor=white
228
+ [Angular-url]: https://angular.io/
229
+ [Svelte.dev]: https://img.shields.io/badge/Svelte-4A4A55?style=for-the-badge&logo=svelte&logoColor=FF3E00
230
+ [Svelte-url]: https://svelte.dev/
231
+ [Laravel.com]: https://img.shields.io/badge/Laravel-FF2D20?style=for-the-badge&logo=laravel&logoColor=white
232
+ [Laravel-url]: https://laravel.com
233
+ [Bootstrap.com]: https://img.shields.io/badge/Bootstrap-563D7C?style=for-the-badge&logo=bootstrap&logoColor=white
234
+ [Bootstrap-url]: https://getbootstrap.com
235
+ [JQuery.com]: https://img.shields.io/badge/jQuery-0769AD?style=for-the-badge&logo=jquery&logoColor=white
236
+ [JQuery-url]: https://jquery.com