zrb 1.0.0a5__tar.gz → 1.0.0a10__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 (207) hide show
  1. {zrb-1.0.0a5 → zrb-1.0.0a10}/PKG-INFO +2 -1
  2. {zrb-1.0.0a5 → zrb-1.0.0a10}/pyproject.toml +1 -1
  3. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/__main__.py +6 -0
  4. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/__init__.py +14 -6
  5. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/git.py +16 -13
  6. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/git_subtree.py +19 -4
  7. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/group.py +5 -0
  8. zrb-1.0.0a10/src/zrb/builtin/setup/common_input.py +35 -0
  9. zrb-1.0.0a10/src/zrb/builtin/setup/dev/asdf.py +86 -0
  10. zrb-1.0.0a10/src/zrb/builtin/setup/dev/asdf_helper.py +44 -0
  11. zrb-1.0.0a10/src/zrb/builtin/setup/dev/tmux.py +50 -0
  12. zrb-1.0.0a10/src/zrb/builtin/setup/dev/tmux_helper.py +13 -0
  13. zrb-1.0.0a10/src/zrb/builtin/setup/system/latex/ubuntu.py +18 -0
  14. zrb-1.0.0a10/src/zrb/builtin/setup/system/ubuntu.py +28 -0
  15. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/todo.py +5 -6
  16. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/config.py +4 -1
  17. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/runner/web_app.py +0 -6
  18. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/task/any_task.py +38 -2
  19. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/task/base_task.py +71 -4
  20. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/task/cmd_task.py +27 -3
  21. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/task/llm_task.py +24 -18
  22. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/task/rsync_task.py +8 -8
  23. zrb-1.0.0a10/src/zrb/util/cmd/command.py +33 -0
  24. zrb-1.0.0a10/src/zrb/util/codemod/add_parent_to_class.py +38 -0
  25. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/util/git.py +35 -17
  26. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/util/git_subtree.py +11 -10
  27. zrb-1.0.0a10/src/zrb/util/string/format.py +19 -0
  28. zrb-1.0.0a10/src/zrb/xcom/__init__.py +0 -0
  29. zrb-1.0.0a5/src/zrb/util/string/format.py +0 -9
  30. {zrb-1.0.0a5 → zrb-1.0.0a10}/README.md +0 -0
  31. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/__init__.py +0 -0
  32. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/attr/__init__.py +0 -0
  33. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/attr/type.py +0 -0
  34. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/base64.py +0 -0
  35. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/llm/llm_chat.py +0 -0
  36. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/llm/tool/cli.py +0 -0
  37. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/llm/tool/rag.py +0 -0
  38. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/llm/tool/web.py +0 -0
  39. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/md5.py +0 -0
  40. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/__init__.py +0 -0
  41. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/add/__init__.py +0 -0
  42. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/add/fastapp.py +0 -0
  43. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/add/fastapp_template/.gitignore +0 -0
  44. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/add/fastapp_template/README.md +0 -0
  45. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/add/fastapp_template/__init__.py +0 -0
  46. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/add/fastapp_template/_zrb/config.py +0 -0
  47. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/add/fastapp_template/_zrb/group.py +0 -0
  48. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/add/fastapp_template/_zrb/helper.py +0 -0
  49. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/add/fastapp_template/_zrb/main.py +0 -0
  50. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/add/fastapp_template/_zrb/venv_task.py +0 -0
  51. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/add/fastapp_template/common/__init__.py +0 -0
  52. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/add/fastapp_template/common/app.py +0 -0
  53. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/add/fastapp_template/common/db_engine.py +0 -0
  54. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/add/fastapp_template/common/db_repository.py +0 -0
  55. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/add/fastapp_template/common/error.py +0 -0
  56. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/add/fastapp_template/common/schema.py +0 -0
  57. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/add/fastapp_template/common/usecase.py +0 -0
  58. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/add/fastapp_template/config.py +0 -0
  59. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/add/fastapp_template/main.py +0 -0
  60. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/add/fastapp_template/migrate.py +0 -0
  61. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/add/fastapp_template/module/__init__.py +0 -0
  62. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/add/fastapp_template/module/auth/alembic.ini +0 -0
  63. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/add/fastapp_template/module/auth/client/api_client.py +0 -0
  64. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/add/fastapp_template/module/auth/client/base_client.py +0 -0
  65. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/add/fastapp_template/module/auth/client/direct_client.py +0 -0
  66. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/add/fastapp_template/module/auth/client/factory.py +0 -0
  67. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/add/fastapp_template/module/auth/migration/README +0 -0
  68. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/add/fastapp_template/module/auth/migration/env.py +0 -0
  69. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/add/fastapp_template/module/auth/migration/script.py.mako +0 -0
  70. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/add/fastapp_template/module/auth/migration/versions/3093c7336477_add_user_table.py +0 -0
  71. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/add/fastapp_template/module/auth/migration_metadata.py +0 -0
  72. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/add/fastapp_template/module/auth/route.py +0 -0
  73. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/add/fastapp_template/module/auth/service/__init__.py +0 -0
  74. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/add/fastapp_template/module/auth/service/user/__init__.py +0 -0
  75. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/add/fastapp_template/module/auth/service/user/repository/__init__.py +0 -0
  76. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/add/fastapp_template/module/auth/service/user/repository/db_repository.py +0 -0
  77. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/add/fastapp_template/module/auth/service/user/repository/factory.py +0 -0
  78. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/add/fastapp_template/module/auth/service/user/repository/repository.py +0 -0
  79. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/add/fastapp_template/module/auth/service/user/usecase.py +0 -0
  80. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/add/fastapp_template/module/gateway/alembic.ini +0 -0
  81. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/add/fastapp_template/module/gateway/migration/README +0 -0
  82. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/add/fastapp_template/module/gateway/migration/env.py +0 -0
  83. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/add/fastapp_template/module/gateway/migration/script.py.mako +0 -0
  84. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/add/fastapp_template/module/gateway/migration/versions/.gitkeep +0 -0
  85. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/add/fastapp_template/module/gateway/migration_metadata.py +0 -0
  86. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/add/fastapp_template/module/gateway/route.py +0 -0
  87. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/add/fastapp_template/requirements.txt +0 -0
  88. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/add/fastapp_template/schema/__init__.py +0 -0
  89. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/add/fastapp_template/schema/role.py +0 -0
  90. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/add/fastapp_template/schema/user.py +0 -0
  91. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/add/fastapp_template/template.env +0 -0
  92. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/create/__init__.py +0 -0
  93. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/create/create.py +0 -0
  94. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/create/project-template/README.md +0 -0
  95. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/project/create/project-template/zrb_init.py +0 -0
  96. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/python.py +0 -0
  97. /zrb-1.0.0a5/src/zrb/builtin/shell/__init__.py → /zrb-1.0.0a10/src/zrb/builtin/setup/dev/tmux_config.sh +0 -0
  98. {zrb-1.0.0a5/src/zrb/builtin/shell/autocomplete → zrb-1.0.0a10/src/zrb/builtin/shell}/__init__.py +0 -0
  99. {zrb-1.0.0a5/src/zrb/callback → zrb-1.0.0a10/src/zrb/builtin/shell/autocomplete}/__init__.py +0 -0
  100. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/shell/autocomplete/bash.py +0 -0
  101. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/shell/autocomplete/subcmd.py +0 -0
  102. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/builtin/shell/autocomplete/zsh.py +0 -0
  103. {zrb-1.0.0a5/src/zrb/cmd → zrb-1.0.0a10/src/zrb/callback}/__init__.py +0 -0
  104. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/callback/any_callback.py +0 -0
  105. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/callback/callback.py +0 -0
  106. {zrb-1.0.0a5/src/zrb/content_transformer → zrb-1.0.0a10/src/zrb/cmd}/__init__.py +0 -0
  107. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/cmd/cmd_result.py +0 -0
  108. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/cmd/cmd_val.py +0 -0
  109. {zrb-1.0.0a5/src/zrb/context → zrb-1.0.0a10/src/zrb/content_transformer}/__init__.py +0 -0
  110. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/content_transformer/any_content_transformer.py +0 -0
  111. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/content_transformer/content_transformer.py +0 -0
  112. {zrb-1.0.0a5/src/zrb/dot_dict → zrb-1.0.0a10/src/zrb/context}/__init__.py +0 -0
  113. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/context/any_context.py +0 -0
  114. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/context/any_shared_context.py +0 -0
  115. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/context/context.py +0 -0
  116. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/context/shared_context.py +0 -0
  117. {zrb-1.0.0a5/src/zrb/env → zrb-1.0.0a10/src/zrb/dot_dict}/__init__.py +0 -0
  118. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/dot_dict/dot_dict.py +0 -0
  119. {zrb-1.0.0a5/src/zrb/group → zrb-1.0.0a10/src/zrb/env}/__init__.py +0 -0
  120. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/env/any_env.py +0 -0
  121. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/env/env.py +0 -0
  122. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/env/env_file.py +0 -0
  123. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/env/env_map.py +0 -0
  124. {zrb-1.0.0a5/src/zrb/input → zrb-1.0.0a10/src/zrb/group}/__init__.py +0 -0
  125. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/group/any_group.py +0 -0
  126. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/group/group.py +0 -0
  127. {zrb-1.0.0a5/src/zrb/runner → zrb-1.0.0a10/src/zrb/input}/__init__.py +0 -0
  128. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/input/any_input.py +0 -0
  129. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/input/base_input.py +0 -0
  130. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/input/bool_input.py +0 -0
  131. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/input/float_input.py +0 -0
  132. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/input/int_input.py +0 -0
  133. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/input/option_input.py +0 -0
  134. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/input/password_input.py +0 -0
  135. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/input/str_input.py +0 -0
  136. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/input/text_input.py +0 -0
  137. {zrb-1.0.0a5/src/zrb/runner/web_controller → zrb-1.0.0a10/src/zrb/runner}/__init__.py +0 -0
  138. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/runner/cli.py +0 -0
  139. {zrb-1.0.0a5/src/zrb/runner/web_controller/group_info_ui → zrb-1.0.0a10/src/zrb/runner/web_controller}/__init__.py +0 -0
  140. {zrb-1.0.0a5/src/zrb/runner/web_controller/home_page → zrb-1.0.0a10/src/zrb/runner/web_controller/group_info_ui}/__init__.py +0 -0
  141. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/runner/web_controller/group_info_ui/controller.py +0 -0
  142. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/runner/web_controller/group_info_ui/partial/group_info.html +0 -0
  143. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/runner/web_controller/group_info_ui/partial/group_li.html +0 -0
  144. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/runner/web_controller/group_info_ui/partial/task_info.html +0 -0
  145. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/runner/web_controller/group_info_ui/partial/task_li.html +0 -0
  146. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/runner/web_controller/group_info_ui/view.html +0 -0
  147. {zrb-1.0.0a5/src/zrb/runner/web_controller/task_ui → zrb-1.0.0a10/src/zrb/runner/web_controller/home_page}/__init__.py +0 -0
  148. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/runner/web_controller/home_page/controller.py +0 -0
  149. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/runner/web_controller/home_page/partial/group_info.html +0 -0
  150. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/runner/web_controller/home_page/partial/group_li.html +0 -0
  151. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/runner/web_controller/home_page/partial/task_info.html +0 -0
  152. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/runner/web_controller/home_page/partial/task_li.html +0 -0
  153. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/runner/web_controller/home_page/view.html +0 -0
  154. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/runner/web_controller/static/favicon-32x32.png +0 -0
  155. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/runner/web_controller/static/pico.min.css +0 -0
  156. {zrb-1.0.0a5/src/zrb/session → zrb-1.0.0a10/src/zrb/runner/web_controller/task_ui}/__init__.py +0 -0
  157. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/runner/web_controller/task_ui/controller.py +0 -0
  158. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/runner/web_controller/task_ui/partial/common-util.js +0 -0
  159. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/runner/web_controller/task_ui/partial/input.html +0 -0
  160. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/runner/web_controller/task_ui/partial/main.js +0 -0
  161. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/runner/web_controller/task_ui/partial/show-existing-session.js +0 -0
  162. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/runner/web_controller/task_ui/partial/visualize-history.js +0 -0
  163. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/runner/web_controller/task_ui/view.html +0 -0
  164. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/runner/web_util.py +0 -0
  165. {zrb-1.0.0a5/src/zrb/session_state_log → zrb-1.0.0a10/src/zrb/session}/__init__.py +0 -0
  166. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/session/any_session.py +0 -0
  167. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/session/session.py +0 -0
  168. {zrb-1.0.0a5/src/zrb/session_state_logger → zrb-1.0.0a10/src/zrb/session_state_log}/__init__.py +0 -0
  169. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/session_state_log/session_state_log.py +0 -0
  170. {zrb-1.0.0a5/src/zrb/task → zrb-1.0.0a10/src/zrb/session_state_logger}/__init__.py +0 -0
  171. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/session_state_logger/any_session_state_logger.py +0 -0
  172. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/session_state_logger/default_session_state_logger.py +0 -0
  173. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/session_state_logger/file_session_state_logger.py +0 -0
  174. {zrb-1.0.0a5/src/zrb/task_status → zrb-1.0.0a10/src/zrb/task}/__init__.py +0 -0
  175. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/task/base_trigger.py +0 -0
  176. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/task/http_check.py +0 -0
  177. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/task/make_task.py +0 -0
  178. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/task/scaffolder.py +0 -0
  179. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/task/scheduler.py +0 -0
  180. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/task/task.py +0 -0
  181. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/task/tcp_check.py +0 -0
  182. {zrb-1.0.0a5/src/zrb/util → zrb-1.0.0a10/src/zrb/task_status}/__init__.py +0 -0
  183. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/task_status/task_status.py +0 -0
  184. {zrb-1.0.0a5/src/zrb/util/cli → zrb-1.0.0a10/src/zrb/util}/__init__.py +0 -0
  185. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/util/attr.py +0 -0
  186. {zrb-1.0.0a5/src/zrb/util/cmd → zrb-1.0.0a10/src/zrb/util/cli}/__init__.py +0 -0
  187. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/util/cli/style.py +0 -0
  188. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/util/cli/subcommand.py +0 -0
  189. {zrb-1.0.0a5/src/zrb/util/codemod → zrb-1.0.0a10/src/zrb/util/cmd}/__init__.py +0 -0
  190. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/util/cmd/remote.py +0 -0
  191. {zrb-1.0.0a5/src/zrb/util/string → zrb-1.0.0a10/src/zrb/util/codemod}/__init__.py +0 -0
  192. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/util/codemod/add_code_to_class.py +0 -0
  193. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/util/codemod/add_code_to_function.py +0 -0
  194. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/util/codemod/add_code_to_method.py +0 -0
  195. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/util/codemod/add_key_to_dict.py +0 -0
  196. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/util/codemod/add_param_to_function_call.py +0 -0
  197. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/util/codemod/add_property_to_class.py +0 -0
  198. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/util/cron.py +0 -0
  199. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/util/group.py +0 -0
  200. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/util/llm/tool.py +0 -0
  201. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/util/load.py +0 -0
  202. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/util/run.py +0 -0
  203. {zrb-1.0.0a5/src/zrb/xcom → zrb-1.0.0a10/src/zrb/util/string}/__init__.py +0 -0
  204. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/util/string/conversion.py +0 -0
  205. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/util/string/name.py +0 -0
  206. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/util/todo.py +0 -0
  207. {zrb-1.0.0a5 → zrb-1.0.0a10}/src/zrb/xcom/xcom.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: zrb
