gool 1.3.0__tar.gz → 1.3.2__tar.gz

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 (50) hide show
  1. {gool-1.3.0 → gool-1.3.2}/.gitlab-ci.yml +34 -0
  2. gool-1.3.2/.vscode/extensions.json +9 -0
  3. {gool-1.3.0 → gool-1.3.2}/Makefile +1 -1
  4. {gool-1.3.0 → gool-1.3.2}/PKG-INFO +6 -6
  5. {gool-1.3.0 → gool-1.3.2}/README.md +4 -4
  6. {gool-1.3.0 → gool-1.3.2}/mkdocs.yml +1 -0
  7. {gool-1.3.0 → gool-1.3.2}/pyproject.toml +1 -1
  8. {gool-1.3.0 → gool-1.3.2}/src/gool/_version.py +2 -2
  9. {gool-1.3.0 → gool-1.3.2}/src/gool/log_clustering.py +13 -13
  10. {gool-1.3.0 → gool-1.3.2}/src/gool/logs_miner.py +3 -3
  11. {gool-1.3.0 → gool-1.3.2}/tests/data/results/Apache_2K_baseline_compare.txt +2 -2
  12. {gool-1.3.0 → gool-1.3.2}/tests/data/results/Apache_2K_baseline_compare_common.txt +2 -2
  13. {gool-1.3.0 → gool-1.3.2}/.gitignore +0 -0
  14. {gool-1.3.0 → gool-1.3.2}/.pre-commit-config.yaml +0 -0
  15. {gool-1.3.0 → gool-1.3.2}/.vscode/launch.json +0 -0
  16. {gool-1.3.0 → gool-1.3.2}/.vscode/settings.json +0 -0
  17. {gool-1.3.0 → gool-1.3.2}/.vscode/tasks.json +0 -0
  18. {gool-1.3.0 → gool-1.3.2}/LICENSE +0 -0
  19. {gool-1.3.0 → gool-1.3.2}/docs/api/arguments_parser.md +0 -0
  20. {gool-1.3.0 → gool-1.3.2}/docs/api/log_clustering.md +0 -0
  21. {gool-1.3.0 → gool-1.3.2}/docs/api/logs_miner.md +0 -0
  22. {gool-1.3.0 → gool-1.3.2}/docs/index.md +0 -0
  23. {gool-1.3.0 → gool-1.3.2}/docs/license.md +0 -0
  24. {gool-1.3.0 → gool-1.3.2}/misc/Dockerfile +0 -0
  25. {gool-1.3.0 → gool-1.3.2}/sonar-project.properties +0 -0
  26. {gool-1.3.0 → gool-1.3.2}/src/gool/__init__.py +0 -0
  27. {gool-1.3.0 → gool-1.3.2}/src/gool/arguments_parser.py +0 -0
  28. {gool-1.3.0 → gool-1.3.2}/src/gool/drain3.ini +0 -0
  29. {gool-1.3.0 → gool-1.3.2}/src/gool/error_code.py +0 -0
  30. {gool-1.3.0 → gool-1.3.2}/tests/data/drain3.ini +0 -0
  31. {gool-1.3.0 → gool-1.3.2}/tests/data/drain3_compare_baseline.ini +0 -0
  32. {gool-1.3.0 → gool-1.3.2}/tests/data/log/Apache_2k.log +0 -0
  33. {gool-1.3.0 → gool-1.3.2}/tests/data/log/Apache_2k_MonDec05.log +0 -0
  34. {gool-1.3.0 → gool-1.3.2}/tests/data/log/Apache_2k_SunDec04.log +0 -0
  35. {gool-1.3.0 → gool-1.3.2}/tests/data/log/Zookeeper_2k.log +0 -0
  36. {gool-1.3.0 → gool-1.3.2}/tests/data/log/Zookeeper_unordered.log +0 -0
  37. {gool-1.3.0 → gool-1.3.2}/tests/data/log/empty.log +0 -0
  38. {gool-1.3.0 → gool-1.3.2}/tests/data/results/6times_Zookeeper_2k_raw_output.txt +0 -0
  39. {gool-1.3.0 → gool-1.3.2}/tests/data/results/Apache_2k_raw_output.txt +0 -0
  40. {gool-1.3.0 → gool-1.3.2}/tests/data/results/Apache_2k_time_filter.txt +0 -0
  41. {gool-1.3.0 → gool-1.3.2}/tests/data/results/Zookeeper_2k_depth10.txt +0 -0
  42. {gool-1.3.0 → gool-1.3.2}/tests/data/results/Zookeeper_2k_lex_order.txt +0 -0
  43. {gool-1.3.0 → gool-1.3.2}/tests/data/results/Zookeeper_2k_raw_output.txt +0 -0
  44. {gool-1.3.0 → gool-1.3.2}/tests/data/results/Zookeeper_2k_sim_thres_5.txt +0 -0
  45. {gool-1.3.0 → gool-1.3.2}/tests/data/results/Zookeeper_2k_size_order.txt +0 -0
  46. {gool-1.3.0 → gool-1.3.2}/tests/data/results/Zookeeper_2k_warn.txt +0 -0
  47. {gool-1.3.0 → gool-1.3.2}/tests/data/results/Zookeeper_unordered.txt +0 -0
  48. {gool-1.3.0 → gool-1.3.2}/tests/test_gool.py +0 -0
  49. {gool-1.3.0 → gool-1.3.2}/tests/test_logs_miner.py +0 -0
  50. {gool-1.3.0 → gool-1.3.2}/uv.lock +0 -0
