cleepcli 1.43.0__tar.gz → 1.43.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 (28) hide show
  1. {cleepcli-1.43.0/cleepcli.egg-info → cleepcli-1.43.2}/PKG-INFO +1 -1
  2. {cleepcli-1.43.0 → cleepcli-1.43.2}/bin/ccli +7 -2
  3. {cleepcli-1.43.0 → cleepcli-1.43.2}/bin/cleep-cli +7 -2
  4. {cleepcli-1.43.0 → cleepcli-1.43.2}/cleepcli/check.py +12 -7
  5. {cleepcli-1.43.0 → cleepcli-1.43.2}/cleepcli/version.py +1 -1
  6. {cleepcli-1.43.0 → cleepcli-1.43.2/cleepcli.egg-info}/PKG-INFO +1 -1
  7. {cleepcli-1.43.0 → cleepcli-1.43.2}/LICENSE +0 -0
  8. {cleepcli-1.43.0 → cleepcli-1.43.2}/MANIFEST.in +0 -0
  9. {cleepcli-1.43.0 → cleepcli-1.43.2}/README.md +0 -0
  10. {cleepcli-1.43.0 → cleepcli-1.43.2}/cleepcli/__init__.py +0 -0
  11. {cleepcli-1.43.0 → cleepcli-1.43.2}/cleepcli/ci.py +0 -0
  12. {cleepcli-1.43.0 → cleepcli-1.43.2}/cleepcli/cleepapi.py +0 -0
  13. {cleepcli-1.43.0 → cleepcli-1.43.2}/cleepcli/config.py +0 -0
  14. {cleepcli-1.43.0 → cleepcli-1.43.2}/cleepcli/console.py +0 -0
  15. {cleepcli-1.43.0 → cleepcli-1.43.2}/cleepcli/docs.py +0 -0
  16. {cleepcli-1.43.0 → cleepcli-1.43.2}/cleepcli/file.py +0 -0
  17. {cleepcli-1.43.0 → cleepcli-1.43.2}/cleepcli/git.py +0 -0
  18. {cleepcli-1.43.0 → cleepcli-1.43.2}/cleepcli/module.py +0 -0
  19. {cleepcli-1.43.0 → cleepcli-1.43.2}/cleepcli/package.py +0 -0
  20. {cleepcli-1.43.0 → cleepcli-1.43.2}/cleepcli/test.py +0 -0
  21. {cleepcli-1.43.0 → cleepcli-1.43.2}/cleepcli/tools.py +0 -0
  22. {cleepcli-1.43.0 → cleepcli-1.43.2}/cleepcli/watch.py +0 -0
  23. {cleepcli-1.43.0 → cleepcli-1.43.2}/cleepcli.egg-info/SOURCES.txt +0 -0
  24. {cleepcli-1.43.0 → cleepcli-1.43.2}/cleepcli.egg-info/dependency_links.txt +0 -0
  25. {cleepcli-1.43.0 → cleepcli-1.43.2}/cleepcli.egg-info/requires.txt +0 -0
  26. {cleepcli-1.43.0 → cleepcli-1.43.2}/cleepcli.egg-info/top_level.txt +0 -0
  27. {cleepcli-1.43.0 → cleepcli-1.43.2}/setup.cfg +0 -0
  28. {cleepcli-1.43.0 → cleepcli-1.43.2}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cleepcli
3
- Version: 1.43.0
3
+ Version: 1.43.2
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,10 +733,15 @@ def modcheckdoc(module, as_json):
733
733
  try:
734
734
  res = c.check_module_documentation(module)
735
735
 
736
+ content = res["details"]
736
737
  if as_json:
737
- logging.info('%s' % json.dumps(res["details"]))
738
+ if res["invalid"]:
739
+ content = {"error": res["error"]}
740
+ logging.info('%s' % json.dumps(content))
738
741
  else:
739
- logging.info('%s' % res["details"])
742
+ if res["invalid"]:
743
+ content = f"Error: {res['error']}"
744
+ logging.info('%s' % content)
740
745
 
741
746
  if res["invalid"]:
742
747
  sys.exit(1)
@@ -733,10 +733,15 @@ def modcheckdoc(module, as_json):
733
733
  try:
734
734
  res = c.check_module_documentation(module)
735
735
 
736
+ content = res["details"]
736
737
  if as_json:
737
- logging.info('%s' % json.dumps(res["details"]))
738
+ if res["invalid"]:
739
+ content = {"error": res["error"]}
740
+ logging.info('%s' % json.dumps(content))
738
741
  else:
739
- logging.info('%s' % res["details"])
742
+ if res["invalid"]:
743
+ content = f"Error: {res['error']}"
744
+ logging.info('%s' % content)
740
745
 
741
746
  if res["invalid"]:
742
747
  sys.exit(1)
@@ -853,7 +853,7 @@ overgeneral-exceptions=Exception
853
853
 
854
854
  def __check_modimgsrc_directive(self, module_name, js_files, all_files):
855
855
  """
856
- Check if developer uses mod-img-src directive to display its images
856
+ Check if developer uses mod-img-src or cl-img-src directive to display its images
857
857
 
858
858
  Args:
859
859
  module_name (string): module name
@@ -891,8 +891,8 @@ overgeneral-exceptions=Exception
891
891
 
892
892
  # check directive usage for found images
893
893
  for image_file in image_files:
894
- pattern = r"mod-img-src\s*=\s*[\"']\s*%s\s*[\"']" % image_file['path'].replace(module_name+'/', '')
895
- self.logger.debug('Mod-img-src pattern: %s' % pattern)
894
+ pattern = r"(?:cl-img-src|cl-app-img)\s*=\s*[\"']\s*%s\s*[\"']" % image_file['path'].replace(module_name+'/', '')
895
+ self.logger.debug('cl-img-src|cl-app-img pattern: %s' % pattern)
896
896
  found = False
897
897
  for cached in cacheds:
898
898
  matches = re.finditer(pattern, cached, re.MULTILINE)
@@ -901,7 +901,7 @@ overgeneral-exceptions=Exception
901
901
  found = True
902
902
  founds.append(image_file['path'])
903
903
  if not found:
904
- warnings.append('Image "%s" may not be displayed properly because mod-img-src directive wasn\'t used' % image_file['filename'])
904
+ warnings.append('Image "%s" may not be displayed properly because cl-app-src directive wasn\'t used (or cl-img-src in config component)' % image_file['filename'])
905
905
 
906
906
  return warnings, founds
907
907
 
@@ -1429,7 +1429,8 @@ overgeneral-exceptions=Exception
1429
1429
  """
1430
1430
  output = {
1431
1431
  "invalid": False,
1432
- "details": {}
1432
+ "error": "",
1433
+ "details": {},
1433
1434
  }
1434
1435
 
1435
1436
  self.logger.debug("Check module docs by command line")
@@ -1441,7 +1442,9 @@ overgeneral-exceptions=Exception
1441
1442
 
1442
1443
  if resp["returncode"] != 0:
1443
1444
  output["invalid"] = True
1444
- output["details"] = json.loads(resp["stdout"])
1445
+ output["error"] = json.loads(resp["stdout"])
1446
+ else:
1447
+ output["details"] = json.loads(resp["stdout"])
1445
1448
 
1446
1449
  return output
1447
1450
 
@@ -1459,6 +1462,8 @@ overgeneral-exceptions=Exception
1459
1462
  self.logger.debug("Call resp: %s", resp)
1460
1463
  if resp["error"]:
1461
1464
  output["invalid"] = True
1462
- output["details"] = resp["data"] if resp["data"] is not None else {}
1465
+ output["error"] = resp["message"]
1466
+ else:
1467
+ output["details"] = resp["data"] if resp["data"] is not None else {}
1463
1468
 
1464
1469
  return output
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env python
2
2
  # -*- coding: utf-8 -*-
3
3
 
4
- VERSION = '1.43.0'
4
+ VERSION = '1.43.2'
5
5
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cleepcli
3
- Version: 1.43.0
3
+ Version: 1.43.2
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
File without changes
File without changes