3
- Version: 1.0.0a5
3
+ Version: 1.0.0a10
4
4
  Summary: Your Automation Powerhouse
5
5
  Home-page: https://github.com/state-alchemists/zrb
6
6
  License: AGPL-3.0-or-later
@@ -13,6 +13,7 @@ Classifier: Programming Language :: Python :: 3
13
13
  Classifier: Programming Language :: Python :: 3.10
14
14
  Classifier: Programming Language :: Python :: 3.11
15
15
  Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
16
17
  Provides-Extra: rag
17
18
  Requires-Dist: autopep8 (>=2.0.4,<3.0.0)
18
19
  Requires-Dist: beautifulsoup4 (>=4.12.3,<5.0.0)
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "zrb"
3
- version = "1.0.0a5"
3
+ version = "1.0.0a10"
4
4
  description = "Your Automation Powerhouse"
5
5
  authors = ["Go Frendi Gunawan <gofrendiasgard@gmail.com>"]
6
6
  license = "AGPL-3.0-or-later"
@@ -1,12 +1,18 @@
1
1
  import sys
2
2
 
3
+ from zrb.config import INIT_MODULES, INIT_SCRIPTS
3
4
  from zrb.runner.cli import cli
4
5
  from zrb.util.cli.style import stylize_error, stylize_warning