@@ -2,6 +2,7 @@ workflow:
2
2
  rules:
3
3
  - if: $CI_PIPELINE_SOURCE == "merge_request_event"
4
4
  - if: $CI_COMMIT_BRANCH == "main"
5
+ - if: $CI_COMMIT_TAG
5
6
 
6
7
  image: registry.gitlab.com/godardo/gool:2.0.0
7
8
 
@@ -14,6 +15,7 @@ stages:
14
15
  - check
15
16
  - build
16
17
  - static_analysis
18
+ - release
17
19
 
18
20
  check_all:
19
21
  stage: check
@@ -76,3 +78,35 @@ sonarcloud-check:
76
78
  # sonar new baseline if the new tag
77
79
  - sonar-scanner -Dsonar.projectVersion="$LATEST_TAG-next"
78
80
  allow_failure: false
81
+
82
+ release_pypi:
83
+ stage: release
84
+ rules:
85
+ - if: $CI_COMMIT_TAG
86
+ script:
87
+ - make build-and-publish
88
+ - make docs-test
89
+ pages:
90
+ #path_prefix: $CI_COMMIT_TAG #versioning only for premium gitlab
91
+ publish: build/doc
92
+
93
+ publish_release_gitlab:
94
+ stage: release
95
+ image: registry.gitlab.com/gitlab-org/release-cli:latest
96
+ needs:
97
+ - release_pypi
98
+ rules:
99
+ - if: $CI_COMMIT_TAG
100
+ script:
101
+ - echo "running gitlab release_job" # mandatory script
102
+ release:
103
+ name: 'Release $CI_COMMIT_TAG'
104
+ description: 'Auto generated gitlab release' # put patch note here
105
+ tag_name: '$CI_COMMIT_TAG'
106
+ ref: '$CI_COMMIT_SHA'
107
+ assets:
108
+ links:
109
+ - name: 'Release link'
110
+ url: 'https://pypi.org/project/gool/$CI_COMMIT_TAG'
111
+ - name: 'Documentation'
112
+ url: 'https://godardo.gitlab.io/gool/'
@@ -0,0 +1,9 @@
1
+ {
2
+ "recommendations": [
3
+ "sonarsource.sonarlint-vscode",
4
+ "charliermarsh.ruff",
5
+ "davidanson.vscode-markdownlint",
6
+ "ms-python.python",
7
+ "ms-python.debugpy"
8
+ ]
9
+ }
@@ -33,7 +33,7 @@ clean-build: ## Clean build artifacts
33
33
  .PHONY: publish
34
34
  publish: ## Publish a release to PyPI.
35
35
  @echo "🚀 Publishing."
36
- @uvx twine upload --repository-url https://upload.pypi.org/legacy/ dist/*
36
+ @uvx twine upload --repository-url https://upload.pypi.org/legacy/ dist/* --verbose
37
37
 
38
38
  .PHONY: build-and-publish
39
39
  build-and-publish: build publish ## Build and publish.
@@ -1,10 +1,10 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gool
3
- Version: 1.3.0
3
+ Version: 1.3.2
4
4
  Summary: cli logs clustering
5
5
  Project-URL: Homepage, https://gitlab.com/godardo/gool
6
6
  Project-URL: Repository, https://gitlab.com/godardo/gool
7
- Project-URL: Documentation, https://gitlab.com/godardo/gool
7
+ Project-URL: Documentation, https://godardo.gitlab.io/gool
8
8
  Author: Olivier GODARD
9
9
  License-File: LICENSE
10
10
  Keywords: python
@@ -192,7 +192,7 @@ Apache_2K_MonDec05.log ━━━━━━━━━━━━━━━━━━━
192
192
  23:04:06.391483 INFO log_clustering : Running baseline clustering. log_clustering.py:588
