cleepcli 1.43.2__tar.gz → 1.43.3__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.3}/PKG-INFO +1 -1
- {cleepcli-1.43.2 → cleepcli-1.43.3}/bin/ccli +13 -9
- {cleepcli-1.43.2 → cleepcli-1.43.3}/bin/cleep-cli +13 -9
- {cleepcli-1.43.2 → cleepcli-1.43.3}/cleepcli/check.py +20 -18
- {cleepcli-1.43.2 → cleepcli-1.43.3}/cleepcli/version.py +1 -1
- {cleepcli-1.43.2 → cleepcli-1.43.3/cleepcli.egg-info}/PKG-INFO +1 -1
- {cleepcli-1.43.2 → cleepcli-1.43.3}/LICENSE +0 -0
- {cleepcli-1.43.2 → cleepcli-1.43.3}/MANIFEST.in +0 -0
- {cleepcli-1.43.2 → cleepcli-1.43.3}/README.md +0 -0
- {cleepcli-1.43.2 → cleepcli-1.43.3}/cleepcli/__init__.py +0 -0
- {cleepcli-1.43.2 → cleepcli-1.43.3}/cleepcli/ci.py +0 -0
- {cleepcli-1.43.2 → cleepcli-1.43.3}/cleepcli/cleepapi.py +0 -0
- {cleepcli-1.43.2 → cleepcli-1.43.3}/cleepcli/config.py +0 -0
- {cleepcli-1.43.2 → cleepcli-1.43.3}/cleepcli/console.py +0 -0
- {cleepcli-1.43.2 → cleepcli-1.43.3}/cleepcli/docs.py +0 -0
- {cleepcli-1.43.2 → cleepcli-1.43.3}/cleepcli/file.py +0 -0
- {cleepcli-1.43.2 → cleepcli-1.43.3}/cleepcli/git.py +0 -0
- {cleepcli-1.43.2 → cleepcli-1.43.3}/cleepcli/module.py +0 -0
- {cleepcli-1.43.2 → cleepcli-1.43.3}/cleepcli/package.py +0 -0
- {cleepcli-1.43.2 → cleepcli-1.43.3}/cleepcli/test.py +0 -0
- {cleepcli-1.43.2 → cleepcli-1.43.3}/cleepcli/tools.py +0 -0
- {cleepcli-1.43.2 → cleepcli-1.43.3}/cleepcli/watch.py +0 -0
- {cleepcli-1.43.2 → cleepcli-1.43.3}/cleepcli.egg-info/SOURCES.txt +0 -0
- {cleepcli-1.43.2 → cleepcli-1.43.3}/cleepcli.egg-info/dependency_links.txt +0 -0
- {cleepcli-1.43.2 → cleepcli-1.43.3}/cleepcli.egg-info/requires.txt +0 -0
- {cleepcli-1.43.2 → cleepcli-1.43.3}/cleepcli.egg-info/top_level.txt +0 -0
- {cleepcli-1.43.2 → cleepcli-1.43.3}/setup.cfg +0 -0
- {cleepcli-1.43.2 → cleepcli-1.43.3}/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
|
|
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
|