queuemo-findings 1.0.0__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.
- queuemo_findings-1.0.0/LICENSE +21 -0
- queuemo_findings-1.0.0/MANIFEST.in +11 -0
- queuemo_findings-1.0.0/PKG-INFO +29 -0
- queuemo_findings-1.0.0/README +1 -0
- queuemo_findings-1.0.0/cached/__init__.py +39 -0
- queuemo_findings-1.0.0/cached/collect.py +62 -0
- queuemo_findings-1.0.0/cached/config.py +28 -0
- queuemo_findings-1.0.0/cached/data.py +41 -0
- queuemo_findings-1.0.0/cached/serialize.py +157 -0
- queuemo_findings-1.0.0/pyproject.toml +115 -0
- queuemo_findings-1.0.0/qcon/__init__.py +16 -0
- queuemo_findings-1.0.0/qcon/__main__.py +13 -0
- queuemo_findings-1.0.0/qcon/cli.py +69 -0
- queuemo_findings-1.0.0/qcon/cmd/__init__.py +8 -0
- queuemo_findings-1.0.0/qcon/cmd/list.py +25 -0
- queuemo_findings-1.0.0/qcon/cmd/publish.py +33 -0
- queuemo_findings-1.0.0/queuemo_findings.egg-info/PKG-INFO +29 -0
- queuemo_findings-1.0.0/queuemo_findings.egg-info/SOURCES.txt +42 -0
- queuemo_findings-1.0.0/queuemo_findings.egg-info/dependency_links.txt +1 -0
- queuemo_findings-1.0.0/queuemo_findings.egg-info/entry_points.txt +3 -0
- queuemo_findings-1.0.0/queuemo_findings.egg-info/requires.txt +13 -0
- queuemo_findings-1.0.0/queuemo_findings.egg-info/top_level.txt +3 -0
- queuemo_findings-1.0.0/qview/__init__.py +15 -0
- queuemo_findings-1.0.0/qview/__main__.py +12 -0
- queuemo_findings-1.0.0/qview/api/__init__.py +8 -0
- queuemo_findings-1.0.0/qview/api/findings/__init__.py +14 -0
- queuemo_findings-1.0.0/qview/api/findings/plots.py +103 -0
- queuemo_findings-1.0.0/qview/api/findings/renderer.py +150 -0
- queuemo_findings-1.0.0/qview/api/findings/utils.py +39 -0
- queuemo_findings-1.0.0/qview/app.py +41 -0
- queuemo_findings-1.0.0/qview/cli.py +74 -0
- queuemo_findings-1.0.0/qview/config.py +33 -0
- queuemo_findings-1.0.0/qview/static/base.css +12 -0
- queuemo_findings-1.0.0/qview/static/css/findings.css +21 -0
- queuemo_findings-1.0.0/qview/static/js/base.js +38 -0
- queuemo_findings-1.0.0/qview/static/js/findings.js +66 -0
- queuemo_findings-1.0.0/qview/templates/base.html +23 -0
- queuemo_findings-1.0.0/qview/templates/findings/index.html +71 -0
- queuemo_findings-1.0.0/qview/templates/public/error.html +10 -0
- queuemo_findings-1.0.0/qview/templates/public/home.html +6 -0
- queuemo_findings-1.0.0/qview/view/__init__.py +8 -0
- queuemo_findings-1.0.0/qview/view/findings.py +62 -0
- queuemo_findings-1.0.0/qview/view/welcome.py +28 -0
- queuemo_findings-1.0.0/setup.cfg +4 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Helmut Konrad Schewe
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# =============================================================================
|
|
2
|
+
# C O P Y R I G H T
|
|
3
|
+
# -----------------------------------------------------------------------------
|
|
4
|
+
# Copyright (c) 2020-2023 by Helmut Konrad Schewe. All rights reserved.
|
|
5
|
+
# This file is property of Helmut Konrad Schewe. Any unauthorized copy,
|
|
6
|
+
# use or distribution is an offensive act against international law and may
|
|
7
|
+
# be prosecuted under federal law. Its content is company confidential.
|
|
8
|
+
# =============================================================================
|
|
9
|
+
|
|
10
|
+
graft qview/static
|
|
11
|
+
graft qview/templates
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: queuemo-findings
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Author-email: Helmut Konrad Schewe <helmutus@outlook.com>
|
|
5
|
+
License-Expression: MIT
|
|
6
|
+
Project-URL: Homepage, https://github.com/anaticulae/queuemo-quality
|
|
7
|
+
Project-URL: Repository, https://github.com/anaticulae/queuemo-quality
|
|
8
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
12
|
+
Requires-Python: >=3.12
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
License-File: LICENSE
|
|
15
|
+
Requires-Dist: configos<2.0.0,>=1.1.0
|
|
16
|
+
Requires-Dist: flask-bootstrap<4.0.0.0,>=3.3.7.1
|
|
17
|
+
Requires-Dist: flask<4.0.0,>=3.1.3
|
|
18
|
+
Requires-Dist: protoerror<4.0.0,>=3.20.4
|
|
19
|
+
Requires-Dist: qvlink<3.0.0,>=2.15.7
|
|
20
|
+
Requires-Dist: semver==3.2.0
|
|
21
|
+
Requires-Dist: upainter<2.0.0,>=1.0.0
|
|
22
|
+
Requires-Dist: utilo<3.0.0,>=2.112.3
|
|
23
|
+
Provides-Extra: dev
|
|
24
|
+
Requires-Dist: hoverpower==1.8.1; extra == "dev"
|
|
25
|
+
Requires-Dist: queuemo<2.0.0,>=1.28.1; extra == "dev"
|
|
26
|
+
Requires-Dist: utilotest==1.1.1; extra == "dev"
|
|
27
|
+
Dynamic: license-file
|
|
28
|
+
|
|
29
|
+
# qcon
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# qcon
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# =============================================================================
|
|
2
|
+
# C O P Y R I G H T
|
|
3
|
+
# -----------------------------------------------------------------------------
|
|
4
|
+
# Copyright (c) 2021-2023 by Helmut Konrad Schewe. All rights reserved.
|
|
5
|
+
# This file is property of Helmut Konrad Schewe. Any unauthorized copy,
|
|
6
|
+
# use or distribution is an offensive act against international law and may
|
|
7
|
+
# be prosecuted under federal law. Its content is company confidential.
|
|
8
|
+
# =============================================================================
|
|
9
|
+
"""Dumper
|
|
10
|
+
======
|
|
11
|
+
|
|
12
|
+
dumped/
|
|
13
|
+
document/
|
|
14
|
+
bachelor90/
|
|
15
|
+
v00_10_11_release
|
|
16
|
+
|
|
17
|
+
.. code-block:: none
|
|
18
|
+
|
|
19
|
+
dumped files : show all files
|
|
20
|
+
findings : show possible findings
|
|
21
|
+
versions : show all software versions
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
from cached.collect import collect
|
|
25
|
+
from cached.config import root
|
|
26
|
+
from cached.data import CachedFinding
|
|
27
|
+
from cached.data import CachedFindings
|
|
28
|
+
from cached.data import CachedResult
|
|
29
|
+
from cached.data import CachedResults
|
|
30
|
+
from cached.serialize import dump_result
|
|
31
|
+
from cached.serialize import dump_root
|
|
32
|
+
from cached.serialize import dumps
|
|
33
|
+
from cached.serialize import load_result
|
|
34
|
+
from cached.serialize import load_root
|
|
35
|
+
from cached.serialize import loads
|
|
36
|
+
from cached.serialize import name
|
|
37
|
+
from cached.serialize import version_raw
|
|
38
|
+
|
|
39
|
+
CONFIG_DEFAULT = 'release'
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# =============================================================================
|
|
2
|
+
# C O P Y R I G H T
|
|
3
|
+
# -----------------------------------------------------------------------------
|
|
4
|
+
# Copyright (c) 2021-2023 by Helmut Konrad Schewe. All rights reserved.
|
|
5
|
+
# This file is property of Helmut Konrad Schewe. Any unauthorized copy,
|
|
6
|
+
# use or distribution is an offensive act against international law and may
|
|
7
|
+
# be prosecuted under federal law. Its content is company confidential.
|
|
8
|
+
# =============================================================================
|
|
9
|
+
|
|
10
|
+
import os
|
|
11
|
+
|
|
12
|
+
import iamraw
|
|
13
|
+
import protoerror
|
|
14
|
+
import qvlink
|
|
15
|
+
import utilo
|
|
16
|
+
|
|
17
|
+
import cached
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def collect(path: str) -> 'cached.CachedResult':
|
|
21
|
+
findings = os.path.join(path, 'result', '__optimized__')
|
|
22
|
+
if not utilo.exists(findings):
|
|
23
|
+
raise ValueError(f'could not find {findings}')
|
|
24
|
+
pagefindings: iamraw.PageFindings = protoerror.load_grouped(findings)
|
|
25
|
+
collected = []
|
|
26
|
+
for page in pagefindings:
|
|
27
|
+
for finding in page.content:
|
|
28
|
+
item = cached.CachedFinding(
|
|
29
|
+
page=page.page,
|
|
30
|
+
msgid=finding.solution.msgid,
|
|
31
|
+
)
|
|
32
|
+
collected.append(item)
|
|
33
|
+
document, version, config = document_version_config(path)
|
|
34
|
+
result = cached.CachedResult(
|
|
35
|
+
findings=collected,
|
|
36
|
+
config=config,
|
|
37
|
+
document=document,
|
|
38
|
+
version=version,
|
|
39
|
+
)
|
|
40
|
+
return result
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def document_version_config(path: str) -> tuple:
|
|
44
|
+
job = qvlink.load_job(os.path.join(path, qvlink.JOB_FILE_NAME))
|
|
45
|
+
document = simplify_filename(job.title)
|
|
46
|
+
if os.path.exists(path):
|
|
47
|
+
loaded = qvlink.load_debug(path)
|
|
48
|
+
else:
|
|
49
|
+
utilo.error(f'could not load config: {path}')
|
|
50
|
+
loaded = {}
|
|
51
|
+
version = loaded.get('queuemo', None)
|
|
52
|
+
config = loaded.get('config', cached.CONFIG_DEFAULT)
|
|
53
|
+
return document, version, config
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
def simplify_filename(name):
|
|
57
|
+
name = name.replace('.pdf', '')
|
|
58
|
+
# beautify document name
|
|
59
|
+
name = name.replace('-', '_')
|
|
60
|
+
name = name.replace(' ', '_')
|
|
61
|
+
name = name.lower()
|
|
62
|
+
return name
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# =============================================================================
|
|
2
|
+
# C O P Y R I G H T
|
|
3
|
+
# -----------------------------------------------------------------------------
|
|
4
|
+
# Copyright (c) 2021-2023 by Helmut Konrad Schewe. All rights reserved.
|
|
5
|
+
# This file is property of Helmut Konrad Schewe. Any unauthorized copy,
|
|
6
|
+
# use or distribution is an offensive act against international law and may
|
|
7
|
+
# be prosecuted under federal law. Its content is company confidential.
|
|
8
|
+
# =============================================================================
|
|
9
|
+
|
|
10
|
+
import os
|
|
11
|
+
import sys
|
|
12
|
+
|
|
13
|
+
import configos
|
|
14
|
+
import utilo
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def root() -> str:
|
|
18
|
+
try:
|
|
19
|
+
path = configos.env(
|
|
20
|
+
'DEV_CACHED_ROOT',
|
|
21
|
+
default='~/.tmp/qcon/dev_cached',
|
|
22
|
+
)
|
|
23
|
+
except KeyError:
|
|
24
|
+
# TODO: REMOVE LATER OR CHANGE?
|
|
25
|
+
utilo.error('require global env `DEV_CACHED_ROOT`')
|
|
26
|
+
sys.exit(utilo.FAILURE)
|
|
27
|
+
os.makedirs(path, exist_ok=True)
|
|
28
|
+
return path
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# =============================================================================
|
|
2
|
+
# C O P Y R I G H T
|
|
3
|
+
# -----------------------------------------------------------------------------
|
|
4
|
+
# Copyright (c) 2021-2023 by Helmut Konrad Schewe. All rights reserved.
|
|
5
|
+
# This file is property of Helmut Konrad Schewe. Any unauthorized copy,
|
|
6
|
+
# use or distribution is an offensive act against international law and may
|
|
7
|
+
# be prosecuted under federal law. Its content is company confidential.
|
|
8
|
+
# =============================================================================
|
|
9
|
+
|
|
10
|
+
import dataclasses
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@dataclasses.dataclass
|
|
14
|
+
class CachedFinding:
|
|
15
|
+
msgid: str = None
|
|
16
|
+
page: int = None
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
CachedFindings = list[CachedFinding]
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
@dataclasses.dataclass
|
|
23
|
+
class CachedResult:
|
|
24
|
+
document: str = None
|
|
25
|
+
version: str = None
|
|
26
|
+
config: str = None
|
|
27
|
+
findings: CachedFindings = dataclasses.field(default_factory=list)
|
|
28
|
+
|
|
29
|
+
def __len__(self):
|
|
30
|
+
return len(self.findings)
|
|
31
|
+
|
|
32
|
+
def __getitem__(self, index):
|
|
33
|
+
return self.findings[index] # pylint:disable=E1136
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
CachedResults = list[CachedResult]
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def hashed(findings: CachedFindings) -> str:
|
|
40
|
+
merged = ''.join([item.msgid for item in findings])
|
|
41
|
+
return hash(merged)
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
# =============================================================================
|
|
2
|
+
# C O P Y R I G H T
|
|
3
|
+
# -----------------------------------------------------------------------------
|
|
4
|
+
# Copyright (c) 2021-2023 by Helmut Konrad Schewe. All rights reserved.
|
|
5
|
+
# This file is property of Helmut Konrad Schewe. Any unauthorized copy,
|
|
6
|
+
# use or distribution is an offensive act against international law and may
|
|
7
|
+
# be prosecuted under federal law. Its content is company confidential.
|
|
8
|
+
# =============================================================================
|
|
9
|
+
|
|
10
|
+
import os
|
|
11
|
+
import pickle # nosec
|
|
12
|
+
|
|
13
|
+
import semver
|
|
14
|
+
import utilo
|
|
15
|
+
|
|
16
|
+
import cached
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def dumps(document: cached.CachedResult) -> bytes:
|
|
20
|
+
dumped = pickle.dumps(document)
|
|
21
|
+
return dumped
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def loads(raw: bytes) -> cached.CachedResult:
|
|
25
|
+
try:
|
|
26
|
+
document = pickle.loads(raw) # nosec
|
|
27
|
+
except pickle.UnpicklingError:
|
|
28
|
+
return None
|
|
29
|
+
return document
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def dump_result(
|
|
33
|
+
document: cached.CachedResult,
|
|
34
|
+
root: str,
|
|
35
|
+
overwrite: bool = True,
|
|
36
|
+
) -> str:
|
|
37
|
+
if document.version is None:
|
|
38
|
+
utilo.error(f'could not dump {document.document}, '
|
|
39
|
+
'require --overwrite_version parameter')
|
|
40
|
+
return None
|
|
41
|
+
|
|
42
|
+
named = name(version=document.version, config=document.config)
|
|
43
|
+
parent = os.path.join(root, document.document)
|
|
44
|
+
path = os.path.join(parent, named)
|
|
45
|
+
os.makedirs(parent, exist_ok=True) # create parent
|
|
46
|
+
utilo.debug(f'write: {path}')
|
|
47
|
+
dumped = cached.dumps(document)
|
|
48
|
+
writer = utilo.file_create_binary
|
|
49
|
+
if overwrite:
|
|
50
|
+
writer = utilo.file_replace_binary
|
|
51
|
+
writer(path, dumped)
|
|
52
|
+
return path
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def load_result(
|
|
56
|
+
document: str = None,
|
|
57
|
+
version: str = None,
|
|
58
|
+
config: str = None,
|
|
59
|
+
root: str = None,
|
|
60
|
+
) -> cached.CachedResult:
|
|
61
|
+
named = name(version=version, config=config)
|
|
62
|
+
path = os.path.join(root, document, named)
|
|
63
|
+
assert os.path.exists(path), str(path)
|
|
64
|
+
loaded = utilo.file_read_binary(path)
|
|
65
|
+
document = loads(loaded)
|
|
66
|
+
if document is None:
|
|
67
|
+
utilo.error(f'could not load document: {document} {version} {config}')
|
|
68
|
+
return document
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
def dump_root(
|
|
72
|
+
documents: cached.CachedResults,
|
|
73
|
+
root: str,
|
|
74
|
+
overwrite: bool = True,
|
|
75
|
+
):
|
|
76
|
+
assert os.path.exists(root), str(root)
|
|
77
|
+
if isinstance(documents, cached.CachedResult):
|
|
78
|
+
documents = [documents]
|
|
79
|
+
for document in documents:
|
|
80
|
+
dump_result(document, root, overwrite=overwrite)
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
def load_root(
|
|
84
|
+
root: str,
|
|
85
|
+
document: str = None,
|
|
86
|
+
version: str = None,
|
|
87
|
+
config: str = None,
|
|
88
|
+
) -> cached.CachedResults:
|
|
89
|
+
result = []
|
|
90
|
+
for item in collect_root(root, document, version, config):
|
|
91
|
+
path = os.path.join(root, item)
|
|
92
|
+
raw = utilo.file_read_binary(path)
|
|
93
|
+
loaded = loads(raw)
|
|
94
|
+
if loaded is None:
|
|
95
|
+
utilo.error(f'could not load document: {path}')
|
|
96
|
+
continue
|
|
97
|
+
result.append(loaded)
|
|
98
|
+
return result
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
def collect_root(
|
|
102
|
+
root: str,
|
|
103
|
+
document: str = None,
|
|
104
|
+
version: str = None,
|
|
105
|
+
config: str = None,
|
|
106
|
+
) -> 'paths':
|
|
107
|
+
collected = []
|
|
108
|
+
if isinstance(document, str):
|
|
109
|
+
document = [document]
|
|
110
|
+
if isinstance(version, list): # pylint:disable=W0160
|
|
111
|
+
version = [version_raw(item) for item in version]
|
|
112
|
+
else:
|
|
113
|
+
version = [version_raw(version)] if version else None
|
|
114
|
+
if isinstance(config, str):
|
|
115
|
+
config = [config]
|
|
116
|
+
for item in utilo.file_list(root):
|
|
117
|
+
raw = str(item)
|
|
118
|
+
if skip(document, raw):
|
|
119
|
+
continue
|
|
120
|
+
if skip(version, raw):
|
|
121
|
+
continue
|
|
122
|
+
if skip(config, raw):
|
|
123
|
+
continue
|
|
124
|
+
collected.append(item)
|
|
125
|
+
return collected
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
def skip(items: list, raw: str) -> bool:
|
|
129
|
+
if not items:
|
|
130
|
+
return False
|
|
131
|
+
if any((item in raw for item in items)):
|
|
132
|
+
return False
|
|
133
|
+
return True
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
def version_raw(raw: str):
|
|
137
|
+
"""\
|
|
138
|
+
>>> version_raw('v3.2.5')
|
|
139
|
+
'03_02_05'
|
|
140
|
+
"""
|
|
141
|
+
# remove version prefix
|
|
142
|
+
raw = raw[1:] if raw[0] == 'v' else raw
|
|
143
|
+
parsed = semver.parse(raw)
|
|
144
|
+
major = str(parsed['major']).zfill(2)
|
|
145
|
+
minor = str(parsed['minor']).zfill(2)
|
|
146
|
+
patch = str(parsed['patch']).zfill(2)
|
|
147
|
+
result = f'{major}_{minor}_{patch}'
|
|
148
|
+
return result
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
def name(version: str, config: str = 'default'):
|
|
152
|
+
"""\
|
|
153
|
+
>>> name('v3.2.5')
|
|
154
|
+
'03_02_05_default'
|
|
155
|
+
"""
|
|
156
|
+
version = version_raw(version)
|
|
157
|
+
return f'{version}_{config}'
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = [
|
|
3
|
+
"setuptools>=83.0.0",
|
|
4
|
+
"wheel>=0.47.0",
|
|
5
|
+
]
|
|
6
|
+
build-backend = "setuptools.build_meta"
|
|
7
|
+
|
|
8
|
+
[project]
|
|
9
|
+
name = "queuemo-findings"
|
|
10
|
+
version = "1.0.0"
|
|
11
|
+
description = ""
|
|
12
|
+
requires-python = ">=3.12"
|
|
13
|
+
authors = [
|
|
14
|
+
{ name = "Helmut Konrad Schewe", email = "helmutus@outlook.com" },
|
|
15
|
+
]
|
|
16
|
+
dependencies = [
|
|
17
|
+
"configos>=1.1.0,<2.0.0",
|
|
18
|
+
"flask-bootstrap>=3.3.7.1,<4.0.0.0",
|
|
19
|
+
"flask>=3.1.3,<4.0.0",
|
|
20
|
+
"protoerror>=3.20.4,<4.0.0",
|
|
21
|
+
"qvlink>=2.15.7,<3.0.0",
|
|
22
|
+
"semver==3.2.0",
|
|
23
|
+
"upainter>=1.0.0,<2.0.0",
|
|
24
|
+
"utilo>=2.112.3,<3.0.0",
|
|
25
|
+
]
|
|
26
|
+
keywords = []
|
|
27
|
+
classifiers = [
|
|
28
|
+
"Programming Language :: Python :: 3.12",
|
|
29
|
+
"Programming Language :: Python :: 3.13",
|
|
30
|
+
"Programming Language :: Python :: 3.14",
|
|
31
|
+
"Programming Language :: Python :: 3.15",
|
|
32
|
+
]
|
|
33
|
+
license = "MIT"
|
|
34
|
+
license-files = [
|
|
35
|
+
"LICENSE",
|
|
36
|
+
]
|
|
37
|
+
|
|
38
|
+
[project.readme]
|
|
39
|
+
file = "README"
|
|
40
|
+
content-type = "text/markdown"
|
|
41
|
+
|
|
42
|
+
[project.optional-dependencies]
|
|
43
|
+
dev = [
|
|
44
|
+
"hoverpower==1.8.1",
|
|
45
|
+
"queuemo>=1.28.1,<2.0.0",
|
|
46
|
+
"utilotest==1.1.1",
|
|
47
|
+
]
|
|
48
|
+
|
|
49
|
+
[project.urls]
|
|
50
|
+
Homepage = "https://github.com/anaticulae/queuemo-quality"
|
|
51
|
+
Repository = "https://github.com/anaticulae/queuemo-quality"
|
|
52
|
+
|
|
53
|
+
[project.scripts]
|
|
54
|
+
qcon = "qcon.cli:main"
|
|
55
|
+
qview = "qview.cli:main"
|
|
56
|
+
|
|
57
|
+
[tool.semantic_release]
|
|
58
|
+
version_toml = [
|
|
59
|
+
"pyproject.toml:project.version",
|
|
60
|
+
]
|
|
61
|
+
|
|
62
|
+
[tool.semantic_release.changelog]
|
|
63
|
+
mode = "init"
|
|
64
|
+
output_format = "md"
|
|
65
|
+
|
|
66
|
+
[tool.semantic_release.changelog.default_templates]
|
|
67
|
+
changelog_file = "CHANGELOG"
|
|
68
|
+
|
|
69
|
+
[tool.semantic_release.commit_parser_options]
|
|
70
|
+
allowed_tags = [
|
|
71
|
+
"build",
|
|
72
|
+
"chore",
|
|
73
|
+
"ci",
|
|
74
|
+
"deps",
|
|
75
|
+
"docs",
|
|
76
|
+
"feat",
|
|
77
|
+
"fix",
|
|
78
|
+
"perf",
|
|
79
|
+
"refactor",
|
|
80
|
+
"style",
|
|
81
|
+
"test",
|
|
82
|
+
]
|
|
83
|
+
default_bump_level = 2
|
|
84
|
+
|
|
85
|
+
[tool.setuptools]
|
|
86
|
+
include-package-data = true
|
|
87
|
+
|
|
88
|
+
[tool.setuptools.packages.find]
|
|
89
|
+
where = [
|
|
90
|
+
".",
|
|
91
|
+
]
|
|
92
|
+
include = [
|
|
93
|
+
"cached",
|
|
94
|
+
"qcon",
|
|
95
|
+
"qcon.cmd",
|
|
96
|
+
"qview",
|
|
97
|
+
"qview.api",
|
|
98
|
+
"qview.api.findings",
|
|
99
|
+
"qview.view",
|
|
100
|
+
"qview.static",
|
|
101
|
+
"qview.static.css",
|
|
102
|
+
"qview.static.js",
|
|
103
|
+
"qview.templates",
|
|
104
|
+
"qview.templates.findings",
|
|
105
|
+
"qview.templates.public",
|
|
106
|
+
]
|
|
107
|
+
exclude = [
|
|
108
|
+
"tests*",
|
|
109
|
+
]
|
|
110
|
+
|
|
111
|
+
[tool.hoverpower]
|
|
112
|
+
packages = [
|
|
113
|
+
"HOME",
|
|
114
|
+
"ORDER",
|
|
115
|
+
]
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#==============================================================================
|
|
2
|
+
# C O P Y R I G H T
|
|
3
|
+
#------------------------------------------------------------------------------
|
|
4
|
+
# Copyright (c) 2021-2023 by Helmut Konrad Schewe. All rights reserved.
|
|
5
|
+
# This file is property of Helmut Konrad Schewe. Any unauthorized copy,
|
|
6
|
+
# use or distribution is an offensive act against international law and may
|
|
7
|
+
# be prosecuted under federal law. Its content is company confidential.
|
|
8
|
+
#==============================================================================
|
|
9
|
+
|
|
10
|
+
import importlib.metadata
|
|
11
|
+
import os
|
|
12
|
+
|
|
13
|
+
__version__ = importlib.metadata.version('queuemo-findings')
|
|
14
|
+
|
|
15
|
+
ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
|
|
16
|
+
PROCESS = 'qcon'
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#==============================================================================
|
|
2
|
+
# C O P Y R I G H T
|
|
3
|
+
#------------------------------------------------------------------------------
|
|
4
|
+
# Copyright (c) 2021-2023 by Helmut Konrad Schewe. All rights reserved.
|
|
5
|
+
# This file is property of Helmut Konrad Schewe. Any unauthorized copy,
|
|
6
|
+
# use or distribution is an offensive act against international law and may
|
|
7
|
+
# be prosecuted under federal law. Its content is company confidential.
|
|
8
|
+
#==============================================================================
|
|
9
|
+
|
|
10
|
+
import qcon.cli
|
|
11
|
+
|
|
12
|
+
if __name__ == "__main__":
|
|
13
|
+
qcon.cli.main()
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
#==============================================================================
|
|
2
|
+
# C O P Y R I G H T
|
|
3
|
+
#------------------------------------------------------------------------------
|
|
4
|
+
# Copyright (c) 2021-2023 by Helmut Konrad Schewe. All rights reserved.
|
|
5
|
+
# This file is property of Helmut Konrad Schewe. Any unauthorized copy,
|
|
6
|
+
# use or distribution is an offensive act against international law and may
|
|
7
|
+
# be prosecuted under federal law. Its content is company confidential.
|
|
8
|
+
#==============================================================================
|
|
9
|
+
|
|
10
|
+
import utilo
|
|
11
|
+
|
|
12
|
+
import cached
|
|
13
|
+
import qcon
|
|
14
|
+
import qcon.cmd.list
|
|
15
|
+
import qcon.cmd.publish
|
|
16
|
+
|
|
17
|
+
CMD = [
|
|
18
|
+
utilo.Command(
|
|
19
|
+
longcut='publish',
|
|
20
|
+
message='collect results and merge to database',
|
|
21
|
+
),
|
|
22
|
+
utilo.Command(
|
|
23
|
+
longcut='list',
|
|
24
|
+
message='list results in data base',
|
|
25
|
+
),
|
|
26
|
+
utilo.Parameter(
|
|
27
|
+
longcut='root',
|
|
28
|
+
message=f'cache directory to write dumps(default:{cached.root()})',
|
|
29
|
+
),
|
|
30
|
+
utilo.Parameter(
|
|
31
|
+
longcut='overwrite_version',
|
|
32
|
+
message='overwrite or define queuemo version of collected file',
|
|
33
|
+
),
|
|
34
|
+
]
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
@utilo.saveme
|
|
38
|
+
def main():
|
|
39
|
+
parser = utilo.create_parser(
|
|
40
|
+
todo=CMD,
|
|
41
|
+
version=qcon.__version__,
|
|
42
|
+
config=utilo.ParserConfiguration(
|
|
43
|
+
outputparameter=False,
|
|
44
|
+
inputparameter=True,
|
|
45
|
+
cacheflag=False,
|
|
46
|
+
pages=False,
|
|
47
|
+
waitingflag=False,
|
|
48
|
+
),
|
|
49
|
+
)
|
|
50
|
+
args = utilo.parse(parser)
|
|
51
|
+
inputpath, _ = utilo.sources(args) # pylint:disable=W0612,W0632
|
|
52
|
+
root = args.get('root', None)
|
|
53
|
+
if not root:
|
|
54
|
+
root = cached.root()
|
|
55
|
+
utilo.log(f'root: {root}')
|
|
56
|
+
overwrite_version = args.get('overwrite_version', None)
|
|
57
|
+
if args.get('publish'):
|
|
58
|
+
returncode = qcon.cmd.publish.run(
|
|
59
|
+
inputpath,
|
|
60
|
+
root,
|
|
61
|
+
overwrite_version=overwrite_version,
|
|
62
|
+
)
|
|
63
|
+
if returncode:
|
|
64
|
+
return returncode
|
|
65
|
+
if args.get('list'):
|
|
66
|
+
returncode = qcon.cmd.list.run(root)
|
|
67
|
+
if returncode:
|
|
68
|
+
return returncode
|
|
69
|
+
return utilo.SUCCESS
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# =============================================================================
|
|
2
|
+
# C O P Y R I G H T
|
|
3
|
+
# -----------------------------------------------------------------------------
|
|
4
|
+
# Copyright (c) 2021-2023 by Helmut Konrad Schewe. All rights reserved.
|
|
5
|
+
# This file is property of Helmut Konrad Schewe. Any unauthorized copy,
|
|
6
|
+
# use or distribution is an offensive act against international law and may
|
|
7
|
+
# be prosecuted under federal law. Its content is company confidential.
|
|
8
|
+
# =============================================================================
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# =============================================================================
|
|
2
|
+
# C O P Y R I G H T
|
|
3
|
+
# -----------------------------------------------------------------------------
|
|
4
|
+
# Copyright (c) 2021-2023 by Helmut Konrad Schewe. All rights reserved.
|
|
5
|
+
# This file is property of Helmut Konrad Schewe. Any unauthorized copy,
|
|
6
|
+
# use or distribution is an offensive act against international law and may
|
|
7
|
+
# be prosecuted under federal law. Its content is company confidential.
|
|
8
|
+
# =============================================================================
|
|
9
|
+
|
|
10
|
+
import utilo
|
|
11
|
+
|
|
12
|
+
import cached
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def run(root: str):
|
|
16
|
+
utilo.log()
|
|
17
|
+
files = cached.load_root(root)
|
|
18
|
+
for item in files:
|
|
19
|
+
line = '{:<40} {:<10}{:<10}'.format( # pylint:disable=C0209
|
|
20
|
+
item.document,
|
|
21
|
+
item.version,
|
|
22
|
+
len(item.findings),
|
|
23
|
+
)
|
|
24
|
+
utilo.log(line)
|
|
25
|
+
return utilo.SUCCESS
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# =============================================================================
|
|
2
|
+
# C O P Y R I G H T
|
|
3
|
+
# -----------------------------------------------------------------------------
|
|
4
|
+
# Copyright (c) 2021-2023 by Helmut Konrad Schewe. All rights reserved.
|
|
5
|
+
# This file is property of Helmut Konrad Schewe. Any unauthorized copy,
|
|
6
|
+
# use or distribution is an offensive act against international law and may
|
|
7
|
+
# be prosecuted under federal law. Its content is company confidential.
|
|
8
|
+
# =============================================================================
|
|
9
|
+
|
|
10
|
+
import utilo
|
|
11
|
+
|
|
12
|
+
import cached
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def run(inputpaths: utilo.Strings, root: str, overwrite_version: str = None):
|
|
16
|
+
documents = []
|
|
17
|
+
for inputpath in inputpaths:
|
|
18
|
+
utilo.log(f'collect: {inputpath}')
|
|
19
|
+
try:
|
|
20
|
+
document = cached.collect(inputpath)
|
|
21
|
+
if overwrite_version:
|
|
22
|
+
utilo.debug(f'overwrite collected version: {overwrite_version}')
|
|
23
|
+
document.version = overwrite_version
|
|
24
|
+
except ValueError:
|
|
25
|
+
utilo.error(f'not a valid document folder: {inputpath}')
|
|
26
|
+
continue
|
|
27
|
+
documents.append(document)
|
|
28
|
+
if documents:
|
|
29
|
+
utilo.log(f'dump: {root}')
|
|
30
|
+
cached.dump_root(documents, root=root)
|
|
31
|
+
return utilo.SUCCESS
|
|
32
|
+
utilo.error('could not dump any data')
|
|
33
|
+
return utilo.FAILURE
|