193
193
  23:04:06.406525 INFO logs_miner : Processed 1051 lines in 0.01 seconds (79220.32 lines/second). logs_miner.py:164
194
194
  Apache_2K_SunDec04.log ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100%
195
- Missing from baseline
195
+ Missing /baseline
196
196
  ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
197
197
  ┃ Template ┃
198
198
  ┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
@@ -200,7 +200,7 @@ Apache_2K_SunDec04.log ━━━━━━━━━━━━━━━━━━━
200
200
  │ [<TIME>] [notice] jk2 init() Found child <*> in scoreboard slot 11 │
201
201
  └─────────────────────────────────────────────────────────────────────┘
202
202
 
203
- Added from baseline
203
+ Added /baseline
204
204
  ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
205
205
  ┃ Template ┃
206
206
  ┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
@@ -284,7 +284,7 @@ Apache_2k.log ━━━━━━━━━━━━━━━━━━━━━━
284
284
  13:21:05.756522 INFO logs_miner : Loading configuration from /home/godardo/git/gool/tests/data/drain3_compare_baseline.ini logs_miner.py:29
285
285
  13:21:05.776119 INFO logs_miner : Processed 1051 lines in 0.02 seconds (59559.73 lines/second). logs_miner.py:213
286
286
  Apache_2k.log ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100%
287
- Missing from baseline
287
+ Missing /baseline
288
288
  ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
289
289
  ┃ Template ┃
290
290
  ┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
@@ -292,7 +292,7 @@ Apache_2k.log ━━━━━━━━━━━━━━━━━━━━━━
292
292
  │ [<TIME>] [notice] jk2 init() Found child <*> in scoreboard slot 11 │
293
293
  └─────────────────────────────────────────────────────────────────────┘
294
294
 
295
- Added from baseline
295
+ Added /baseline
296
296
  ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
297
297
  ┃ Template ┃
298
298
  ┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
@@ -167,7 +167,7 @@ Apache_2K_MonDec05.log ━━━━━━━━━━━━━━━━━━━
167
167
  23:04:06.391483 INFO log_clustering : Running baseline clustering. log_clustering.py:588
168
168
  23:04:06.406525 INFO logs_miner : Processed 1051 lines in 0.01 seconds (79220.32 lines/second). logs_miner.py:164
169
169
  Apache_2K_SunDec04.log ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100%
170
- Missing from baseline
170
+ Missing /baseline
171
171
  ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
172
172
  ┃ Template ┃
173
173
  ┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
@@ -175,7 +175,7 @@ Apache_2K_SunDec04.log ━━━━━━━━━━━━━━━━━━━
175
175
  │ [<TIME>] [notice] jk2 init() Found child <*> in scoreboard slot 11 │
176
176
  └─────────────────────────────────────────────────────────────────────┘
177
177
 
178
- Added from baseline
178
+ Added /baseline
179
179
  ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
180
180
  ┃ Template ┃
181
181
  ┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
@@ -259,7 +259,7 @@ Apache_2k.log ━━━━━━━━━━━━━━━━━━━━━━
259
259
  13:21:05.756522 INFO logs_miner : Loading configuration from /home/godardo/git/gool/tests/data/drain3_compare_baseline.ini logs_miner.py:29
260
260
  13:21:05.776119 INFO logs_miner : Processed 1051 lines in 0.02 seconds (59559.73 lines/second). logs_miner.py:213
261
261
  Apache_2k.log ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100%
262
- Missing from baseline
262
+ Missing /baseline
263
263
  ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
264
264
  ┃ Template ┃
265
265
  ┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
@@ -267,7 +267,7 @@ Apache_2k.log ━━━━━━━━━━━━━━━━━━━━━━
267
267
  │ [<TIME>] [notice] jk2 init() Found child <*> in scoreboard slot 11 │
268
268
  └─────────────────────────────────────────────────────────────────────┘
269
269
 
270
- Added from baseline
270
+ Added /baseline
271
271
  ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
272
272
  ┃ Template ┃
273
273
  ┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
@@ -6,6 +6,7 @@ site_author: Olivier GODARD
6
6
  edit_uri: edit/main/docs/
7
7
  repo_name: leCapi/gool
8
8
  copyright: Maintained by <a href="https://gitlab.com/godardo/gool">leCapi</a>.
9
+ site_dir: build/doc
9
10
 
10
11
  nav:
11
12
  - Home: index.md
@@ -29,7 +29,7 @@ gool = "gool.log_clustering:main_cli"
29
29
  [project.urls]
30
30
  Homepage = "https://gitlab.com/godardo/gool"
31
31
  Repository = "https://gitlab.com/godardo/gool"
32
- Documentation = "https://gitlab.com/godardo/gool"
32
+ Documentation = "https://godardo.gitlab.io/gool"
33
33
 
