womm-cli 4.0.0__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 (240) hide show
  1. womm_cli-4.0.0/.github/dependabot.yml +16 -0
  2. womm_cli-4.0.0/.github/workflows/00-install-deps.yml +30 -0
  3. womm_cli-4.0.0/.github/workflows/01-ci.yml +98 -0
  4. womm_cli-4.0.0/.github/workflows/02-tag-sync.yml +91 -0
  5. womm_cli-4.0.0/.github/workflows/03-publish.yml +241 -0
  6. womm_cli-4.0.0/.github/workflows/04-docs.yml +28 -0
  7. womm_cli-4.0.0/.github/workflows/README.md +492 -0
  8. womm_cli-4.0.0/.gitignore +310 -0
  9. womm_cli-4.0.0/.markdownlint.yaml +38 -0
  10. womm_cli-4.0.0/.pre-commit-config.yaml +102 -0
  11. womm_cli-4.0.0/.python-version +1 -0
  12. womm_cli-4.0.0/.scripts/dev/check_merge_conflict.py +36 -0
  13. womm_cli-4.0.0/.scripts/dev/check_toml.py +26 -0
  14. womm_cli-4.0.0/.scripts/dev/check_yaml.py +36 -0
  15. womm_cli-4.0.0/.scripts/dev/generate_architecture_graph.py +401 -0
  16. womm_cli-4.0.0/.scripts/dev/update_version.py +125 -0
  17. womm_cli-4.0.0/AGENTS.md +0 -0
  18. womm_cli-4.0.0/LICENSE +21 -0
  19. womm_cli-4.0.0/PKG-INFO +203 -0
  20. womm_cli-4.0.0/README.md +172 -0
  21. womm_cli-4.0.0/TODO.md +87 -0
  22. womm_cli-4.0.0/cliff.toml +56 -0
  23. womm_cli-4.0.0/mkdocs.yml +146 -0
  24. womm_cli-4.0.0/pyproject.toml +501 -0
  25. womm_cli-4.0.0/requirements-dev.in +19 -0
  26. womm_cli-4.0.0/requirements.in +4 -0
  27. womm_cli-4.0.0/src/womm/__init__.py +53 -0
  28. womm_cli-4.0.0/src/womm/__main__.py +48 -0
  29. womm_cli-4.0.0/src/womm/_version.py +10 -0
  30. womm_cli-4.0.0/src/womm/assets/copier/meta/copier.yml +15 -0
  31. womm_cli-4.0.0/src/womm/assets/copier/meta/template/README.md.jinja +32 -0
  32. womm_cli-4.0.0/src/womm/assets/copier/meta/template/copier.yml.jinja +13 -0
  33. womm_cli-4.0.0/src/womm/assets/copier/meta/template/template/.gitkeep +0 -0
  34. womm_cli-4.0.0/src/womm/assets/copier/official/javascript/copier.yml +104 -0
  35. womm_cli-4.0.0/src/womm/assets/copier/official/javascript/template/.gitignore.jinja +35 -0
  36. womm_cli-4.0.0/src/womm/assets/copier/official/javascript/template/.nvmrc.jinja +1 -0
  37. womm_cli-4.0.0/src/womm/assets/copier/official/javascript/template/.prettierignore.jinja +10 -0
  38. womm_cli-4.0.0/src/womm/assets/copier/official/javascript/template/README.md.jinja +81 -0
  39. womm_cli-4.0.0/src/womm/assets/copier/official/javascript/template/biome.json.jinja +54 -0
  40. womm_cli-4.0.0/src/womm/assets/copier/official/javascript/template/eslint.config.mjs.jinja +51 -0
  41. womm_cli-4.0.0/src/womm/assets/copier/official/javascript/template/index.html.jinja +12 -0
  42. womm_cli-4.0.0/src/womm/assets/copier/official/javascript/template/package.json.jinja +88 -0
  43. womm_cli-4.0.0/src/womm/assets/copier/official/javascript/template/prettier.config.mjs.jinja +8 -0
  44. womm_cli-4.0.0/src/womm/assets/copier/official/javascript/template/src/App.jsx.jinja +10 -0
  45. womm_cli-4.0.0/src/womm/assets/copier/official/javascript/template/src/App.tsx.jinja +10 -0
  46. womm_cli-4.0.0/src/womm/assets/copier/official/javascript/template/src/App.vue.jinja +18 -0
  47. womm_cli-4.0.0/src/womm/assets/copier/official/javascript/template/src/index.jsx.jinja +10 -0
  48. womm_cli-4.0.0/src/womm/assets/copier/official/javascript/template/src/index.tsx.jinja +11 -0
  49. womm_cli-4.0.0/src/womm/assets/copier/official/javascript/template/src/main.js.jinja +21 -0
  50. womm_cli-4.0.0/src/womm/assets/copier/official/javascript/template/src/main.ts.jinja +21 -0
  51. womm_cli-4.0.0/src/womm/assets/copier/official/javascript/template/tsconfig.json.jinja +35 -0
  52. womm_cli-4.0.0/src/womm/assets/copier/official/javascript/template/vite.config.mjs.jinja +10 -0
  53. womm_cli-4.0.0/src/womm/assets/copier/official/javascript/template/{% if with_ci %}.github{% endif %}/workflows/ci.yml.jinja +63 -0
  54. womm_cli-4.0.0/src/womm/assets/copier/official/javascript/template/{% if with_tests %}tests{% endif %}/smoke.test.js.jinja +12 -0
  55. womm_cli-4.0.0/src/womm/assets/copier/official/javascript/template/{% if with_tests %}tests{% endif %}/smoke.test.ts.jinja +12 -0
  56. womm_cli-4.0.0/src/womm/assets/copier/official/javascript/template/{% if with_vscode %}.vscode{% endif %}/extensions.json.jinja +4 -0
  57. womm_cli-4.0.0/src/womm/assets/copier/official/javascript/template/{% if with_vscode %}.vscode{% endif %}/settings.json.jinja +27 -0
  58. womm_cli-4.0.0/src/womm/assets/copier/official/python/copier.yml +107 -0
  59. womm_cli-4.0.0/src/womm/assets/copier/official/python/template/.gitignore.jinja +40 -0
  60. womm_cli-4.0.0/src/womm/assets/copier/official/python/template/.pre-commit-config.yaml.jinja +19 -0
  61. womm_cli-4.0.0/src/womm/assets/copier/official/python/template/.python-version.jinja +1 -0
  62. womm_cli-4.0.0/src/womm/assets/copier/official/python/template/README.md.jinja +83 -0
  63. womm_cli-4.0.0/src/womm/assets/copier/official/python/template/pyproject.toml.jinja +114 -0
  64. womm_cli-4.0.0/src/womm/assets/copier/official/python/template/{% if framework == 'django' %}manage.py{% endif %}.jinja +23 -0
  65. womm_cli-4.0.0/src/womm/assets/copier/official/python/template/{% if not use_src_layout %}{{ package_name }}{% endif %}/__init__.py.jinja +3 -0
  66. womm_cli-4.0.0/src/womm/assets/copier/official/python/template/{% if not use_src_layout %}{{ package_name }}{% endif %}/asgi.py.jinja +9 -0
  67. womm_cli-4.0.0/src/womm/assets/copier/official/python/template/{% if not use_src_layout %}{{ package_name }}{% endif %}/core/__init__.py.jinja +0 -0
  68. womm_cli-4.0.0/src/womm/assets/copier/official/python/template/{% if not use_src_layout %}{{ package_name }}{% endif %}/core/apps.py.jinja +10 -0
  69. womm_cli-4.0.0/src/womm/assets/copier/official/python/template/{% if not use_src_layout %}{{ package_name }}{% endif %}/core/models.py.jinja +1 -0
  70. womm_cli-4.0.0/src/womm/assets/copier/official/python/template/{% if not use_src_layout %}{{ package_name }}{% endif %}/core/views.py.jinja +8 -0
  71. womm_cli-4.0.0/src/womm/assets/copier/official/python/template/{% if not use_src_layout %}{{ package_name }}{% endif %}/py.typed +0 -0
  72. womm_cli-4.0.0/src/womm/assets/copier/official/python/template/{% if not use_src_layout %}{{ package_name }}{% endif %}/settings.py.jinja +81 -0
  73. womm_cli-4.0.0/src/womm/assets/copier/official/python/template/{% if not use_src_layout %}{{ package_name }}{% endif %}/urls.py.jinja +11 -0
  74. womm_cli-4.0.0/src/womm/assets/copier/official/python/template/{% if not use_src_layout %}{{ package_name }}{% endif %}/wsgi.py.jinja +9 -0
  75. womm_cli-4.0.0/src/womm/assets/copier/official/python/template/{% if use_src_layout %}src{% endif %}/{{ package_name }}/__init__.py.jinja +3 -0
  76. womm_cli-4.0.0/src/womm/assets/copier/official/python/template/{% if use_src_layout %}src{% endif %}/{{ package_name }}/asgi.py.jinja +9 -0
  77. womm_cli-4.0.0/src/womm/assets/copier/official/python/template/{% if use_src_layout %}src{% endif %}/{{ package_name }}/core/__init__.py.jinja +0 -0
  78. womm_cli-4.0.0/src/womm/assets/copier/official/python/template/{% if use_src_layout %}src{% endif %}/{{ package_name }}/core/apps.py.jinja +10 -0
  79. womm_cli-4.0.0/src/womm/assets/copier/official/python/template/{% if use_src_layout %}src{% endif %}/{{ package_name }}/core/models.py.jinja +1 -0
  80. womm_cli-4.0.0/src/womm/assets/copier/official/python/template/{% if use_src_layout %}src{% endif %}/{{ package_name }}/core/views.py.jinja +8 -0
  81. womm_cli-4.0.0/src/womm/assets/copier/official/python/template/{% if use_src_layout %}src{% endif %}/{{ package_name }}/py.typed +0 -0
  82. womm_cli-4.0.0/src/womm/assets/copier/official/python/template/{% if use_src_layout %}src{% endif %}/{{ package_name }}/settings.py.jinja +81 -0
  83. womm_cli-4.0.0/src/womm/assets/copier/official/python/template/{% if use_src_layout %}src{% endif %}/{{ package_name }}/urls.py.jinja +11 -0
  84. womm_cli-4.0.0/src/womm/assets/copier/official/python/template/{% if use_src_layout %}src{% endif %}/{{ package_name }}/wsgi.py.jinja +9 -0
  85. womm_cli-4.0.0/src/womm/assets/copier/official/python/template/{% if with_ci %}.github{% endif %}/workflows/ci.yml.jinja +78 -0
  86. womm_cli-4.0.0/src/womm/assets/copier/official/python/template/{% if with_tests %}tests{% endif %}/test_smoke.py.jinja +16 -0
  87. womm_cli-4.0.0/src/womm/assets/copier/official/python/template/{% if with_vscode %}.vscode{% endif %}/extensions.json.jinja +8 -0
  88. womm_cli-4.0.0/src/womm/assets/copier/official/python/template/{% if with_vscode %}.vscode{% endif %}/settings.json.jinja +28 -0
  89. womm_cli-4.0.0/src/womm/bin/refresh_env.cmd +130 -0
  90. womm_cli-4.0.0/src/womm/cli.py +111 -0
  91. womm_cli-4.0.0/src/womm/commands/__init__.py +30 -0
  92. womm_cli-4.0.0/src/womm/commands/core/__init__.py +29 -0
  93. womm_cli-4.0.0/src/womm/commands/core/doctor.py +52 -0
  94. womm_cli-4.0.0/src/womm/commands/core/path.py +337 -0
  95. womm_cli-4.0.0/src/womm/commands/project/__init__.py +31 -0
  96. womm_cli-4.0.0/src/womm/commands/project/create.py +128 -0
  97. womm_cli-4.0.0/src/womm/commands/project/setup.py +438 -0
  98. womm_cli-4.0.0/src/womm/commands/project/template.py +160 -0
  99. womm_cli-4.0.0/src/womm/commands/system/__init__.py +31 -0
  100. womm_cli-4.0.0/src/womm/commands/system/context/__init__.py +82 -0
  101. womm_cli-4.0.0/src/womm/commands/system/context/backup.py +344 -0
  102. womm_cli-4.0.0/src/womm/commands/system/context/inventory.py +111 -0
  103. womm_cli-4.0.0/src/womm/commands/system/context/registration.py +290 -0
  104. womm_cli-4.0.0/src/womm/commands/system/deps.py +165 -0
  105. womm_cli-4.0.0/src/womm/commands/system/system.py +130 -0
  106. womm_cli-4.0.0/src/womm/exceptions/__init__.py +69 -0
  107. womm_cli-4.0.0/src/womm/exceptions/common/__init__.py +55 -0
  108. womm_cli-4.0.0/src/womm/exceptions/common/command_service.py +91 -0
  109. womm_cli-4.0.0/src/womm/exceptions/common/file_service.py +60 -0
  110. womm_cli-4.0.0/src/womm/exceptions/common/security_service.py +44 -0
  111. womm_cli-4.0.0/src/womm/exceptions/common/validation_service.py +70 -0
  112. womm_cli-4.0.0/src/womm/exceptions/context/__init__.py +27 -0
  113. womm_cli-4.0.0/src/womm/exceptions/context/context_service.py +55 -0
  114. womm_cli-4.0.0/src/womm/exceptions/project/__init__.py +29 -0
  115. womm_cli-4.0.0/src/womm/exceptions/project/project_service.py +59 -0
  116. womm_cli-4.0.0/src/womm/exceptions/system/__init__.py +25 -0
  117. womm_cli-4.0.0/src/womm/exceptions/system/system_service.py +53 -0
  118. womm_cli-4.0.0/src/womm/interfaces/__init__.py +71 -0
  119. womm_cli-4.0.0/src/womm/interfaces/context/__init__.py +34 -0
  120. womm_cli-4.0.0/src/womm/interfaces/context/menu_interface.py +686 -0
  121. womm_cli-4.0.0/src/womm/interfaces/context/registry_interface.py +562 -0
  122. womm_cli-4.0.0/src/womm/interfaces/context/script_detector_interface.py +208 -0
  123. womm_cli-4.0.0/src/womm/interfaces/context/script_registrar.py +264 -0
  124. womm_cli-4.0.0/src/womm/interfaces/core/__init__.py +26 -0
  125. womm_cli-4.0.0/src/womm/interfaces/core/doctor_interface.py +102 -0
  126. womm_cli-4.0.0/src/womm/interfaces/dependencies/__init__.py +28 -0
  127. womm_cli-4.0.0/src/womm/interfaces/dependencies/deps_interface.py +160 -0
  128. womm_cli-4.0.0/src/womm/interfaces/project/__init__.py +36 -0
  129. womm_cli-4.0.0/src/womm/interfaces/project/create_interface.py +162 -0
  130. womm_cli-4.0.0/src/womm/interfaces/project/detection_interface.py +181 -0
  131. womm_cli-4.0.0/src/womm/interfaces/project/manager_interface.py +99 -0
  132. womm_cli-4.0.0/src/womm/interfaces/project/setup_interface.py +477 -0
  133. womm_cli-4.0.0/src/womm/interfaces/project/template_store_interface.py +196 -0
  134. womm_cli-4.0.0/src/womm/interfaces/system/__init__.py +32 -0
  135. womm_cli-4.0.0/src/womm/interfaces/system/detector_interface.py +84 -0
  136. womm_cli-4.0.0/src/womm/interfaces/system/environment_interface.py +110 -0
  137. womm_cli-4.0.0/src/womm/interfaces/system/path_interface.py +570 -0
  138. womm_cli-4.0.0/src/womm/services/__init__.py +70 -0
  139. womm_cli-4.0.0/src/womm/services/common/__init__.py +33 -0
  140. womm_cli-4.0.0/src/womm/services/common/base_validation_service.py +450 -0
  141. womm_cli-4.0.0/src/womm/services/common/command_runner_service.py +647 -0
  142. womm_cli-4.0.0/src/womm/services/common/file_scanner_service.py +483 -0
  143. womm_cli-4.0.0/src/womm/services/common/security_validator_service.py +348 -0
  144. womm_cli-4.0.0/src/womm/services/context/__init__.py +37 -0
  145. womm_cli-4.0.0/src/womm/services/context/backup_entries.py +148 -0
  146. womm_cli-4.0.0/src/womm/services/context/parameters.py +515 -0
  147. womm_cli-4.0.0/src/womm/services/context/registry_paths.py +56 -0
  148. womm_cli-4.0.0/src/womm/services/context/registry_service.py +573 -0
  149. womm_cli-4.0.0/src/womm/services/context/validation_service.py +691 -0
  150. womm_cli-4.0.0/src/womm/services/dependencies/__init__.py +29 -0
  151. womm_cli-4.0.0/src/womm/services/dependencies/probe.py +102 -0
  152. womm_cli-4.0.0/src/womm/services/project/__init__.py +48 -0
  153. womm_cli-4.0.0/src/womm/services/project/copier_project_creation_service.py +111 -0
  154. womm_cli-4.0.0/src/womm/services/project/destination_guard.py +96 -0
  155. womm_cli-4.0.0/src/womm/services/project/detection_service.py +354 -0
  156. womm_cli-4.0.0/src/womm/services/project/env_utils.py +333 -0
  157. womm_cli-4.0.0/src/womm/services/project/javascript_environment_service.py +348 -0
  158. womm_cli-4.0.0/src/womm/services/project/python_environment_service.py +245 -0
  159. womm_cli-4.0.0/src/womm/services/project/setup_profile_resolver.py +146 -0
  160. womm_cli-4.0.0/src/womm/services/project/template_store_service.py +344 -0
  161. womm_cli-4.0.0/src/womm/services/project/validation_service.py +418 -0
  162. womm_cli-4.0.0/src/womm/services/system/__init__.py +32 -0
  163. womm_cli-4.0.0/src/womm/services/system/detector_service.py +704 -0
  164. womm_cli-4.0.0/src/womm/services/system/environment_service.py +494 -0
  165. womm_cli-4.0.0/src/womm/services/system/path_service.py +642 -0
  166. womm_cli-4.0.0/src/womm/shared/__init__.py +30 -0
  167. womm_cli-4.0.0/src/womm/shared/configs/__init__.py +51 -0
  168. womm_cli-4.0.0/src/womm/shared/configs/context/__init__.py +43 -0
  169. womm_cli-4.0.0/src/womm/shared/configs/context/context_config.py +125 -0
  170. womm_cli-4.0.0/src/womm/shared/configs/context/context_file_types_config.py +159 -0
  171. womm_cli-4.0.0/src/womm/shared/configs/context/context_limits_config.py +187 -0
  172. womm_cli-4.0.0/src/womm/shared/configs/context/context_paths_config.py +115 -0
  173. womm_cli-4.0.0/src/womm/shared/configs/context/context_types_config.py +65 -0
  174. womm_cli-4.0.0/src/womm/shared/configs/context/script_config.py +219 -0
  175. womm_cli-4.0.0/src/womm/shared/configs/dependencies/__init__.py +32 -0
  176. womm_cli-4.0.0/src/womm/shared/configs/dependencies/runtime_config.py +46 -0
  177. womm_cli-4.0.0/src/womm/shared/configs/dependencies/runtime_package_manager_config.py +48 -0
  178. womm_cli-4.0.0/src/womm/shared/configs/logging_config.py +89 -0
  179. womm_cli-4.0.0/src/womm/shared/configs/project/__init__.py +33 -0
  180. womm_cli-4.0.0/src/womm/shared/configs/project/project_config.py +109 -0
  181. womm_cli-4.0.0/src/womm/shared/configs/project/project_structure_config.py +88 -0
  182. womm_cli-4.0.0/src/womm/shared/configs/project/python_project_config.py +165 -0
  183. womm_cli-4.0.0/src/womm/shared/configs/security/__init__.py +26 -0
  184. womm_cli-4.0.0/src/womm/shared/configs/security/security_patterns_config.py +242 -0
  185. womm_cli-4.0.0/src/womm/shared/configs/system/__init__.py +28 -0
  186. womm_cli-4.0.0/src/womm/shared/configs/system/system_detector_config.py +210 -0
  187. womm_cli-4.0.0/src/womm/shared/configs/system/system_environment_config.py +101 -0
  188. womm_cli-4.0.0/src/womm/shared/models/__init__.py +13 -0
  189. womm_cli-4.0.0/src/womm/shared/models/template_source.py +65 -0
  190. womm_cli-4.0.0/src/womm/shared/paths.py +192 -0
  191. womm_cli-4.0.0/src/womm/shared/results/__init__.py +138 -0
  192. womm_cli-4.0.0/src/womm/shared/results/base.py +85 -0
  193. womm_cli-4.0.0/src/womm/shared/results/command_results.py +61 -0
  194. womm_cli-4.0.0/src/womm/shared/results/context_results.py +345 -0
  195. womm_cli-4.0.0/src/womm/shared/results/dependency_results.py +110 -0
  196. womm_cli-4.0.0/src/womm/shared/results/doctor_results.py +41 -0
  197. womm_cli-4.0.0/src/womm/shared/results/file_results.py +97 -0
  198. womm_cli-4.0.0/src/womm/shared/results/project_results.py +163 -0
  199. womm_cli-4.0.0/src/womm/shared/results/security_results.py +128 -0
  200. womm_cli-4.0.0/src/womm/shared/results/system_results.py +268 -0
  201. womm_cli-4.0.0/src/womm/shared/results/template_results.py +43 -0
  202. womm_cli-4.0.0/src/womm/shared/runtime.py +36 -0
  203. womm_cli-4.0.0/src/womm/ui/__init__.py +31 -0
  204. womm_cli-4.0.0/src/womm/ui/common/__init__.py +39 -0
  205. womm_cli-4.0.0/src/womm/ui/common/interactive_menu.py +246 -0
  206. womm_cli-4.0.0/src/womm/ui/common/logging.py +184 -0
  207. womm_cli-4.0.0/src/womm/ui/common/prompts.py +93 -0
  208. womm_cli-4.0.0/src/womm/ui/context/__init__.py +31 -0
  209. womm_cli-4.0.0/src/womm/ui/context/display.py +485 -0
  210. womm_cli-4.0.0/src/womm/ui/context/menu_display.py +189 -0
  211. womm_cli-4.0.0/src/womm/ui/context/wizard.py +557 -0
  212. womm_cli-4.0.0/src/womm/ui/project/__init__.py +42 -0
  213. womm_cli-4.0.0/src/womm/ui/project/create/create_completion_summaries.py +55 -0
  214. womm_cli-4.0.0/src/womm/ui/project/project_wizard.py +174 -0
  215. womm_cli-4.0.0/src/womm/ui/project/setup/setup_completion_summaries.py +111 -0
  216. womm_cli-4.0.0/src/womm/ui/project/templates/template_store_display.py +128 -0
  217. womm_cli-4.0.0/src/womm/ui/system/__init__.py +60 -0
  218. womm_cli-4.0.0/src/womm/ui/system/display.py +531 -0
  219. womm_cli-4.0.0/src/womm/ui/system/path_display.py +387 -0
  220. womm_cli-4.0.0/src/womm/utils/__init__.py +23 -0
  221. womm_cli-4.0.0/src/womm/utils/common/__init__.py +49 -0
  222. womm_cli-4.0.0/src/womm/utils/common/file_scanner_utils.py +110 -0
  223. womm_cli-4.0.0/src/womm/utils/common/path_resolver_utils.py +127 -0
  224. womm_cli-4.0.0/src/womm/utils/common/safe_fs_utils.py +135 -0
  225. womm_cli-4.0.0/src/womm/utils/context/__init__.py +54 -0
  226. womm_cli-4.0.0/src/womm/utils/context/core_utils.py +345 -0
  227. womm_cli-4.0.0/src/womm/utils/context/icon_utils.py +259 -0
  228. womm_cli-4.0.0/src/womm/utils/project/__init__.py +106 -0
  229. womm_cli-4.0.0/src/womm/utils/project/asset_utils.py +154 -0
  230. womm_cli-4.0.0/src/womm/utils/project/core_utils.py +391 -0
  231. womm_cli-4.0.0/src/womm/utils/project/file_utils.py +494 -0
  232. womm_cli-4.0.0/src/womm/utils/project/platform_utils.py +170 -0
  233. womm_cli-4.0.0/src/womm/utils/project/validation_utils.py +273 -0
  234. womm_cli-4.0.0/src/womm/utils/security/__init__.py +46 -0
  235. womm_cli-4.0.0/src/womm/utils/security/security_validation_utils.py +258 -0
  236. womm_cli-4.0.0/src/womm/utils/system/__init__.py +69 -0
  237. womm_cli-4.0.0/src/womm/utils/system/detector_utils.py +299 -0
  238. womm_cli-4.0.0/src/womm/utils/system/environment_utils.py +172 -0
  239. womm_cli-4.0.0/src/womm/utils/system/path_utils.py +101 -0
  240. womm_cli-4.0.0/uv.lock +2104 -0
@@ -0,0 +1,16 @@
1
+ # To get started with Dependabot version updates, you'll need to specify which
2
+ # package ecosystems to update and where the package manifests are located.
3
+ # Please see the documentation for all configuration options:
4
+ # https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5
+
6
+ version: 2
7
+ updates:
8
+ - package-ecosystem: pip
9
+ directory: /
10
+ schedule:
11
+ interval: weekly
12
+
13
+ - package-ecosystem: github-actions
14
+ directory: /
15
+ schedule:
16
+ interval: weekly
@@ -0,0 +1,30 @@
1
+ name: 00 · Install Deps
2
+
3
+ # Logic-free cache primer: warms the uv download cache (keyed on uv.lock by
4
+ # setup-uv) so every downstream job that repeats `uv sync` gets a cache hit
5
+ # instead of a network resolve. Called via workflow_call by 01-ci and others.
6
+
7
+ on:
8
+ workflow_call:
9
+ inputs:
10
+ python-version:
11
+ required: false
12
+ type: string
13
+ default: "3.13"
14
+
15
+ permissions: {}
16
+
17
+ jobs:
18
+ install:
19
+ name: Install & cache deps
20
+ runs-on: ubuntu-24.04
21
+ timeout-minutes: 10
22
+ permissions:
23
+ contents: read
24
+ steps:
25
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
26
+ - uses: astral-sh/setup-uv@18d369b23da25a81e9458561248e1aafff6a70fa # v10.3.1
27
+ with:
28
+ python-version: ${{ inputs.python-version }}
29
+ enable-cache: true
30
+ - run: uv sync --frozen --no-build --all-groups
@@ -0,0 +1,98 @@
1
+ name: 01 · CI
2
+
3
+ on:
4
+ pull_request:
5
+ branches: [main]
6
+ workflow_call:
7
+ workflow_dispatch:
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ concurrency:
13
+ group: ci-${{ github.ref }}
14
+ cancel-in-progress: ${{ github.event_name == 'pull_request' }}
15
+
16
+ jobs:
17
+ install-deps:
18
+ name: Install & cache deps
19
+ uses: ./.github/workflows/00-install-deps.yml
20
+
21
+ quality:
22
+ name: Lint & format
23
+ needs: [install-deps]
24
+ runs-on: ubuntu-24.04
25
+ timeout-minutes: 15
26
+ permissions:
27
+ contents: read
28
+ steps:
29
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
30
+ - uses: astral-sh/setup-uv@18d369b23da25a81e9458561248e1aafff6a70fa # v10.3.1
31
+ with:
32
+ python-version: "3.13"
33
+ enable-cache: true
34
+ - run: uv sync --frozen --no-build --group dev
35
+ - run: uv run --no-sync poe format-check
36
+ - run: uv run --no-sync poe lint
37
+
38
+ type-check:
39
+ name: Type check & contracts
40
+ needs: [install-deps]
41
+ runs-on: ubuntu-24.04
42
+ timeout-minutes: 15
43
+ permissions:
44
+ contents: read
45
+ steps:
46
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
47
+ - uses: astral-sh/setup-uv@18d369b23da25a81e9458561248e1aafff6a70fa # v10.3.1
48
+ with:
49
+ python-version: "3.13"
50
+ enable-cache: true
51
+ - run: uv sync --frozen --no-build --group dev
52
+ - run: uv run --no-sync poe typecheck
53
+ - run: uv run --no-sync poe imports
54
+
55
+ security:
56
+ name: Security scan
57
+ needs: [install-deps]
58
+ runs-on: ubuntu-24.04
59
+ timeout-minutes: 15
60
+ permissions:
61
+ contents: read
62
+ steps:
63
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
64
+ - uses: astral-sh/setup-uv@18d369b23da25a81e9458561248e1aafff6a70fa # v10.3.1
65
+ with:
66
+ python-version: "3.13"
67
+ enable-cache: true
68
+ - run: uv sync --frozen --no-build --group dev
69
+ - run: uv run --no-sync poe security
70
+
71
+ test:
72
+ name: Tests (${{ matrix.os }}, Python 3.13)
73
+ needs: [quality, type-check]
74
+ runs-on: ${{ matrix.os }}
75
+ timeout-minutes: 25
76
+ permissions:
77
+ contents: read
78
+ strategy:
79
+ fail-fast: false
80
+ matrix:
81
+ os: [ubuntu-24.04, windows-latest]
82
+ steps:
83
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
84
+ - uses: astral-sh/setup-uv@18d369b23da25a81e9458561248e1aafff6a70fa # v10.3.1
85
+ with:
86
+ python-version: "3.13"
87
+ enable-cache: true
88
+ - run: uv sync --frozen --no-build --group dev
89
+ - run: uv run --no-sync poe test-ci
90
+ - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
91
+ if: always()
92
+ with:
93
+ name: coverage-${{ matrix.os }}
94
+ path: |
95
+ coverage.xml
96
+ htmlcov/
97
+ if-no-files-found: ignore
98
+ retention-days: 7
@@ -0,0 +1,91 @@
1
+ name: 02 · Tag Sync
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ workflow_dispatch:
7
+
8
+ permissions:
9
+ contents: read
10
+
11
+ concurrency:
12
+ group: tag-sync-${{ github.ref }}
13
+ cancel-in-progress: false
14
+
15
+ jobs:
16
+ ci:
17
+ name: CI gate
18
+ uses: ./.github/workflows/01-ci.yml
19
+
20
+ tag-sync:
21
+ name: Tag sync
22
+ needs: ci
23
+ runs-on: ubuntu-24.04
24
+ timeout-minutes: 15
25
+ permissions:
26
+ contents: write
27
+ outputs:
28
+ version: ${{ steps.version.outputs.version }}
29
+ tag_action: ${{ steps.gate.outputs.tag_action }}
30
+ steps:
31
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
32
+ with:
33
+ fetch-depth: 0
34
+ - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
35
+ with:
36
+ python-version: "3.13"
37
+ - name: Resolve version
38
+ id: version
39
+ run: |
40
+ VERSION=$(python -c "import pathlib, tomllib; print(tomllib.loads(pathlib.Path('pyproject.toml').read_text(encoding='utf-8'))['project']['version'])")
41
+ echo "version=$VERSION" >> "$GITHUB_OUTPUT"
42
+ - name: Determine tag action
43
+ id: gate
44
+ env:
45
+ VERSION: ${{ steps.version.outputs.version }}
46
+ run: |
47
+ if [ "$GITHUB_REF" != refs/heads/main ]; then
48
+ echo "tag_action=preview" >> "$GITHUB_OUTPUT"
49
+ elif git rev-parse -q --verify "refs/tags/v$VERSION" >/dev/null; then
50
+ echo "tag_action=skip" >> "$GITHUB_OUTPUT"
51
+ else
52
+ echo "tag_action=create" >> "$GITHUB_OUTPUT"
53
+ fi
54
+ - name: Configure git
55
+ if: steps.gate.outputs.tag_action == 'create'
56
+ run: |
57
+ git config user.name "github-actions[bot]"
58
+ git config user.email "github-actions[bot]@users.noreply.github.com"
59
+ - name: Create tag & move alias
60
+ if: steps.gate.outputs.tag_action == 'create'
61
+ env:
62
+ VERSION: ${{ steps.version.outputs.version }}
63
+ run: |
64
+ git tag "v$VERSION"
65
+ git push origin "v$VERSION"
66
+ ALIAS="v${VERSION%%.*}-latest"
67
+ git tag -f "$ALIAS"
68
+ git push origin --force "$ALIAS"
69
+
70
+ publish:
71
+ name: Publish (PyPI)
72
+ needs: tag-sync
73
+ # A called workflow cannot request more than the caller grants: without
74
+ # this block the nested publish job inherits `id-token: none` and the
75
+ # whole workflow fails validation before any job starts.
76
+ permissions:
77
+ contents: read
78
+ id-token: write # OIDC trusted publishing — no secrets passed
79
+ uses: ./.github/workflows/03-publish.yml
80
+ # Both inputs are passed explicitly: 03 re-reads pyproject.toml and
81
+ # refuses to publish if the two disagree, and it gates the irreversible
82
+ # upload on tag_action — which is `create` only when this job has just
83
+ # pushed a new tag.
84
+ with:
85
+ version: ${{ needs.tag-sync.outputs.version }}
86
+ tag_action: ${{ needs.tag-sync.outputs.tag_action }}
87
+
88
+ docs:
89
+ name: Docs
90
+ needs: publish
91
+ uses: ./.github/workflows/04-docs.yml
@@ -0,0 +1,241 @@
1
+ name: 03 · Publish
2
+
3
+ # Build + package on every mode; upload to PyPI only when `tag_action` is
4
+ # `create` (a real release). Gating is keyed on the `tag_action` INPUT, never on
5
+ # github.event_name: in a reusable workflow the event is inherited from the
6
+ # caller (`push`), so an `event_name == 'workflow_call'` check never matches —
7
+ # and an `event_name == 'workflow_dispatch'` escape hatch would let a manual run
8
+ # from an arbitrary ref fire the irreversible PyPI upload. A manual dispatch
9
+ # therefore defaults to `preview` and must opt in explicitly.
10
+ #
11
+ # A dispatch has no upstream CI gate (02-tag-sync runs 01-ci before calling us),
12
+ # so the gate-equivalent step runs under `event_name == 'workflow_dispatch'` —
13
+ # the one place that signal is the right one, since a workflow_call inherits the
14
+ # caller's event and never matches.
15
+ #
16
+ # The FILENAME is what PyPI's Trusted Publisher matches: renaming this file
17
+ # breaks OIDC until the publisher is re-registered.
18
+
19
+ on:
20
+ workflow_dispatch:
21
+ inputs:
22
+ tag_action:
23
+ description: "create = publish to PyPI (irreversible) | preview = build only"
24
+ required: true
25
+ type: choice
26
+ default: preview
27
+ options:
28
+ - preview
29
+ - create
30
+ workflow_call:
31
+ inputs:
32
+ version:
33
+ required: false
34
+ type: string
35
+ tag_action:
36
+ required: false
37
+ type: string
38
+ default: create # create | preview
39
+
40
+ permissions: {}
41
+
42
+ concurrency:
43
+ group: publish
44
+ cancel-in-progress: false
45
+
46
+ env:
47
+ # Distribution name — what PyPI shows and what `pip install` takes.
48
+ #
49
+ # It is NOT a renaming mechanism: PyPI reads the name from the wheel's
50
+ # METADATA, which comes from [project].name in pyproject.toml. This variable
51
+ # is the expected value, checked against the built artifact below, so a
52
+ # mismatch fails the build instead of publishing under the wrong name.
53
+ #
54
+ # pyproject.toml declares this same name, so the check below passes; it
55
+ # stays as the guard against an accidental rename.
56
+ DIST_NAME: womm-cli
57
+
58
+ # Import package name — the directory inside the wheel, and the CLI command.
59
+ # It differs from the distribution name because `womm` was already taken on
60
+ # PyPI by an unrelated project.
61
+ IMPORT_NAME: womm
62
+
63
+ jobs:
64
+ validate:
65
+ name: Validate & build
66
+ runs-on: ubuntu-24.04
67
+ timeout-minutes: 20
68
+ permissions:
69
+ contents: read
70
+ outputs:
71
+ version: ${{ steps.version.outputs.version }}
72
+
73
+ steps:
74
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
75
+
76
+ - uses: astral-sh/setup-uv@18d369b23da25a81e9458561248e1aafff6a70fa # v10.3.1
77
+ with:
78
+ python-version: "3.13"
79
+ enable-cache: true
80
+
81
+ - run: uv sync --frozen --no-build --group dev
82
+
83
+ # The caller's input must agree with pyproject.toml, or the artifact would
84
+ # be published under a number that is not the one the tag points at.
85
+ - name: Resolve version
86
+ id: version
87
+ env:
88
+ INPUT_VERSION: ${{ inputs.version || '' }}
89
+ run: |
90
+ FILE_VERSION=$(uv run --no-sync poe -q read-version)
91
+ VERSION="${INPUT_VERSION:-$FILE_VERSION}"
92
+ if [ -z "$VERSION" ]; then
93
+ echo "::error::No version found in pyproject.toml"
94
+ exit 1
95
+ fi
96
+ if [ "$VERSION" != "$FILE_VERSION" ]; then
97
+ echo "::error::Version mismatch: input $VERSION vs pyproject.toml $FILE_VERSION"
98
+ exit 1
99
+ fi
100
+ echo "version=$VERSION" >> "$GITHUB_OUTPUT"
101
+ echo "Version: $VERSION"
102
+
103
+ # Gate-equivalent for a manual dispatch only: on the cascade path 01-ci
104
+ # already proved this exact commit, so re-running it would be waste.
105
+ - name: Verify the dispatch gate passes
106
+ if: github.event_name == 'workflow_dispatch'
107
+ run: uv run --no-sync poe check
108
+
109
+ - name: Build package
110
+ run: uv run --no-sync poe build
111
+
112
+ - name: Verify package metadata
113
+ run: uv run --no-sync twine check dist/*
114
+
115
+ # Two names, two checks: the distribution name is what PyPI registers,
116
+ # the import name is what the wheel must actually contain.
117
+ - name: Verify distribution and import names
118
+ run: |
119
+ python - <<'PY'
120
+ import glob
121
+ import os
122
+ import zipfile
123
+ from email.parser import BytesParser
124
+
125
+ dist_name = os.environ["DIST_NAME"]
126
+ import_name = os.environ["IMPORT_NAME"]
127
+
128
+ wheels = glob.glob("dist/*.whl")
129
+ if not wheels:
130
+ raise SystemExit("No wheel found in dist/")
131
+
132
+ with zipfile.ZipFile(wheels[0]) as zf:
133
+ if zf.testzip() is not None:
134
+ raise SystemExit("Wheel archive is corrupt")
135
+ names = zf.namelist()
136
+ metadata_path = next(
137
+ (n for n in names if n.endswith(".dist-info/METADATA")), None
138
+ )
139
+ if metadata_path is None:
140
+ raise SystemExit("Wheel has no METADATA")
141
+ metadata = BytesParser().parsebytes(zf.read(metadata_path))
142
+
143
+ # Normalised per PEP 503: PyPI treats '-', '_' and '.' alike.
144
+ def normalise(value: str) -> str:
145
+ return value.lower().replace("_", "-").replace(".", "-")
146
+
147
+ built = metadata["Name"]
148
+ if normalise(built) != normalise(dist_name):
149
+ raise SystemExit(
150
+ f"Distribution name mismatch: the wheel declares {built!r} but this "
151
+ f"workflow publishes {dist_name!r}.\n"
152
+ f"PyPI takes the name from the wheel METADATA, so this cannot be "
153
+ f"fixed from the workflow: set [project].name to {dist_name!r} in "
154
+ f"pyproject.toml."
155
+ )
156
+
157
+ if not any(n.startswith(f"{import_name}/") for n in names):
158
+ raise SystemExit(f"Wheel does not contain the {import_name} package")
159
+
160
+ print(f"Wheel declares {built}, contains {import_name}/ — checks passed")
161
+ PY
162
+
163
+ - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
164
+ with:
165
+ name: dist
166
+ path: dist/
167
+ retention-days: 1
168
+
169
+ # WOMM ships a command, not just an importable module: the smoke test
170
+ # installs the built wheel as a tool and runs the CLI, on both platforms it
171
+ # claims to support. `womm doctor` is the broadest single entry point.
172
+ smoke-test:
173
+ name: Smoke test (${{ matrix.os }})
174
+ needs: validate
175
+ runs-on: ${{ matrix.os }}
176
+ timeout-minutes: 15
177
+ permissions:
178
+ contents: read
179
+ strategy:
180
+ fail-fast: false
181
+ matrix:
182
+ os: [ubuntu-24.04, windows-latest]
183
+ steps:
184
+ - uses: astral-sh/setup-uv@18d369b23da25a81e9458561248e1aafff6a70fa # v10.3.1
185
+ with:
186
+ python-version: "3.13"
187
+ - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
188
+ with:
189
+ name: dist
190
+ path: dist
191
+ - name: Install the wheel and run the CLI
192
+ shell: bash
193
+ run: |
194
+ uv tool install --python 3.13 --from dist/*.whl "$DIST_NAME"
195
+ "$(uv tool dir --bin)/$IMPORT_NAME" doctor
196
+
197
+ publish:
198
+ name: Publish (PyPI)
199
+ needs: [validate, smoke-test]
200
+ if: inputs.tag_action == 'create'
201
+ runs-on: ubuntu-24.04
202
+ timeout-minutes: 15
203
+ permissions:
204
+ contents: read
205
+ id-token: write
206
+ environment:
207
+ name: pypi
208
+ url: https://pypi.org/project/${{ env.DIST_NAME }}/${{ needs.validate.outputs.version }}/
209
+
210
+ steps:
211
+ - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
212
+ with:
213
+ name: dist
214
+ path: dist/
215
+
216
+ # No token: publication goes through a PyPI Trusted Publisher (OIDC).
217
+ # It must be registered against `womm-cli` BEFORE the first upload —
218
+ # as a pending publisher, since the project does not exist yet.
219
+ - name: Publish (OIDC)
220
+ uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3
221
+ with:
222
+ verbose: true
223
+ # Replay-safe: 02-tag-sync creates the tag before this job runs, so a
224
+ # release whose upload failed is recovered by dispatching 03 again.
225
+ # Without this, the replay would 409 on the already-present version.
226
+ skip-existing: true
227
+ # Attestations disabled: when called as a reusable workflow from
228
+ # 02-tag-sync.yml, the OIDC token's Build Config URI reflects the
229
+ # caller rather than this workflow, causing PyPI Trusted Publisher
230
+ # verification to fail.
231
+ # Exit condition: re-enable once PyPI matches the called workflow's
232
+ # job_workflow_ref rather than the caller's.
233
+ attestations: false
234
+
235
+ - name: Summary
236
+ run: |
237
+ echo "## 📦 Published to PyPI" >> "$GITHUB_STEP_SUMMARY"
238
+ echo "- **Package**: ${{ env.DIST_NAME }}" >> "$GITHUB_STEP_SUMMARY"
239
+ echo "- **Command**: ${{ env.IMPORT_NAME }}" >> "$GITHUB_STEP_SUMMARY"
240
+ echo "- **Version**: ${{ needs.validate.outputs.version }}" >> "$GITHUB_STEP_SUMMARY"
241
+ echo "- **URL**: https://pypi.org/project/${{ env.DIST_NAME }}/${{ needs.validate.outputs.version }}/" >> "$GITHUB_STEP_SUMMARY"
@@ -0,0 +1,28 @@
1
+ name: 04 · Docs
2
+
3
+ # The product documentation is being rebuilt; validate it without deploying.
4
+ on:
5
+ workflow_call:
6
+ workflow_dispatch:
7
+ pull_request:
8
+ branches: [main]
9
+
10
+ permissions:
11
+ contents: read
12
+
13
+ jobs:
14
+ build:
15
+ name: Build docs
16
+ runs-on: ubuntu-24.04
17
+ timeout-minutes: 15
18
+ permissions:
19
+ contents: read
20
+ steps:
21
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
22
+ - uses: astral-sh/setup-uv@18d369b23da25a81e9458561248e1aafff6a70fa # v10.3.1
23
+ with:
24
+ python-version: "3.13"
25
+ enable-cache: true
26
+ - run: uv sync --frozen --no-build --group docs
27
+ - name: Build docs
28
+ run: uv run --no-sync poe docs-build