hcs-core 0.1.296__tar.gz → 0.1.297__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 (71) hide show
  1. {hcs_core-0.1.296 → hcs_core-0.1.297}/PKG-INFO +2 -2
  2. hcs_core-0.1.297/hcs_core/__init__.py +1 -0
  3. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/util.py +26 -0
  4. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/util/versions.py +10 -8
  5. {hcs_core-0.1.296 → hcs_core-0.1.297}/pyproject.toml +1 -1
  6. hcs_core-0.1.296/hcs_core/__init__.py +0 -1
  7. {hcs_core-0.1.296 → hcs_core-0.1.297}/.gitignore +0 -0
  8. {hcs_core-0.1.296 → hcs_core-0.1.297}/README.md +0 -0
  9. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/__init__.py +0 -0
  10. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/_init.py +0 -0
  11. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/built_in_cmds/__init__.py +0 -0
  12. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/built_in_cmds/_ut.py +0 -0
  13. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/built_in_cmds/context.py +0 -0
  14. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/built_in_cmds/profile.py +0 -0
  15. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/cli_options.py +0 -0
  16. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/cli_processor.py +0 -0
  17. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/cmd_util.py +0 -0
  18. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/config.py +0 -0
  19. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/context.py +0 -0
  20. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/data_util.py +0 -0
  21. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/dispatcher.py +0 -0
  22. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/duration.py +0 -0
  23. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/extension.py +0 -0
  24. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/fn_util.py +0 -0
  25. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/fstore.py +0 -0
  26. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/jsondot.py +0 -0
  27. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/logger.py +0 -0
  28. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/profile.py +0 -0
  29. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/profile_store.py +0 -0
  30. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/recent.py +0 -0
  31. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/state.py +0 -0
  32. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/task_schd.py +0 -0
  33. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/telemetry.py +0 -0
  34. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/template_util.py +0 -0
  35. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/timeutil.py +0 -0
  36. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/ctxp/var_template.py +0 -0
  37. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/plan/__init__.py +0 -0
  38. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/plan/actions.py +0 -0
  39. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/plan/base_provider.py +0 -0
  40. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/plan/context.py +0 -0
  41. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/plan/core.py +0 -0
  42. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/plan/dag.py +0 -0
  43. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/plan/helper.py +0 -0
  44. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/plan/kop.py +0 -0
  45. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/plan/provider/__init__.py +0 -0
  46. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/plan/provider/dev/__init__.py +0 -0
  47. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/plan/provider/dev/_prepare.py +0 -0
  48. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/plan/provider/dev/dummy.py +0 -0
  49. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/plan/provider/dev/fibonacci.py +0 -0
  50. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/sglib/__init__.py +0 -0
  51. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/sglib/auth.py +0 -0
  52. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/sglib/cli_options.py +0 -0
  53. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/sglib/client_util.py +0 -0
  54. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/sglib/csp.py +0 -0
  55. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/sglib/ez_client.py +0 -0
  56. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/sglib/hcs_client.py +0 -0
  57. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/sglib/init.py +0 -0
  58. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/sglib/login_support.py +0 -0
  59. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/sglib/payload_util.py +0 -0
  60. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/sglib/requtil.py +0 -0
  61. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/sglib/utils.py +0 -0
  62. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/util/__init__.py +0 -0
  63. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/util/check_license.py +0 -0
  64. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/util/duration.py +0 -0
  65. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/util/exit.py +0 -0
  66. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/util/hcs_constants.py +0 -0
  67. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/util/job_view.py +0 -0
  68. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/util/pki_util.py +0 -0
  69. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/util/query_util.py +0 -0
  70. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/util/scheduler.py +0 -0
  71. {hcs_core-0.1.296 → hcs_core-0.1.297}/hcs_core/util/ssl_util.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hcs-core
3
- Version: 0.1.296
3
+ Version: 0.1.297
4
4
  Summary: Horizon Cloud Service CLI module.
5
5
  Project-URL: Homepage, https://github.com/euc-eng/hcs-cli
6
6
  Project-URL: Bug Tracker, https://github.com/euc-eng/hcs-cli/issues
@@ -36,7 +36,7 @@ Requires-Dist: schedule>=1.1.0
36
36
  Requires-Dist: setuptools>=70.0.0
37
37
  Requires-Dist: tabulate>=0.9.0
38
38
  Requires-Dist: websocket-client>=1.2.3
39
- Requires-Dist: yumako>=0.1.27
39
+ Requires-Dist: yumako>=0.1.30
40
40
  Provides-Extra: dev
41
41
  Requires-Dist: bandit; extra == 'dev'
42
42
  Requires-Dist: black; extra == 'dev'
@@ -0,0 +1 @@
1
+ __version__ = "0.1.297"
@@ -368,3 +368,29 @@ def format_table(data: list, fields_mapping: dict, columns_to_sum: list = None):
368
368
  traceback.print_exc()
369
369
 
370
370
  return tabulate(table, headers=headers) + "\n"
371
+
372
+
373
+ def colorize(data: dict, name: str, mapping: dict):
374
+ if os.environ.get("TERM_COLOR") == "0":
375
+ return
376
+
377
+ s = data.get(name)
378
+ if not s:
379
+ return
380
+
381
+ if isinstance(mapping, dict):
382
+ c = mapping.get(s)
383
+ if c:
384
+ if isinstance(c, str):
385
+ data[name] = click.style(s, fg=c)
386
+ elif callable(c):
387
+ color = c(data)
388
+ data[name] = click.style(s, fg=color)
389
+ else:
390
+ raise Exception(f"Unexpected color type: {type(c)} {c}")
391
+ elif callable(mapping):
392
+ c = mapping(s)
393
+ if c:
394
+ data[name] = click.style(s, fg=c)
395
+ else:
396
+ raise Exception(f"Unexpected mapping type: {type(mapping)} {mapping}")
@@ -30,14 +30,16 @@ def check_upgrade():
30
30
  checked_at = hcs_core.ctxp.state.get(last_upgrade_check_at, 0)
31
31
 
32
32
  now = time.time()
33
- if now - checked_at > 24 * 60 * 60:
34
- try:
35
- latest = get_latest_version()
36
- current = Version(get_version())
37
- if current < latest:
38
- log.warning(f"New version available: {latest}. Execute 'hcs upgrade' to upgrade.")
39
- except Exception as e:
40
- logging.debug(e)
33
+ if now - checked_at < 24 * 60 * 60:
34
+ return
35
+
36
+ try:
37
+ latest = get_latest_version()
38
+ current = Version(get_version())
39
+ if current < latest:
40
+ log.warning(f"New version available: {latest}. Execute 'hcs upgrade' to upgrade.")
41
+ except Exception as e:
42
+ logging.debug(e)
41
43
 
42
44
  hcs_core.ctxp.state.set(last_upgrade_check_at, now)
43
45
 
@@ -43,7 +43,7 @@ dependencies = [
43
43
  "websocket_client>=1.2.3",
44
44
  "psutil>=7.0.0",
45
45
  "schedule>=1.1.0",
46
- "yumako>=0.1.27",
46
+ "yumako>=0.1.30",
47
47
  "pydantic>=2.11.7",
48
48
  "python-dotenv>=1.1.1",
49
49
  ]
@@ -1 +0,0 @@
1
- __version__ = "0.1.296"
File without changes
File without changes