5
6
  from zrb.util.group import NodeNotFoundError
7
+ from zrb.util.load import load_file, load_module
6
8
 
7
9
 
8
10
  def serve_cli():
9
11
  try:
12
+ for init_module in INIT_MODULES:
13
+ load_module(init_module)
14
+ for init_script in INIT_SCRIPTS:
15
+ load_file(init_script, -1)
10
16
  cli.run(sys.argv[1:])
11
17
  except KeyboardInterrupt:
12
18
  print(stylize_warning("\nStopped"), file=sys.stderr)
@@ -12,10 +12,14 @@ from zrb.builtin.md5 import hash_md5, sum_md5
12
12
  from zrb.builtin.project.add.fastapp import add_fastapp_to_project
13
13
  from zrb.builtin.project.create.create import create_project
14
14
  from zrb.builtin.python import format_python_code
15
+ from zrb.builtin.setup.dev.asdf import setup_asdf
16
+ from zrb.builtin.setup.dev.tmux import setup_tmux
17
+ from zrb.builtin.setup.system.latex.ubuntu import setup_latex_on_ubuntu
18
+ from zrb.builtin.setup.system.ubuntu import setup_ubuntu
15
19
  from zrb.builtin.shell.autocomplete.bash import make_bash_autocomplete
16
20
  from zrb.builtin.shell.autocomplete.subcmd import get_shell_subcommands