34
34
  [dependency-groups]
35
35
  dev = [
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
18
18
  commit_id: str | None
19
19
  __commit_id__: str | None
20
20
 
21
- __version__ = version = '1.3.0'
22
- __version_tuple__ = version_tuple = (1, 3, 0)
21
+ __version__ = version = '1.3.2'
22
+ __version_tuple__ = version_tuple = (1, 3, 2)
23
23
 
24
24
  __commit_id__ = commit_id = None
@@ -169,7 +169,7 @@ def display_diff_baseline(
169
169
  console.print(f"{item}", soft_wrap=True, markup=False)
170
170
  print()
171
171
 
172
- def display_data(list_data: list[str], header: str) -> None:
172
+ def display_data_rich(list_data: list[str], header: str) -> None:
173
173
  table = Table(title=header, highlight=True)
174
174
  table.add_column("Template", justify="left")
175
175
  for item in list_data:
@@ -178,16 +178,16 @@ def display_diff_baseline(
178
178
  console.print(table, markup=False)
179
179
  print()
180
180
 
181
- if raw:
182
- display_data_raw(missing, "Missing from baseline")
183
- display_data_raw(added, "Added from baseline")
184
- if display_common:
185
- display_data_raw(common, "Common with baseline")
186
- else:
187
- display_data(missing, "Missing from baseline")
188
- display_data(added, "Added from baseline")
189
- if display_common:
190
- display_data(common, "Common with baseline")
181
+ def display_data(raw: bool, list_data: list[str], header: str) -> None:
182
+ if raw:
183
+ display_data_raw(list_data, header)
184
+ else:
185
+ display_data_rich(list_data, header)
186
+
187
+ display_data(raw, missing, "Missing /baseline")
188
+ display_data(raw, added, "Added /baseline")
189
+ if display_common:
190
+ display_data(raw, common, "Common with baseline")
191
191
 
192
192
 
193
193
  def display_clusters(
@@ -359,8 +359,8 @@ def main(args: Arguments) -> int:
359
359
 
360
360
  if args.baseline:
361
361
  base_filter_regexp = re.compile(args.base_filter) if args.base_filter else filter_regexp
362
- base_time_min = datetime.strptime(args.base_time_min, time_format) if args.time_min else time_min
363
- base_time_max = datetime.strptime(args.base_time_max, time_format) if args.time_max else time_max
362
+ base_time_min = datetime.strptime(args.base_time_min, time_format) if args.base_time_min else time_min
363
+ base_time_max = datetime.strptime(args.base_time_max, time_format) if args.base_time_max else time_max
364
364
  logging.info("Running baseline clustering.")
365
365
  bl_runner, bl_total_nb_lines = _create_and_run_miner(
366
366
  drain3_cfg_file,
@@ -116,11 +116,11 @@ class LogsMiner:
116
116
  baseline_clusters = {cluster.get_template() for cluster in baseline_miner.template_miner.drain.clusters}
117
117
  clusters = {cluster.get_template() for cluster in miner.template_miner.drain.clusters}
118
118
 
119
- missing_from_baseline = baseline_clusters - clusters
120
- added_from_baseline = clusters - baseline_clusters
119
+ missing_vs_baseline = baseline_clusters - clusters
120
+ added_vs_baseline = clusters - baseline_clusters
121
121
  common = baseline_clusters & clusters
122
122
 
123
- return sorted(missing_from_baseline), sorted(added_from_baseline), sorted(common)
123
+ return sorted(missing_vs_baseline), sorted(added_vs_baseline), sorted(common)
124
124
 
125
125
  def get_total_nb_lines_clusters(self) -> int:
126
126
  """
@@ -1,8 +1,8 @@
1
- Missing from baseline:
1
+ Missing /baseline:
2
2
  [<TIME>] [notice] jk2 init() Found child 1568 in scoreboard slot 13
3
3
  [<TIME>] [notice] jk2 init() Found child <*> in scoreboard slot 11
4
4
 
5
- Added from baseline:
5
+ Added /baseline:
6
6
  [<TIME>] [notice] jk2 init() Found child <*> in scoreboard slot 13
7
7
 
8
8
  Log Clusters
@@ -1,8 +1,8 @@
1
- Missing from baseline:
1
+ Missing /baseline:
2
2
  [<TIME>] [notice] jk2 init() Found child 1568 in scoreboard slot 13
3
3
  [<TIME>] [notice] jk2 init() Found child <*> in scoreboard slot 11
4
4
 
5
- Added from baseline:
5
+ Added /baseline:
6
6
  [<TIME>] [notice] jk2 init() Found child <*> in scoreboard slot 13
7
7
 
8
8
  Common with baseline:
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes