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.
Files changed (28) hide show
  1. {cleepcli-1.43.2/cleepcli.egg-info → cleepcli-1.43.4}/PKG-INFO +1 -1
  2. {cleepcli-1.43.2 → cleepcli-1.43.4}/bin/ccli +13 -9
  3. {cleepcli-1.43.2 → cleepcli-1.43.4}/bin/cleep-cli +13 -9
  4. {cleepcli-1.43.2 → cleepcli-1.43.4}/cleepcli/check.py +20 -18
  5. {cleepcli-1.43.2 → cleepcli-1.43.4}/cleepcli/ci.py +7 -3
  6. {cleepcli-1.43.2 → cleepcli-1.43.4}/cleepcli/package.py +1 -1
  7. {cleepcli-1.43.2 → cleepcli-1.43.4}/cleepcli/version.py +1 -1
  8. {cleepcli-1.43.2 → cleepcli-1.43.4/cleepcli.egg-info}/PKG-INFO +1 -1
  9. {cleepcli-1.43.2 → cleepcli-1.43.4}/LICENSE +0 -0
  10. {cleepcli-1.43.2 → cleepcli-1.43.4}/MANIFEST.in +0 -0
  11. {cleepcli-1.43.2 → cleepcli-1.43.4}/README.md +0 -0
  12. {cleepcli-1.43.2 → cleepcli-1.43.4}/cleepcli/__init__.py +0 -0
  13. {cleepcli-1.43.2 → cleepcli-1.43.4}/cleepcli/cleepapi.py +0 -0
  14. {cleepcli-1.43.2 → cleepcli-1.43.4}/cleepcli/config.py +0 -0
  15. {cleepcli-1.43.2 → cleepcli-1.43.4}/cleepcli/console.py +0 -0
  16. {cleepcli-1.43.2 → cleepcli-1.43.4}/cleepcli/docs.py +0 -0
  17. {cleepcli-1.43.2 → cleepcli-1.43.4}/cleepcli/file.py +0 -0
  18. {cleepcli-1.43.2 → cleepcli-1.43.4}/cleepcli/git.py +0 -0
  19. {cleepcli-1.43.2 → cleepcli-1.43.4}/cleepcli/module.py +0 -0
  20. {cleepcli-1.43.2 → cleepcli-1.43.4}/cleepcli/test.py +0 -0
  21. {cleepcli-1.43.2 → cleepcli-1.43.4}/cleepcli/tools.py +0 -0
  22. {cleepcli-1.43.2 → cleepcli-1.43.4}/cleepcli/watch.py +0 -0
  23. {cleepcli-1.43.2 → cleepcli-1.43.4}/cleepcli.egg-info/SOURCES.txt +0 -0
  24. {cleepcli-1.43.2 → cleepcli-1.43.4}/cleepcli.egg-info/dependency_links.txt +0 -0
  25. {cleepcli-1.43.2 → cleepcli-1.43.4}/cleepcli.egg-info/requires.txt +0 -0
  26. {cleepcli-1.43.2 → cleepcli-1.43.4}/cleepcli.egg-info/top_level.txt +0 -0
  27. {cleepcli-1.43.2 → cleepcli-1.43.4}/setup.cfg +0 -0
  28. {cleepcli-1.43.2 → cleepcli-1.43.4}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cleepcli
3
- Version: 1.43.2
3
+ Version: 1.43.4
4
4
  Summary: Cleep-cli helps developers to build great Cleep applications from command line.
5
5
  Home-page: https://github.com/CleepDevice/cleep-cli
6
6
  Author: Tanguy Bonneau
@@ -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
- if res["invalid"]:
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["invalid"]:
743
- content = f"Error: {res['error']}"
744
- logging.info('%s' % content)
745
-
746
- if res["invalid"]:
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
- if res["invalid"]:
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["invalid"]:
743
- content = f"Error: {res['error']}"
744
- logging.info('%s' % content)
745
-
746
- if res["invalid"]:
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
- "invalid": False,
1432
- "error": "",
1433
- "details": {},
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
- if resp["returncode"] != 0:
1444
- output["invalid"] = True
1445
- output["error"] = json.loads(resp["stdout"])
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
- "invalid": False,
1457
- "details": {}
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
- self.logger.debug("Check module docs by api call")
1461
- resp = self.cleepapi.check_documentation(module_name)
1462
- self.logger.debug("Call resp: %s", resp)
1463
- if resp["error"]:
1464
- output["invalid"] = True
1465
- output["error"] = resp["message"]
1466
- else:
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['invalid']:
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:
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env python
2
2
  # -*- coding: utf-8 -*-
3
3
 
4
- VERSION = '1.43.2'
4
+ VERSION = '1.43.4'
5
5
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cleepcli
3
- Version: 1.43.2
3
+ Version: 1.43.4
4
4
  Summary: Cleep-cli helps developers to build great Cleep applications from command line.
5
5
  Home-page: https://github.com/CleepDevice/cleep-cli
6
6
  Author: Tanguy Bonneau
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