17
21
  from zrb.builtin.shell.autocomplete.zsh import make_zsh_autocomplete
18
- from zrb.builtin.todo import todo_add, todo_complete, todo_edit, todo_list, todo_log
22
+ from zrb.builtin.todo import add_todo, complete_todo, edit_todo, list_todo, log_todo
19
23
 
20
24
  assert create_project
21
25
  assert add_fastapp_to_project
@@ -36,8 +40,12 @@ assert git_push
36
40
  assert git_add_subtree
37
41
  assert git_pull_subtree
38
42
  assert git_push_subtree
39
- assert todo_list
40
- assert todo_add
41
- assert todo_edit
42
- assert todo_complete
43
- assert todo_log
43
+ assert list_todo
44
+ assert add_todo
45
+ assert edit_todo
46
+ assert complete_todo
47
+ assert log_todo
48
+ assert setup_ubuntu
49
+ assert setup_latex_on_ubuntu
50
+ assert setup_asdf
51
+ assert setup_tmux
@@ -11,6 +11,7 @@ from zrb.util.git import (
11
11
  get_branches,
12
12
  get_current_branch,
13
13
  get_diff,
14
+ get_repo_dir,
14
15
  pull,
15
16
  push,
16
17
  )
@@ -55,7 +56,8 @@ from zrb.util.git import (
55
56
  alias="diff",
56
57
  )
57
58
  def get_git_diff(ctx: AnyContext):
58
- diff = get_diff(ctx.input.source, ctx.input.current)
59
+ repo_dir = get_repo_dir()
60
+ diff = get_diff(repo_dir, ctx.input.source, ctx.input.current)
59
61
  result = []
60
62
  decorated = []
61
63
  if ctx.input.created and diff.created:
@@ -82,14 +84,15 @@ def get_git_diff(ctx: AnyContext):
82
84
  alias="prune",
83
85
  )
84
86
  def prune_local_branches(ctx: AnyContext):
85
- branches = get_branches()
86
- current_branch = get_current_branch()
87
+ repo_dir = get_repo_dir()
88
+ branches = get_branches(repo_dir)
89
+ current_branch = get_current_branch(repo_dir)
87
90
  for branch in branches:
88
91
  if branch == current_branch or branch == "main" or branch == "master":
89
92
  continue
90
93
  ctx.print(stylize_yellow(f"Removing local branch: {branch}"))
91
94
  try:
92
- delete_branch(branch)
95
+ delete_branch(repo_dir, branch)
93
96
  except Exception as e:
94
97
  ctx.log_error(e)
95
98
 
@@ -107,13 +110,11 @@ def prune_local_branches(ctx: AnyContext):
107
110
  alias="commit",
108
111
  )
109
112
  def git_commit(ctx: AnyContext):
113
+ repo_dir = get_repo_dir()
110
114
  ctx.print("Add changes to staging")
111
- add()
115
+ add(repo_dir)
112
116
  ctx.print("Commit changes")
113
- try:
114
- commit(ctx.input.message)
115
- except Exception as e:
116
- ctx.log_error(e)
117
+ commit(repo_dir, ctx.input.message)
117
118
 
118
119
 
119
120
  @make_task(
@@ -130,10 +131,11 @@ def git_commit(ctx: AnyContext):
130
131
  alias="pull",
131
132
  )
132
133
  def git_pull(ctx: AnyContext):
134
+ repo_dir = get_repo_dir()
133
135
  remote = ctx.input.remote
134
- current_branch = get_current_branch()
136
+ current_branch = get_current_branch(repo_dir)
135
137
  ctx.print(f"Pulling from {remote}/{current_branch}")
136
- pull(remote, current_branch)
138
+ pull(repo_dir, remote, current_branch)
137
139
 
138
140
 
