hypershell 2.8.1__tar.gz → 2.8.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 (182) hide show
  1. {hypershell-2.8.1 → hypershell-2.8.2}/PKG-INFO +1 -1
  2. {hypershell-2.8.1 → hypershell-2.8.2}/pyproject.toml +1 -1
  3. {hypershell-2.8.1 → hypershell-2.8.2}/share/man/man1/hs.1 +1 -1
  4. {hypershell-2.8.1 → hypershell-2.8.2}/share/man/man1/hsx.1 +1 -1
  5. {hypershell-2.8.1 → hypershell-2.8.2}/share/man/man1/hyper-shell.1 +1 -1
  6. {hypershell-2.8.1 → hypershell-2.8.2}/src/hypershell/data/model.py +6 -2
  7. {hypershell-2.8.1 → hypershell-2.8.2}/tests/test_submit.py +22 -0
  8. {hypershell-2.8.1 → hypershell-2.8.2}/uv.lock +1 -1
  9. {hypershell-2.8.1 → hypershell-2.8.2}/.gitignore +0 -0
  10. {hypershell-2.8.1 → hypershell-2.8.2}/CODE_OF_CONDUCT.md +0 -0
  11. {hypershell-2.8.1 → hypershell-2.8.2}/LICENSE +0 -0
  12. {hypershell-2.8.1 → hypershell-2.8.2}/README.rst +0 -0
  13. {hypershell-2.8.1 → hypershell-2.8.2}/docs/Makefile +0 -0
  14. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/citation.rst +0 -0
  15. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/client_desc.rst +0 -0
  16. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/client_help.rst +0 -0
  17. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/client_usage.rst +0 -0
  18. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/cluster_desc.rst +0 -0
  19. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/cluster_help.rst +0 -0
  20. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/cluster_usage.rst +0 -0
  21. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/config_desc.rst +0 -0
  22. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/config_edit_desc.rst +0 -0
  23. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/config_edit_help.rst +0 -0
  24. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/config_edit_usage.rst +0 -0
  25. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/config_get_desc.rst +0 -0
  26. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/config_get_help.rst +0 -0
  27. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/config_get_usage.rst +0 -0
  28. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/config_help.rst +0 -0
  29. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/config_intro.rst +0 -0
  30. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/config_intro_alt.rst +0 -0
  31. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/config_param_ref.rst +0 -0
  32. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/config_pythonpath.rst +0 -0
  33. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/config_set_desc.rst +0 -0
  34. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/config_set_help.rst +0 -0
  35. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/config_set_usage.rst +0 -0
  36. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/config_site_vars.rst +0 -0
  37. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/config_task_env.rst +0 -0
  38. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/config_task_env_alt.rst +0 -0
  39. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/config_usage.rst +0 -0
  40. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/config_which_desc.rst +0 -0
  41. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/config_which_help.rst +0 -0
  42. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/config_which_usage.rst +0 -0
  43. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/database.rst +0 -0
  44. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/database_alt.rst +0 -0
  45. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/desc.rst +0 -0
  46. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/exit_status.rst +0 -0
  47. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/initdb_desc.rst +0 -0
  48. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/initdb_help.rst +0 -0
  49. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/initdb_usage.rst +0 -0
  50. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/license.rst +0 -0
  51. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/security_alt.rst +0 -0
  52. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/server_desc.rst +0 -0
  53. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/server_help.rst +0 -0
  54. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/server_usage.rst +0 -0
  55. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/signals.rst +0 -0
  56. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/submit_desc.rst +0 -0
  57. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/submit_help.rst +0 -0
  58. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/submit_usage.rst +0 -0
  59. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/task_groups_alt.rst +0 -0
  60. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/task_info_desc.rst +0 -0
  61. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/task_info_help.rst +0 -0
  62. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/task_info_usage.rst +0 -0
  63. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/task_run_desc.rst +0 -0
  64. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/task_run_help.rst +0 -0
  65. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/task_run_usage.rst +0 -0
  66. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/task_search_desc.rst +0 -0
  67. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/task_search_help.rst +0 -0
  68. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/task_search_usage.rst +0 -0
  69. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/task_submit_desc.rst +0 -0
  70. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/task_submit_help.rst +0 -0
  71. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/task_submit_usage.rst +0 -0
  72. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/task_update_desc.rst +0 -0
  73. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/task_update_help.rst +0 -0
  74. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/task_update_usage.rst +0 -0
  75. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/task_wait_desc.rst +0 -0
  76. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/task_wait_help.rst +0 -0
  77. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/task_wait_usage.rst +0 -0
  78. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/templates.rst +0 -0
  79. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/templates_alt.rst +0 -0
  80. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_include/tls_cli_options.rst +0 -0
  81. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_static/custom.css +0 -0
  82. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_static/logo-dark-mode.png +0 -0
  83. {hypershell-2.8.1 → hypershell-2.8.2}/docs/_static/logo-light-mode.png +0 -0
  84. {hypershell-2.8.1 → hypershell-2.8.2}/docs/api/client.rst +0 -0
  85. {hypershell-2.8.1 → hypershell-2.8.2}/docs/api/cluster.rst +0 -0
  86. {hypershell-2.8.1 → hypershell-2.8.2}/docs/api/data.rst +0 -0
  87. {hypershell-2.8.1 → hypershell-2.8.2}/docs/api/index.rst +0 -0
  88. {hypershell-2.8.1 → hypershell-2.8.2}/docs/api/server.rst +0 -0
  89. {hypershell-2.8.1 → hypershell-2.8.2}/docs/api/submit.rst +0 -0
  90. {hypershell-2.8.1 → hypershell-2.8.2}/docs/blog/20230329_2_2_0_release.rst +0 -0
  91. {hypershell-2.8.1 → hypershell-2.8.2}/docs/blog/20230413_2_3_0_release.rst +0 -0
  92. {hypershell-2.8.1 → hypershell-2.8.2}/docs/blog/20230602_2_4_0_release.rst +0 -0
  93. {hypershell-2.8.1 → hypershell-2.8.2}/docs/blog/20240518_2_5_0_release.rst +0 -0
  94. {hypershell-2.8.1 → hypershell-2.8.2}/docs/blog/20240706_2_5_2_release.rst +0 -0
  95. {hypershell-2.8.1 → hypershell-2.8.2}/docs/blog/20241115_2_6_0_release.rst +0 -0
  96. {hypershell-2.8.1 → hypershell-2.8.2}/docs/blog/20241115_announce_logo.rst +0 -0
  97. {hypershell-2.8.1 → hypershell-2.8.2}/docs/blog/20241231_2_6_1_release.rst +0 -0
  98. {hypershell-2.8.1 → hypershell-2.8.2}/docs/blog/20250215_2_6_5_release.rst +0 -0
  99. {hypershell-2.8.1 → hypershell-2.8.2}/docs/blog/20250405_2_6_6_release.rst +0 -0
  100. {hypershell-2.8.1 → hypershell-2.8.2}/docs/blog/20250504_2_7_0_release.rst +0 -0
  101. {hypershell-2.8.1 → hypershell-2.8.2}/docs/blog/20260705_2_8_0_release.rst +0 -0
  102. {hypershell-2.8.1 → hypershell-2.8.2}/docs/blog/index.rst +0 -0
  103. {hypershell-2.8.1 → hypershell-2.8.2}/docs/cli/client.rst +0 -0
  104. {hypershell-2.8.1 → hypershell-2.8.2}/docs/cli/cluster.rst +0 -0
  105. {hypershell-2.8.1 → hypershell-2.8.2}/docs/cli/config.rst +0 -0
  106. {hypershell-2.8.1 → hypershell-2.8.2}/docs/cli/config_edit.rst +0 -0
  107. {hypershell-2.8.1 → hypershell-2.8.2}/docs/cli/config_get.rst +0 -0
  108. {hypershell-2.8.1 → hypershell-2.8.2}/docs/cli/config_set.rst +0 -0
  109. {hypershell-2.8.1 → hypershell-2.8.2}/docs/cli/config_which.rst +0 -0
  110. {hypershell-2.8.1 → hypershell-2.8.2}/docs/cli/index.rst +0 -0
  111. {hypershell-2.8.1 → hypershell-2.8.2}/docs/cli/initdb.rst +0 -0
  112. {hypershell-2.8.1 → hypershell-2.8.2}/docs/cli/server.rst +0 -0
  113. {hypershell-2.8.1 → hypershell-2.8.2}/docs/cli/submit.rst +0 -0
  114. {hypershell-2.8.1 → hypershell-2.8.2}/docs/cli/task_info.rst +0 -0
  115. {hypershell-2.8.1 → hypershell-2.8.2}/docs/cli/task_run.rst +0 -0
  116. {hypershell-2.8.1 → hypershell-2.8.2}/docs/cli/task_search.rst +0 -0
  117. {hypershell-2.8.1 → hypershell-2.8.2}/docs/cli/task_submit.rst +0 -0
  118. {hypershell-2.8.1 → hypershell-2.8.2}/docs/cli/task_update.rst +0 -0
  119. {hypershell-2.8.1 → hypershell-2.8.2}/docs/cli/task_wait.rst +0 -0
  120. {hypershell-2.8.1 → hypershell-2.8.2}/docs/conf.py +0 -0
  121. {hypershell-2.8.1 → hypershell-2.8.2}/docs/config.rst +0 -0
  122. {hypershell-2.8.1 → hypershell-2.8.2}/docs/database.rst +0 -0
  123. {hypershell-2.8.1 → hypershell-2.8.2}/docs/getting_started.rst +0 -0
  124. {hypershell-2.8.1 → hypershell-2.8.2}/docs/index.rst +0 -0
  125. {hypershell-2.8.1 → hypershell-2.8.2}/docs/install.rst +0 -0
  126. {hypershell-2.8.1 → hypershell-2.8.2}/docs/logging.rst +0 -0
  127. {hypershell-2.8.1 → hypershell-2.8.2}/docs/manual.rst +0 -0
  128. {hypershell-2.8.1 → hypershell-2.8.2}/docs/roadmap.rst +0 -0
  129. {hypershell-2.8.1 → hypershell-2.8.2}/docs/security.rst +0 -0
  130. {hypershell-2.8.1 → hypershell-2.8.2}/docs/templates.rst +0 -0
  131. {hypershell-2.8.1 → hypershell-2.8.2}/docs/tutorial/advanced.rst +0 -0
  132. {hypershell-2.8.1 → hypershell-2.8.2}/docs/tutorial/basic.rst +0 -0
  133. {hypershell-2.8.1 → hypershell-2.8.2}/docs/tutorial/distributed.rst +0 -0
  134. {hypershell-2.8.1 → hypershell-2.8.2}/docs/tutorial/hybrid.rst +0 -0
  135. {hypershell-2.8.1 → hypershell-2.8.2}/share/bash_completion.d/hs +0 -0
  136. {hypershell-2.8.1 → hypershell-2.8.2}/share/bash_completion.d/hsx +0 -0
  137. {hypershell-2.8.1 → hypershell-2.8.2}/share/zsh/site-functions/_hs +0 -0
  138. {hypershell-2.8.1 → hypershell-2.8.2}/src/hypershell/__init__.py +0 -0
  139. {hypershell-2.8.1 → hypershell-2.8.2}/src/hypershell/client.py +0 -0
  140. {hypershell-2.8.1 → hypershell-2.8.2}/src/hypershell/cluster/__init__.py +0 -0
  141. {hypershell-2.8.1 → hypershell-2.8.2}/src/hypershell/cluster/local.py +0 -0
  142. {hypershell-2.8.1 → hypershell-2.8.2}/src/hypershell/cluster/remote.py +0 -0
  143. {hypershell-2.8.1 → hypershell-2.8.2}/src/hypershell/cluster/ssh.py +0 -0
  144. {hypershell-2.8.1 → hypershell-2.8.2}/src/hypershell/config.py +0 -0
  145. {hypershell-2.8.1 → hypershell-2.8.2}/src/hypershell/core/__init__.py +0 -0
  146. {hypershell-2.8.1 → hypershell-2.8.2}/src/hypershell/core/config.py +0 -0
  147. {hypershell-2.8.1 → hypershell-2.8.2}/src/hypershell/core/exceptions.py +0 -0
  148. {hypershell-2.8.1 → hypershell-2.8.2}/src/hypershell/core/fsm.py +0 -0
  149. {hypershell-2.8.1 → hypershell-2.8.2}/src/hypershell/core/heartbeat.py +0 -0
  150. {hypershell-2.8.1 → hypershell-2.8.2}/src/hypershell/core/logging.py +0 -0
  151. {hypershell-2.8.1 → hypershell-2.8.2}/src/hypershell/core/platform.py +0 -0
  152. {hypershell-2.8.1 → hypershell-2.8.2}/src/hypershell/core/pretty_print.py +0 -0
  153. {hypershell-2.8.1 → hypershell-2.8.2}/src/hypershell/core/queue.py +0 -0
  154. {hypershell-2.8.1 → hypershell-2.8.2}/src/hypershell/core/remote.py +0 -0
  155. {hypershell-2.8.1 → hypershell-2.8.2}/src/hypershell/core/resource.py +0 -0
  156. {hypershell-2.8.1 → hypershell-2.8.2}/src/hypershell/core/signal.py +0 -0
  157. {hypershell-2.8.1 → hypershell-2.8.2}/src/hypershell/core/sys.py +0 -0
  158. {hypershell-2.8.1 → hypershell-2.8.2}/src/hypershell/core/tag.py +0 -0
  159. {hypershell-2.8.1 → hypershell-2.8.2}/src/hypershell/core/template.py +0 -0
  160. {hypershell-2.8.1 → hypershell-2.8.2}/src/hypershell/core/thread.py +0 -0
  161. {hypershell-2.8.1 → hypershell-2.8.2}/src/hypershell/core/tls.py +0 -0
  162. {hypershell-2.8.1 → hypershell-2.8.2}/src/hypershell/core/types.py +0 -0
  163. {hypershell-2.8.1 → hypershell-2.8.2}/src/hypershell/core/uuid.py +0 -0
  164. {hypershell-2.8.1 → hypershell-2.8.2}/src/hypershell/data/__init__.py +0 -0
  165. {hypershell-2.8.1 → hypershell-2.8.2}/src/hypershell/data/core.py +0 -0
  166. {hypershell-2.8.1 → hypershell-2.8.2}/src/hypershell/server.py +0 -0
  167. {hypershell-2.8.1 → hypershell-2.8.2}/src/hypershell/submit.py +0 -0
  168. {hypershell-2.8.1 → hypershell-2.8.2}/src/hypershell/task.py +0 -0
  169. {hypershell-2.8.1 → hypershell-2.8.2}/tests/__init__.py +0 -0
  170. {hypershell-2.8.1 → hypershell-2.8.2}/tests/conftest.py +0 -0
  171. {hypershell-2.8.1 → hypershell-2.8.2}/tests/test_autoscale.py +0 -0
  172. {hypershell-2.8.1 → hypershell-2.8.2}/tests/test_cancel.py +0 -0
  173. {hypershell-2.8.1 → hypershell-2.8.2}/tests/test_cluster.py +0 -0
  174. {hypershell-2.8.1 → hypershell-2.8.2}/tests/test_data/__init__.py +0 -0
  175. {hypershell-2.8.1 → hypershell-2.8.2}/tests/test_data/test_core.py +0 -0
  176. {hypershell-2.8.1 → hypershell-2.8.2}/tests/test_data/test_model.py +0 -0
  177. {hypershell-2.8.1 → hypershell-2.8.2}/tests/test_groups.py +0 -0
  178. {hypershell-2.8.1 → hypershell-2.8.2}/tests/test_initdb.py +0 -0
  179. {hypershell-2.8.1 → hypershell-2.8.2}/tests/test_logging.py +0 -0
  180. {hypershell-2.8.1 → hypershell-2.8.2}/tests/test_main.py +0 -0
  181. {hypershell-2.8.1 → hypershell-2.8.2}/tests/test_queue_tls.py +0 -0
  182. {hypershell-2.8.1 → hypershell-2.8.2}/tests/test_server.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hypershell
3
- Version: 2.8.1
3
+ Version: 2.8.2
4
4
  Summary: A cross-platform, high-throughput computing utility for processing shell commands over a distributed, asynchronous queue.
5
5
  Project-URL: Homepage, https://hypershell.org
6
6
  Project-URL: Documentation, https://hypershell.readthedocs.io
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "hypershell"
3
- version = "2.8.1"
3
+ version = "2.8.2"
4
4
  description = "A cross-platform, high-throughput computing utility for processing shell commands over a distributed, asynchronous queue."
5
5
  readme = "README.rst"
6
6
  license = "Apache-2.0"
@@ -28,7 +28,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
28
28
  .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
29
29
  .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
30
30
  ..
31
- .TH "HS" "1" "Jul 08, 2026" "2.8.1" "hypershell"
31
+ .TH "HS" "1" "Jul 22, 2026" "2.8.2" "hypershell"
32
32
  .SH NAME
33
33
  hs \- Process shell commands over a distributed, asynchronous queue
34
34
  .SH SYNOPSIS
@@ -28,7 +28,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
28
28
  .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
29
29
  .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
30
30
  ..
31
- .TH "HS" "1" "Jul 08, 2026" "2.8.1" "hypershell"
31
+ .TH "HS" "1" "Jul 22, 2026" "2.8.2" "hypershell"
32
32
  .SH NAME
33
33
  hs \- Process shell commands over a distributed, asynchronous queue
34
34
  .SH SYNOPSIS
@@ -28,7 +28,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
28
28
  .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
29
29
  .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
30
30
  ..
31
- .TH "HYPER-SHELL" "1" "Jul 08, 2026" "2.8.1" "hypershell"
31
+ .TH "HYPER-SHELL" "1" "Jul 22, 2026" "2.8.2" "hypershell"
32
32
  .SH NAME
33
33
  hyper-shell \- Process shell commands over a distributed, asynchronous queue
34
34
  .SH SYNOPSIS
@@ -25,7 +25,7 @@ from sqlalchemy.dialects.postgresql import SMALLINT, UUID as POSTGRES_UUID, JSON
25
25
  # Internal libs
26
26
  from hypershell.core.logging import Logger, HOSTNAME, INSTANCE
27
27
  from hypershell.core.heartbeat import Heartbeat
28
- from hypershell.core.types import JSONData, to_json_type, from_json_type, serialize, deserialize
28
+ from hypershell.core.types import JSONData, to_json_type, from_json_type, serialize, deserialize, parse_bytes
29
29
  from hypershell.core.uuid import uuid
30
30
  from hypershell.core.tag import Tag
31
31
  from hypershell.data.core import schema, Session
@@ -344,7 +344,11 @@ class Task(Entity):
344
344
  tag = {**(tag or {}), **inline_tags, **{'part': 0, }}
345
345
  other['group'] = tag.pop('group', group)
346
346
  other['cores'] = tag.pop('cores', other.get('cores', None))
347
- other['memory'] = tag.pop('memory', other.get('memory', None))
347
+ # A memory value may arrive as a unit-bearing string ('2GB') from an inline
348
+ # `memory:` tag (parsed by smart_coerce, which leaves units alone) — parse it to
349
+ # integer bytes as the `--memory` flag does, so resource accounting stays numeric.
350
+ memory = tag.pop('memory', other.get('memory', None))
351
+ other['memory'] = parse_bytes(memory) if isinstance(memory, str) else memory
348
352
  other['timeout'] = tag.pop('timeout', other.get('timeout', None))
349
353
  return Task(id=uuid(), args=args,
350
354
  submit_id=INSTANCE, submit_host=HOSTNAME, submit_time=datetime.now().astimezone(),
@@ -18,6 +18,7 @@ from cmdkit.app import exit_status
18
18
  # Internal libs
19
19
  from tests import main, main_lines, NO_OUTPUT, create_taskfile_echo, assert_output, UUID_PATTERN
20
20
  from hypershell.submit import SubmitApp
21
+ from hypershell.data.model import Task
21
22
 
22
23
 
23
24
  @mark.integration
@@ -213,3 +214,24 @@ def test_submit_bundled(temp_site: Path) -> None:
213
214
  assert main_lines(['hs', 'list', 'args', '-f', 'plain', '-s', 'submit_time']) == (
214
215
  exit_status.success, [f'echo {n}' for n in range(100)], NO_OUTPUT
215
216
  )
217
+
218
+
219
+ @mark.unit
220
+ def test_inline_memory_tag_parses_units_to_bytes() -> None:
221
+ """An inline ``memory:<size>`` resource tag is parsed to integer bytes — like the ``--memory``
222
+ flag (parse_bytes) — not stored as a raw string.
223
+
224
+ smart_coerce (used for inline tag values) leaves unit-bearing strings like ``2GB`` untouched, so
225
+ without explicit parsing ``Task.memory`` would be a string and client-side resource accounting
226
+ (``memory_total < task.memory``, an int vs str comparison) crashes.
227
+ """
228
+ # The reported form: an inline HYPERSHELL comment carrying a unit suffix.
229
+ task = Task.new(args='echo AAA #HYPERSHELL: cores:1 memory:2GB timeout:10')
230
+ assert task.memory == 2147483648 # 2 * 1024**3
231
+ assert task.cores == 1 and task.timeout == 10
232
+ # The tag= kwarg form resolves identically.
233
+ assert Task.new(args='echo', tag={'memory': '512MB'}).memory == 536870912
234
+ # Unit-less, already-integer, and absent values are unaffected (no regression).
235
+ assert Task.new(args='echo', tag={'memory': '2000'}).memory == 2000
236
+ assert Task.new(args='echo', tag={'memory': 4096}).memory == 4096
237
+ assert Task.new(args='echo').memory is None
@@ -604,7 +604,7 @@ wheels = [
604
604
 
605
605
  [[package]]
606
606
  name = "hypershell"
607
- version = "2.8.1"
607
+ version = "2.8.2"
608
608
  source = { editable = "." }
609
609
  dependencies = [
610
610
  { name = "cmdkit", extra = ["toml"] },
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