cleepcli 1.43.2__tar.gz → 1.43.4__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.
- {cleepcli-1.43.2/cleepcli.egg-info → cleepcli-1.43.4}/PKG-INFO +1 -1
- {cleepcli-1.43.2 → cleepcli-1.43.4}/bin/ccli +13 -9
- {cleepcli-1.43.2 → cleepcli-1.43.4}/bin/cleep-cli +13 -9
- {cleepcli-1.43.2 → cleepcli-1.43.4}/cleepcli/check.py +20 -18
- {cleepcli-1.43.2 → cleepcli-1.43.4}/cleepcli/ci.py +7 -3
- {cleepcli-1.43.2 → cleepcli-1.43.4}/cleepcli/package.py +1 -1
- {cleepcli-1.43.2 → cleepcli-1.43.4}/cleepcli/version.py +1 -1
- {cleepcli-1.43.2 → cleepcli-1.43.4/cleepcli.egg-info}/PKG-INFO +1 -1
- {cleepcli-1.43.2 → cleepcli-1.43.4}/LICENSE +0 -0
- {cleepcli-1.43.2 → cleepcli-1.43.4}/MANIFEST.in +0 -0
- {cleepcli-1.43.2 → cleepcli-1.43.4}/README.md +0 -0
- {cleepcli-1.43.2 → cleepcli-1.43.4}/cleepcli/__init__.py +0 -0
- {cleepcli-1.43.2 → cleepcli-1.43.4}/cleepcli/cleepapi.py +0 -0
- {cleepcli-1.43.2 → cleepcli-1.43.4}/cleepcli/config.py +0 -0
- {cleepcli-1.43.2 → cleepcli-1.43.4}/cleepcli/console.py +0 -0
- {cleepcli-1.43.2 → cleepcli-1.43.4}/cleepcli/docs.py +0 -0
- {cleepcli-1.43.2 → cleepcli-1.43.4}/cleepcli/file.py +0 -0
- {cleepcli-1.43.2 → cleepcli-1.43.4}/cleepcli/git.py +0 -0
- {cleepcli-1.43.2 → cleepcli-1.43.4}/cleepcli/module.py +0 -0
- {cleepcli-1.43.2 → cleepcli-1.43.4}/cleepcli/test.py +0 -0
- {cleepcli-1.43.2 → cleepcli-1.43.4}/cleepcli/tools.py +0 -0
- {cleepcli-1.43.2 → cleepcli-1.43.4}/cleepcli/watch.py +0 -0
- {cleepcli-1.43.2 → cleepcli-1.43.4}/cleepcli.egg-info/SOURCES.txt +0 -0
- {cleepcli-1.43.2 → cleepcli-1.43.4}/cleepcli.egg-info/dependency_links.txt +0 -0
- {cleepcli-1.43.2 → cleepcli-1.43.4}/cleepcli.egg-info/requires.txt +0 -0
- {cleepcli-1.43.2 → cleepcli-1.43.4}/cleepcli.egg-info/top_level.txt +0 -0
- {cleepcli-1.43.2 → cleepcli-1.43.4}/setup.cfg +0 -0
- {cleepcli-1.43.2 → cleepcli-1.43.4}/setup.py +0 -0
|
@@ -733,17 +733,21 @@ def modcheckdoc(module, as_json):
|
|
|
733
733
|
try:
|
|
734
734
|
res = c.check_module_documentation(module)
|
|
735
735
|
|
|
736
|
-
content = res["details"]
|
|
737
736
|
if as_json:
|
|
738
|
-
|
|
739
|
-
content = {"error": res["error"]}
|
|
740
|
-
logging.info('%s' % json.dumps(content))
|
|
737
|
+
logging.info("%s", json.dumps(res))
|
|
741
738
|
else:
|
|
742
|
-
if res
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
739
|
+
message = f'Error: {res.get("message")}' if res.get("error") else "Documentation is valid"
|
|
740
|
+
logging.info("%s", message)
|
|
741
|
+
for fn_name, fn_data in res.get("data", {}).items():
|
|
742
|
+
logging.info("- %s [%s]", fn_name, "OK" if fn_data.get("valid", False) else "KO")
|
|
743
|
+
logging.info(" Errors:")
|
|
744
|
+
for error in fn_data.get("errors", []):
|
|
745
|
+
logging.info(" - %s", error)
|
|
746
|
+
logging.info(" Warnings:")
|
|
747
|
+
for warn in fn_data.get("warnings", []):
|
|
748
|
+
logging.info(" - %s", warn)
|
|
749
|
+
|
|
750
|
+
if res.get("error", True):
|
|
747
751
|
sys.exit(1)
|
|
748
752
|
except Exception as e:
|
|
749
753
|
if logging.getLogger().getEffectiveLevel() == logging.DEBUG:
|
|
@@ -733,17 +733,21 @@ def modcheckdoc(module, as_json):
|
|
|
733
733
|
try:
|
|
734
734
|
res = c.check_module_documentation(module)
|
|
735
735
|
|
|
736
|
-
content = res["details"]
|
|
737
736
|
if as_json:
|
|
738
|
-
|
|
739
|
-
content = {"error": res["error"]}
|
|
740
|
-
logging.info('%s' % json.dumps(content))
|
|
737
|
+
logging.info("%s", json.dumps(res))
|
|
741
738
|
else:
|
|
742
|
-
if res
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
739
|
+
message = f'Error: {res.get("message")}' if res.get("error") else "Documentation is valid"
|
|
740
|
+
logging.info("%s", message)
|
|
741
|
+
for fn_name, fn_data in res.get("data", {}).items():
|
|
742
|
+
logging.info("- %s [%s]", fn_name, "OK" if fn_data.get("valid", False) else "KO")
|
|
743
|
+
logging.info(" Errors:")
|
|
744
|
+
for error in fn_data.get("errors", []):
|
|
745
|
+
logging.info(" - %s", error)
|
|
746
|
+
logging.info(" Warnings:")
|
|
747
|
+
for warn in fn_data.get("warnings", []):
|
|
748
|
+
logging.info(" - %s", warn)
|
|
749
|
+
|
|
750
|
+
if res.get("error", True):
|
|
747
751
|
sys.exit(1)
|
|
748
752
|
except Exception as e:
|
|
749
753
|
if logging.getLogger().getEffectiveLevel() == logging.DEBUG:
|
|
@@ -1428,9 +1428,9 @@ overgeneral-exceptions=Exception
|
|
|
1428
1428
|
Check app documentation by command line
|
|
1429
1429
|
"""
|
|
1430
1430
|
output = {
|
|
1431
|
-
"
|
|
1432
|
-
"
|
|
1433
|
-
"
|
|
1431
|
+
"error": False,
|
|
1432
|
+
"message": None,
|
|
1433
|
+
"data": None,
|
|
1434
1434
|
}
|
|
1435
1435
|
|
|
1436
1436
|
self.logger.debug("Check module docs by command line")
|
|
@@ -1440,11 +1440,9 @@ overgeneral-exceptions=Exception
|
|
|
1440
1440
|
resp = console.command(cmd)
|
|
1441
1441
|
self.logger.debug("Cmd resp: %s", resp)
|
|
1442
1442
|
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
else:
|
|
1447
|
-
output["details"] = json.loads(resp["stdout"])
|
|
1443
|
+
output["error"] = resp.get("returncode", 1) != 0
|
|
1444
|
+
output["message"] = None if resp.get("returncode", 1) == 0 else "Invalid application documentation"
|
|
1445
|
+
output["data"] = json.loads(''.join(resp.get("stdout", [])))
|
|
1448
1446
|
|
|
1449
1447
|
return output
|
|
1450
1448
|
|
|
@@ -1452,18 +1450,22 @@ overgeneral-exceptions=Exception
|
|
|
1452
1450
|
"""
|
|
1453
1451
|
Check app documentation by api call
|
|
1454
1452
|
"""
|
|
1453
|
+
self.logger.debug("Check module docs by api call")
|
|
1455
1454
|
output = {
|
|
1456
|
-
"
|
|
1457
|
-
"
|
|
1455
|
+
"error": False,
|
|
1456
|
+
"message": None,
|
|
1457
|
+
"data": None,
|
|
1458
1458
|
}
|
|
1459
|
+
try:
|
|
1460
|
+
resp = self.cleepapi.check_documentation(module_name)
|
|
1461
|
+
self.logger.debug("Call resp: %s", resp)
|
|
1459
1462
|
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
output["error"] =
|
|
1466
|
-
|
|
1467
|
-
output["details"] = resp["data"] if resp["data"] is not None else {}
|
|
1463
|
+
output["error"] = resp.get("error", True)
|
|
1464
|
+
output["message"] = resp.get("message")
|
|
1465
|
+
output["data"] = resp.get("data")
|
|
1466
|
+
|
|
1467
|
+
except Exception:
|
|
1468
|
+
output["error"] = True
|
|
1469
|
+
output["message"] = "Cleep api call failed. Unable to get application documentation"
|
|
1468
1470
|
|
|
1469
1471
|
return output
|
|
@@ -143,6 +143,7 @@ class Ci():
|
|
|
143
143
|
resp = requests.post(self.CLEEP_COMMAND_URL, json={
|
|
144
144
|
'command': 'check_modules_updates',
|
|
145
145
|
'to': 'update',
|
|
146
|
+
'timeout': 60.0,
|
|
146
147
|
})
|
|
147
148
|
resp.raise_for_status()
|
|
148
149
|
resp_json = resp.json()
|
|
@@ -156,7 +157,8 @@ class Ci():
|
|
|
156
157
|
'to': 'update',
|
|
157
158
|
'params': {
|
|
158
159
|
'module_name': 'update',
|
|
159
|
-
}
|
|
160
|
+
},
|
|
161
|
+
'timeout': 60.0,
|
|
160
162
|
})
|
|
161
163
|
resp.raise_for_status()
|
|
162
164
|
resp_json = resp.json()
|
|
@@ -179,7 +181,8 @@ class Ci():
|
|
|
179
181
|
'module_name': module_name,
|
|
180
182
|
'package': package_path,
|
|
181
183
|
'no_compatibility_check': no_compatibility_check,
|
|
182
|
-
}
|
|
184
|
+
},
|
|
185
|
+
'timeout': 60.0,
|
|
183
186
|
})
|
|
184
187
|
resp.raise_for_status()
|
|
185
188
|
resp_json = resp.json()
|
|
@@ -224,7 +227,8 @@ class Ci():
|
|
|
224
227
|
time.sleep(1.0)
|
|
225
228
|
resp = requests.post(self.CLEEP_COMMAND_URL, json={
|
|
226
229
|
'command': 'get_modules_updates',
|
|
227
|
-
'to': 'update'
|
|
230
|
+
'to': 'update',
|
|
231
|
+
'timeout': 60.0,
|
|
228
232
|
})
|
|
229
233
|
resp.raise_for_status()
|
|
230
234
|
resp_json = resp.json()
|
|
@@ -418,7 +418,7 @@ sha256sum $DEB > $SHA256
|
|
|
418
418
|
if data_code_quality['score'] < 7.0:
|
|
419
419
|
raise Exception('Code quality for app "%s" is too low to be packaged (%s). Please improve it to be greater than 7.0' % (module_name, data_code_quality['score']))
|
|
420
420
|
data_documentation = check.check_module_documentation(module_name)
|
|
421
|
-
if data_documentation['
|
|
421
|
+
if data_documentation['error']:
|
|
422
422
|
raise Exception('Documentation is invalid. Please fix it before publishing')
|
|
423
423
|
data_breaking_changes = docs.check_module_breaking_changes(module_name)
|
|
424
424
|
if len(data_breaking_changes['errors']) > 0:
|
|
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
|