139
141
  @make_task(
@@ -150,7 +152,8 @@ def git_pull(ctx: AnyContext):
150
152
  alias="push",
151
153
  )
152
154
  def git_push(ctx: AnyContext):
155
+ repo_dir = get_repo_dir()
153
156
  remote = ctx.input.remote
154
- current_branch = get_current_branch()
157
+ current_branch = get_current_branch(repo_dir)
155
158
  ctx.print(f"Pushing to {remote}/{current_branch}")
156
- push(remote, current_branch)
159
+ push(repo_dir, remote, current_branch)
@@ -3,6 +3,7 @@ from zrb.builtin.group import git_subtree_group
3
3
  from zrb.context.any_context import AnyContext
4
4
  from zrb.input.str_input import StrInput
5
5
  from zrb.task.make_task import make_task
6
+ from zrb.util.git import get_repo_dir
6
7
  from zrb.util.git_subtree import add_subtree, load_config, pull_subtree, push_subtree
7
8
 
8
9
 
@@ -32,7 +33,9 @@ from zrb.util.git_subtree import add_subtree, load_config, pull_subtree, push_su
32
33
  alias="add",
33
34
  )
34
35
  def git_add_subtree(ctx: AnyContext):
36
+ repo_dir = get_repo_dir()
35
37
  add_subtree(
38
+ repo_dir=repo_dir,
36
39
  name=ctx.input.name,
37
40
  repo_url=ctx.input["repo-url"],
38
41
  branch=ctx.input["repo-branch"],
@@ -48,14 +51,20 @@ def git_add_subtree(ctx: AnyContext):
48
51
  alias="pull",
49
52
  )
50
53
  def git_pull_subtree(ctx: AnyContext):
51
- config = load_config()
54
+ repo_dir = get_repo_dir()
55
+ config = load_config(repo_dir)
52
56
  if not config.data:
53
57
  raise ValueError("No subtree config found")
54
58
  first_err: Exception | None = None
55
59
  for name, detail in config.data.items():
56
60
  try:
57
61
  ctx.print(f"Pull from subtree {name}")
58
- pull_subtree(detail.prefix, detail.repo_url, detail.branch)
62
+ pull_subtree(
63
+ repo_dir=repo_dir,
64
+ prefix=detail.prefix,
65
+ repo_url=detail.repo_url,
66
+ branch=detail.branch,
67
+ )
59
68
  except Exception as e:
60
69
  if first_err is None:
61
70
  first_err = e
@@ -72,14 +81,20 @@ def git_pull_subtree(ctx: AnyContext):
72
81
  alias="push",
73
82
  )
74
83
  def git_push_subtree(ctx: AnyContext):
75
- config = load_config()
84
+ repo_dir = get_repo_dir()
85
+ config = load_config(repo_dir)
76
86
  if not config.data:
77
87
  raise ValueError("No subtree config found")
78
88
  first_err: Exception | None = None
79
89
  for name, detail in config.data.items():
80
90
  try:
81
91
  ctx.print(f"Push to subtree {name}")
82
- push_subtree(detail.prefix, detail.repo_url, detail.branch)
92
+ push_subtree(
93
+ repo_dir=repo_dir,
94
+ prefix=detail.prefix,
95
+ repo_url=detail.repo_url,
96
+ branch=detail.branch,
97
+ )
83
98
  except Exception as e:
84
99
  if first_err is None:
85
100
  first_err = e
@@ -32,3 +32,8 @@ add_to_project_group = project_group.add_group(
32
32
  add_fastapp_to_project_group = add_to_project_group.add_group(
33
33
  Group(name="fastapp", description="🚀 Add Fastapp resources")
34
34
  )
35
+
36
+ setup_group = cli.add_group(Group(name="setup", description="🔧 Setup"))
37
+ setup_latex_group = setup_group.add_group(
38
+ Group(name="latex", description="✍️ Setup LaTeX")
39
+ )
@@ -0,0 +1,35 @@
1
+ from zrb.input.bool_input import BoolInput
2
+ from zrb.input.option_input import OptionInput
3
+
4
+ package_manager_input = OptionInput(
5
+ name="package-manager",
6
+ description="Your package manager",
7
+ prompt="Your package manager",
8
+ options=["apt", "dnf", "pacman", "zypper", "pkg", "brew", "spack"],
9
+ default_str="apt",
10
+ )
11
+
12
+ use_sudo_input = BoolInput(
13
+ name="use-sudo",
14
+ description="Use sudo or not",
15
+ prompt="Need sudo",
16
+ default_str="yes",
17
+ )
18
+
19
+ setup_bash_input = BoolInput(
20
+ name="setup-bash",
21
+ description="Setup bash",
22
+ prompt="Setup bash",
23
+ default_str="yes",
24
+ )
25
+
26
+ setup_zsh_input = BoolInput(
27
+ name="setup-zsh", description="Setup zsh", prompt="Setup zsh", default_str="yes"
28
+ )
29
+
30
+ setup_powershell_input = BoolInput(
31
+ name="setup-powershell",
32
+ description="Setup powershell",
33
+ prompt="Setup powershell",
34
+ default_str="no",
35
+ )
@@ -0,0 +1,86 @@
1
+ import os
2
+
3
+ from zrb.builtin.group import setup_group
4
+ from zrb.builtin.setup.common_input import (
5
+ package_manager_input,
6
+ setup_bash_input,
7
+ setup_powershell_input,
8
+ setup_zsh_input,
9
+ use_sudo_input,
10
+ )
11
+ from zrb.builtin.setup.dev.asdf_helper import (
12
+ check_inexist_asdf_dir,
13
+ get_install_prerequisites_cmd,
14
+ setup_asdf_ps_config,
15
+ setup_asdf_sh_config,
16
+ )
17
+ from zrb.context.any_context import AnyContext
18
+ from zrb.task.cmd_task import CmdTask
19
+ from zrb.task.make_task import make_task
20
+
21
+ install_asdf_prerequisites = CmdTask(
22
+ name="install-asdf-prerequisites",
23
+ input=[package_manager_input, use_sudo_input],
24
+ cmd=get_install_prerequisites_cmd,
25
+ )
26
+
27
+
28
+ download_asdf = CmdTask(
29
+ name="download-asdf",
30
+ cmd="git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.14.1",
31
+ execute_condition=check_inexist_asdf_dir,
32
+ )
33
+ install_asdf_prerequisites >> download_asdf
34
+
35
+
36
+ @make_task(
37
+ name="setup-asdf-on-bash",
38
+ input=setup_bash_input,
39
+ execute_condition='{ctx.input["setup-bash"]}',
40
+ upstream=download_asdf,
41
+ )
42
+ def setup_asdf_on_bash(ctx: AnyContext):
43
+ ctx.print("Configure asdf for bash")
44
+ setup_asdf_sh_config(os.path.expanduser(os.path.join("~", ".bashrc")))
45
+
46
+
47
+ @make_task(
48
+ name="setup-asdf-on-zsh",
49
+ input=setup_zsh_input,
50
+ execute_condition='{ctx.input["setup-zsh"]}',
51
+ upstream=download_asdf,
52
+ )
53
+ def setup_asdf_on_zsh(ctx: AnyContext):
54
+ ctx.print("Configure asdf for zsh")
55
+ setup_asdf_sh_config(os.path.expanduser(os.path.join("~", ".zshrc")))
56
+
57
+
58
+ @make_task(
59
+ name="setup-asdf-on-powershell",
60
+ input=setup_powershell_input,
61
+ execute_condition='{ctx.input["setup-powershell"]}',
62
+ upstream=download_asdf,
63
+ )
64
+ def setup_asdf_on_powershell(ctx: AnyContext):
65
+ ctx.print("Configure asdf for powershell")
66
+ setup_asdf_ps_config(
67
+ os.path.expanduser(os.path.join("~", ".config", "powershell", "profile.ps1"))
68
+ )
69
+
70
+
71
+ @make_task(
72
+ name="setup-asdf",
73
+ description="🧰 Setup `asdf`.",
74
+ group=setup_group,
75
+ alias="asdf",
76
+ )
77
+ def setup_asdf(ctx: AnyContext):
78
+ ctx.print("Setup complete, restart your terminal to continue")
79
+ ctx.print("Some useful commands:")
80
+ ctx.print("- asdf plugin add python")
81
+ ctx.print("- asdf list all python")
82
+ ctx.print("- asdf install python 3.12.0")
83
+ ctx.print("- asdf global python 3.12.0")
84
+
85
+
86
+ setup_asdf << [setup_asdf_on_bash, setup_asdf_on_zsh, setup_asdf_on_powershell]
@@ -0,0 +1,44 @@
1
+ import os
2
+
3
+ from zrb.context.any_context import AnyContext
4
+
5
+
6
+ def get_install_prerequisites_cmd(ctx: AnyContext) -> str:
7
+ package_manager: str = ctx.input["package-manager"]
8
+ if package_manager in ["brew", "spack"]:
9
+ cmd = f"{package_manager} install coreutils curl git"
10
+ elif package_manager == "pacman":
11
+ cmd = f"{package_manager} -S curl git"
12
+ else:
13
+ cmd = f"{package_manager} install curl git"
14
+ use_sudo: bool = ctx.input["use-sudo"]
15
+ if use_sudo:
16
+ return f"sudo {cmd}"
17
+ return cmd
18
+
19
+
20
+ def check_inexist_asdf_dir(_: AnyContext):
21
+ asdf_dir = os.path.expanduser(os.path.join("~", ".asdf"))
22
+ return not os.path.isdir(asdf_dir)
23
+
24
+
25
+ def setup_asdf_sh_config(file_path: str):
26
+ _setup_asdf_config(file_path, '. "$HOME/.asdf/asdf.sh"')
27
+
28
+
29
+ def setup_asdf_ps_config(file_path: str):
30
+ _setup_asdf_config(file_path, '. "$HOME/.asdf/asdf.ps1"')
31
+
32
+
33
+ def _setup_asdf_config(file_path: str, asdf_config: str):
34
+ dir_path = os.path.dirname(file_path)
35
+ os.makedirs(dir_path, exist_ok=True)
36
+ if not os.path.isfile(file_path):
37
+ with open(file_path, "w") as f:
38
+ f.write("")
39
+ with open(file_path, "r") as f:
40
+ content = f.read()
41
+ if asdf_config in content:
42
+ return
43
+ with open(file_path, "a") as f:
44
+ f.write(f"\n{asdf_config}\n")
@@ -0,0 +1,50 @@
1
+ import os
2
+
3
+ from zrb.builtin.group import setup_group
4
+ from zrb.builtin.setup.common_input import package_manager_input, use_sudo_input
5
+ from zrb.builtin.setup.dev.tmux_helper import get_install_tmux_cmd
6
+ from zrb.context.any_context import AnyContext
7
+ from zrb.input.str_input import StrInput
8
+ from zrb.task.cmd_task import CmdTask
9
+ from zrb.task.make_task import make_task
10
+
11
+ install_tmux = CmdTask(
12
+ name="install-tmux",
13
+ input=[package_manager_input, use_sudo_input],
14
+ cmd=get_install_tmux_cmd,
15
+ )
16
+
17
+
18
+ @make_task(
19
+ name="setup-tmux",
20
+ input=StrInput(
21
+ name="tmux-config",
22
+ description="Tmux config file",
23
+ prompt="Tmux config file",
24
+ default_str="~/.tmux.conf",
25
+ ),
26
+ description="🖥️ Setup `tmux`.",
27
+ group=setup_group,
28
+ alias="tmux",
29
+ )
30
+ def setup_tmux(ctx: AnyContext):
31
+ with open(os.path.join(os.path.dirname(__file__), "tmux_config.sh"), "r") as f:
32
+ tmux_config_template = f.read()
33
+ tmux_config_file = os.path.expanduser(ctx.input["tmux-config"])
34
+ tmux_config_dir = os.path.dirname(tmux_config_file)
35
+ # Make sure config file exists
36
+ os.makedirs(tmux_config_dir, exist_ok=True)
37
+ if not os.path.isfile(tmux_config_file):
38
+ with open(tmux_config_file, "w") as f:
39
+ f.write("")
40
+ with open(tmux_config_file, "r") as f:
41
+ # config file already contain the config
42
+ if tmux_config_template in f.read():
43
+ return
44
+ # Write config
45
+ with open(tmux_config_file, "a") as f:
46
+ f.write(f"\n{tmux_config_template}\n")
47
+ ctx.print("Setup complete, restart your terminal to continue")
48
+
49
+
50
+ install_tmux >> setup_tmux
@@ -0,0 +1,13 @@
1
+ from zrb.context.any_context import AnyContext
2
+
3
+
4
+ def get_install_tmux_cmd(ctx: AnyContext) -> str:
5
+ package_manager: str = ctx.input["package-manager"]
6
+ if package_manager == "pacman":
7
+ cmd = f"{package_manager} -S tmux"
8
+ else:
9
+ cmd = f"{package_manager} install tmux"
10
+ use_sudo: bool = ctx.input["use-sudo"]
11
+ if use_sudo:
12
+ return f"sudo {cmd}"
13
+ return cmd
@@ -0,0 +1,18 @@
1
+ from zrb.builtin.group import setup_latex_group
2
+ from zrb.builtin.setup.system.ubuntu import setup_ubuntu
3
+ from zrb.task.cmd_task import CmdTask
4
+
5
+ setup_latex_on_ubuntu = setup_latex_group.add_task(
6
+ CmdTask(
7
+ name="setup-latex-on-ubuntu",
8
+ description="🐧 Setup LaTeX on Ubuntu",
9
+ cmd=[
10
+ "sudo apt install -y \\",
11
+ "texlive-full texlive-latex-base texlive-fonts-recommended \\",
12
+ "texlive-fonts-extra texlive-latex-extra",
13
+ ],
14
+ render_cmd=False,
15
+ ),
16
+ alias="ubuntu",
17
+ )
18
+ setup_ubuntu >> setup_latex_on_ubuntu
@@ -0,0 +1,28 @@
1
+ from zrb.builtin.group import setup_group
2
+ from zrb.task.cmd_task import CmdTask
3
+
4
+ update_ubuntu = CmdTask(name="update-ubuntu", cmd="sudo apt update", render_cmd=False)
5
+
6
+ upgrade_todo = CmdTask(
7
+ name="upgrade-ubuntu", cmd="sudo apt upgrade -y", render_cmd=False
8
+ )
9
+ update_ubuntu >> upgrade_todo
10
+
11
+ setup_ubuntu = setup_group.add_task(
12
+ CmdTask(
13
+ name="setup-ubuntu",
14
+ description="🐧 Setup ubuntu",
15
+ cmd=[
16
+ "sudo apt install -y \\",
17
+ "build-essential python3-distutils libssl-dev zlib1g-dev \\"
18
+ "libbz2-dev libreadline-dev libsqlite3-dev libpq-dev python3-dev \\",
19
+ "llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev \\",
20
+ "liblzma-dev python3-openssl libblas-dev liblapack-dev rustc \\",
21
+ "golang gfortran fd-find ripgrep wget curl git ncat zip unzip \\",
22
+ "cmake make tree tmux zsh neovim xdotool xsel",
23
+ ],
24
+ render_cmd=False,
25
+ ),
26
+ alias="ubuntu",
27
+ )
28
+ upgrade_todo >> setup_ubuntu
@@ -51,7 +51,7 @@ from zrb.util.todo import (
51
51
  group=todo_group,
52
52
  alias="add",
53
53
  )
54
- def todo_add(ctx: AnyContext):
54
+ def add_todo(ctx: AnyContext):
55
55
  todo_file_path = os.path.join(TODO_DIR, "todo.txt")
56
56
  todo_list: list[TodoTaskModel] = []
57
57
  if os.path.isfile(todo_file_path):
@@ -81,7 +81,7 @@ def todo_add(ctx: AnyContext):
81
81
 
82
82
 
83
83
  @make_task(name="todo-list", description="📋 List todo", group=todo_group, alias="list")
84
- def todo_list(ctx: AnyContext):
84
+ def list_todo(ctx: AnyContext):
85
85
  todo_file_path = os.path.join(TODO_DIR, "todo.txt")
86
86
  todo_tasks: list[TodoTaskModel] = []
87
87
  if os.path.isfile(todo_file_path):
@@ -96,7 +96,7 @@ def todo_list(ctx: AnyContext):
96
96
  group=todo_group,
97
97
  alias="complete",
98
98
  )
99
- def todo_complete(ctx: AnyContext):
99
+ def complete_todo(ctx: AnyContext):
100
100
  todo_file_path = os.path.join(TODO_DIR, "todo.txt")
101
101
  todo_list: list[TodoTaskModel] = []
102
102
  if os.path.isfile(todo_file_path):
@@ -142,7 +142,7 @@ def todo_complete(ctx: AnyContext):
142
142
  group=todo_group,
143
143
  alias="log",
144
144
  )
145
- def todo_log(ctx: AnyContext):
145
+ def log_todo(ctx: AnyContext):
146
146
  todo_file_path = os.path.join(TODO_DIR, "todo.txt")
147
147
  todo_list: list[TodoTaskModel] = []
148
148
  if os.path.isfile(todo_file_path):
@@ -156,7 +156,6 @@ def todo_log(ctx: AnyContext):
156
156
  todo_task = cascade_todo_task(todo_task)
157
157
  current_duration = todo_task.keyval.get("duration", "0")
158
158
  todo_task.keyval["duration"] = add_durations(current_duration, ctx.input.duration)
159
- print(current_duration, todo_task.keyval)
160
159
  # Save todo list
161
160
  save_todo_list(todo_file_path, todo_list)
162
161
  # Add log work
@@ -197,7 +196,7 @@ def _get_default_start() -> str:
197
196
  group=todo_group,
198
197
  alias="edit",
199
198
  )
200
- def todo_edit(ctx: AnyContext):
199
+ def edit_todo(ctx: AnyContext):
201
200
  todo_list = [
202
201
  cascade_todo_task(line_to_todo_task(line))
203
202
  for line in ctx.input.text.split("\n")
@@ -49,6 +49,9 @@ LOGGING_LEVEL = _get_log_level(os.getenv("ZRB_LOGGING_LEVEL", "WARNING"))
49
49
  LOAD_BUILTIN = to_boolean(os.getenv("ZRB_LOAD_BUILTIN", "1"))
50
50
  ENV_PREFIX = os.getenv("ZRB_ENV", "")
51
51
  SHOW_PROMPT = to_boolean(os.getenv("ZRB_SHOW_PROMPT", "1"))
52
+ WARN_UNRECOMMENDED_COMMAND = to_boolean(
53
+ os.getenv("ZRB_WARN_UNRECOMMENDED_COMMAND", "1")
54
+ )
52
55
  SESSION_LOG_DIR = os.getenv(
53
56
  "ZRB_SESSION_LOG_DIR", os.path.expanduser(os.path.join("~", ".zrb-session"))
54
57
  )
@@ -77,7 +80,7 @@ BANNER = f"""
77
80
  zzzzz rr bbbbbb {VERSION} Janggala
78
81
  _ _ . . . _ . _ . . .
79
82
 
80
- A Framework to Enhance Your Workflow
83
+ Your Automation Powerhouse
81
84
 
82
85
  ☕ Donate at: https://stalchmst.com/donation
83
86
  🐙 Submit issues/PR at: https://github.com/state-alchemists/zrb
@@ -142,9 +142,3 @@ def create_app(root_group: AnyGroup, port: int = WEB_HTTP_PORT):
142
142
  raise HTTPException(status_code=500, detail=str(e))
143
143
 
144
144
  return app
145
-
146
-
147
- # async def run_web_server(app: FastAPI, port: int = WEB_HTTP_PORT):
148
- # config = Config(app=app, host="0.0.0.0", port=port, loop="asyncio")
149
- # server = Server(config)
150
- # await server.serve()
@@ -74,6 +74,12 @@ class AnyTask(ABC):
74
74
  """Task fallbacks"""
75
75
  pass
76
76
 
77
+ @property
78
+ @abstractmethod
79
+ def successors(self) -> list["AnyTask"]:
80
+ """Task successors"""
81
+ pass
82
+
77
83
  @property
78
84
  @abstractmethod
79
85
  def readiness_checks(self) -> list["AnyTask"]:
@@ -81,8 +87,38 @@ class AnyTask(ABC):
81
87
  pass
82
88
 
83
89
  @abstractmethod
84
- def append_upstreams(self, upstreams: "AnyTask" | list["AnyTask"]):
85
- """Sets the upstream tasks that this task depends on.
90
+ def append_fallback(self, fallbacks: "AnyTask" | list["AnyTask"]):
91
+ """Add the fallback tasks.
92
+
93
+ Args:
94
+ fallbacks (AnyTask | list[AnyTask]): A single fallback task or
95
+ a list of fallback tasks.
96
+ """
97
+ pass
98
+
99
+ @abstractmethod
100
+ def append_successor(self, successors: "AnyTask" | list["AnyTask"]):
101
+ """Add the successor tasks.
102
+
103
+ Args:
104
+ successors (AnyTask | list[AnyTask]): A single successor task or
105
+ a list of successor tasks.
106
+ """
107
+ pass
108
+
109
+ @abstractmethod
110
+ def append_readiness_check(self, readiness_checks: "AnyTask" | list["AnyTask"]):
111
+ """Add the readiness_check tasks.
112
+
113
+ Args:
114
+ readiness_checks (AnyTask | list[AnyTask]): A single readiness_check task or
115
+ a list of readiness_check tasks.
116
+ """
117
+ pass
118
+
119
+ @abstractmethod
120
+ def append_upstream(self, upstreams: "AnyTask" | list["AnyTask"]):
121
+ """Add the upstream tasks that this task depends on.
86
122
 
87
123
  Args:
88
124
  upstreams (AnyTask | list[AnyTask]): A single upstream task or