ara-cli 0.1.9.53__tar.gz → 0.1.9.55__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.

Potentially problematic release.


This version of ara-cli might be problematic. Click here for more details.

Files changed (163) hide show
  1. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/PKG-INFO +1 -1
  2. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/ara_command_action.py +5 -1
  3. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/ara_command_parser.py +1 -0
  4. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/artefact_fuzzy_search.py +1 -1
  5. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/artefact_models/artefact_model.py +12 -0
  6. ara_cli-0.1.9.55/ara_cli/artefact_renamer.py +125 -0
  7. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/tag_extractor.py +4 -1
  8. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/tests/test_artefact_renamer.py +0 -61
  9. ara_cli-0.1.9.55/ara_cli/tests/test_tag_extractor.py +54 -0
  10. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/version.py +1 -1
  11. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli.egg-info/PKG-INFO +1 -1
  12. ara_cli-0.1.9.53/ara_cli/artefact_renamer.py +0 -93
  13. ara_cli-0.1.9.53/ara_cli/tests/test_tag_extractor.py +0 -45
  14. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/MANIFEST.in +0 -0
  15. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/README.md +0 -0
  16. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/__init__.py +0 -0
  17. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/__main__.py +0 -0
  18. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/analyse_artefacts.py +0 -0
  19. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/ara_config.py +0 -0
  20. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/artefact_creator.py +0 -0
  21. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/artefact_deleter.py +0 -0
  22. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/artefact_link_updater.py +0 -0
  23. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/artefact_lister.py +0 -0
  24. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/artefact_models/artefact_load.py +0 -0
  25. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/artefact_models/artefact_mapping.py +0 -0
  26. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/artefact_models/artefact_templates.py +0 -0
  27. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/artefact_models/businessgoal_artefact_model.py +0 -0
  28. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/artefact_models/capability_artefact_model.py +0 -0
  29. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/artefact_models/epic_artefact_model.py +0 -0
  30. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/artefact_models/example_artefact_model.py +0 -0
  31. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/artefact_models/feature_artefact_model.py +0 -0
  32. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/artefact_models/issue_artefact_model.py +0 -0
  33. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/artefact_models/keyfeature_artefact_model.py +0 -0
  34. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/artefact_models/task_artefact_model.py +0 -0
  35. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/artefact_models/userstory_artefact_model.py +0 -0
  36. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/artefact_models/vision_artefact_model.py +0 -0
  37. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/artefact_reader.py +0 -0
  38. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/artefact_scan.py +0 -0
  39. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/chat.py +0 -0
  40. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/classifier.py +0 -0
  41. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/codefusionretriever.py +0 -0
  42. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/codehierachieretriever.py +0 -0
  43. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/commandline_completer.py +0 -0
  44. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/directory_navigator.py +0 -0
  45. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/file_classifier.py +0 -0
  46. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/file_lister.py +0 -0
  47. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/filename_validator.py +0 -0
  48. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/list_filter.py +0 -0
  49. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/output_suppressor.py +0 -0
  50. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/prompt_chat.py +0 -0
  51. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/prompt_extractor.py +0 -0
  52. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/prompt_handler.py +0 -0
  53. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/prompt_rag.py +0 -0
  54. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/run_file_lister.py +0 -0
  55. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/template_manager.py +0 -0
  56. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/agile.artefacts +0 -0
  57. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/prompt-modules/blueprints/complete_pytest_unittest.blueprint.md +0 -0
  58. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/prompt-modules/blueprints/empty.blueprint.md +0 -0
  59. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/prompt-modules/blueprints/task_todo_list_C4_architecture_analysis.blueprint.md +0 -0
  60. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/prompt-modules/blueprints/task_todo_list_implement_feature_BDD_way.blueprint.md +0 -0
  61. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/prompt-modules/commands/architecture_C4_analysis.commands.md +0 -0
  62. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/prompt-modules/commands/architecture_radon_cc_score.commands.md +0 -0
  63. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/prompt-modules/commands/architecture_radon_halstead_v.commands.md +0 -0
  64. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/prompt-modules/commands/architecture_radon_maintainability_score.commands.md +0 -0
  65. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/prompt-modules/commands/artefact_classification.commands.md +0 -0
  66. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/prompt-modules/commands/artefact_extension.commands.md +0 -0
  67. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/prompt-modules/commands/artefact_formulation.commands.md +0 -0
  68. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/prompt-modules/commands/behave_step_generation.commands.md +0 -0
  69. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/prompt-modules/commands/code_generation_complex.commands.md +0 -0
  70. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/prompt-modules/commands/code_generation_simple.commands.md +0 -0
  71. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/prompt-modules/commands/empty.commands.md +0 -0
  72. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/prompt-modules/commands/error_fixing.commands.md +0 -0
  73. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/prompt-modules/commands/feature_file_update.commands.md +0 -0
  74. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/prompt-modules/commands/feature_formulation.commands.md +0 -0
  75. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/prompt-modules/commands/js_code_generation_simple.commands.md +0 -0
  76. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/prompt-modules/commands/refactoring.commands.md +0 -0
  77. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/prompt-modules/commands/refactoring_analysis.commands.md +0 -0
  78. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/prompt-modules/commands/reverse_engineer_feature_file.commands.md +0 -0
  79. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/prompt-modules/commands/reverse_engineer_program_flow.commands.md +0 -0
  80. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/prompt-modules/intentions/classify_task.intention.md +0 -0
  81. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/prompt-modules/intentions/empty.intention.md +0 -0
  82. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/prompt-modules/intentions/error_fixing.intention.md +0 -0
  83. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/prompt-modules/intentions/feature_fix_steps_for_scenario.intention.md +0 -0
  84. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/prompt-modules/intentions/feature_formulation.intention.md +0 -0
  85. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/prompt-modules/intentions/feature_reverse_formulation_from_code.intention.md +0 -0
  86. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/prompt-modules/intentions/feature_scenario_implementation.intention.md +0 -0
  87. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/prompt-modules/intentions/feature_scenario_implementation_update.intention.md +0 -0
  88. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/prompt-modules/intentions/feature_scenario_outline_extension.intention.md +0 -0
  89. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/prompt-modules/intentions/feature_update_formulation.intention.md +0 -0
  90. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/prompt-modules/intentions/fibonacci_example_implementation.intention.md +0 -0
  91. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/prompt-modules/intentions/js_implementation_from_task_description.intention.md +0 -0
  92. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/prompt-modules/intentions/js_steps_implementation.intention.md +0 -0
  93. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/prompt-modules/intentions/python_cli_implementation_with_test.intention.md +0 -0
  94. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/prompt-modules/intentions/python_code_understanding.intention.md +0 -0
  95. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/prompt-modules/intentions/task_implementation.intention.md +0 -0
  96. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/prompt-modules/intentions/task_prompt_control_by_status.intention.md +0 -0
  97. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/prompt-modules/intentions/task_stepwise_implementation_by_number.intention.md +0 -0
  98. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/prompt-modules/intentions/task_stepwise_implementation_by_status.intention.md +0 -0
  99. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/prompt-modules/rules/architecture_analyst.rules.md +0 -0
  100. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/prompt-modules/rules/code_analyst.rules.md +0 -0
  101. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/prompt-modules/rules/empty.rules.md +0 -0
  102. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/prompt-modules/rules/error_analyst.rules.md +0 -0
  103. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/prompt-modules/rules/gherkin_expert.rules.md +0 -0
  104. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/prompt-modules/rules/js_expert_developer.rules.md +0 -0
  105. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/prompt-modules/rules/product_owner.rules.md +0 -0
  106. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/prompt-modules/rules/python_behave.rules.md +0 -0
  107. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/prompt-modules/rules/python_developer.rules.md +0 -0
  108. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/specification_breakdown_files/template.concept.exploration.md +0 -0
  109. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/specification_breakdown_files/template.concept.md +0 -0
  110. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/specification_breakdown_files/template.customer.exploration.md +0 -0
  111. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/specification_breakdown_files/template.customer.md +0 -0
  112. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/specification_breakdown_files/template.persona.exploration.md +0 -0
  113. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/specification_breakdown_files/template.persona.md +0 -0
  114. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/specification_breakdown_files/template.step.exploration.md +0 -0
  115. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/specification_breakdown_files/template.step.md +0 -0
  116. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/specification_breakdown_files/template.technology.exploration.md +0 -0
  117. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/specification_breakdown_files/template.technology.md +0 -0
  118. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/template.businessgoal +0 -0
  119. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/template.businessgoal.prompt_log.md +0 -0
  120. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/template.capability +0 -0
  121. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/template.capability.prompt_log.md +0 -0
  122. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/template.epic +0 -0
  123. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/template.epic.prompt_log.md +0 -0
  124. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/template.example +0 -0
  125. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/template.example.prompt_log.md +0 -0
  126. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/template.feature +0 -0
  127. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/template.feature.prompt_log.md +0 -0
  128. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/template.issue +0 -0
  129. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/template.issue.prompt_log.md +0 -0
  130. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/template.keyfeature +0 -0
  131. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/template.keyfeature.prompt_log.md +0 -0
  132. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/template.steps.prompt_log.md +0 -0
  133. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/template.task +0 -0
  134. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/template.task.prompt_log.md +0 -0
  135. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/template.userstory +0 -0
  136. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/template.userstory.prompt_log.md +0 -0
  137. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/template.vision +0 -0
  138. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/templates/template.vision.prompt_log.md +0 -0
  139. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/tests/__init__.py +0 -0
  140. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/tests/test_ara_command_action.py +0 -0
  141. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/tests/test_ara_config.py +0 -0
  142. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/tests/test_artefact_fuzzy_search.py +0 -0
  143. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/tests/test_artefact_link_updater.py +0 -0
  144. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/tests/test_artefact_lister.py +0 -0
  145. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/tests/test_artefact_reader.py +0 -0
  146. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/tests/test_artefact_scan.py +0 -0
  147. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/tests/test_chat.py +0 -0
  148. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/tests/test_classifier.py +0 -0
  149. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/tests/test_directory_navigator.py +0 -0
  150. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/tests/test_file_classifier.py +0 -0
  151. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/tests/test_file_creator.py +0 -0
  152. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/tests/test_file_lister.py +0 -0
  153. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/tests/test_list_filter.py +0 -0
  154. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/tests/test_template_manager.py +0 -0
  155. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/tests/test_update_config_prompt.py +0 -0
  156. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli/update_config_prompt.py +0 -0
  157. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli.egg-info/SOURCES.txt +0 -0
  158. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli.egg-info/dependency_links.txt +0 -0
  159. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli.egg-info/entry_points.txt +0 -0
  160. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli.egg-info/requires.txt +0 -0
  161. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/ara_cli.egg-info/top_level.txt +0 -0
  162. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/setup.cfg +0 -0
  163. {ara_cli-0.1.9.53 → ara_cli-0.1.9.55}/setup.py +0 -0
@@ -1,3 +1,3 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ara_cli
3
- Version: 0.1.9.53
3
+ Version: 0.1.9.55
@@ -123,8 +123,12 @@ def list_action(args):
123
123
  def list_tags_action(args):
124
124
  from ara_cli.tag_extractor import TagExtractor
125
125
 
126
+ tag_classifier = None
127
+ if args.include_classifier:
128
+ tag_classifier = args.include_classifier
129
+
126
130
  tag_extractor = TagExtractor()
127
- tags = tag_extractor.extract_tags()
131
+ tags = tag_extractor.extract_tags(include_classifier=tag_classifier)
128
132
 
129
133
  if args.json:
130
134
  output = json.dumps({"tags": tags})
@@ -120,6 +120,7 @@ def list_parser(subparsers):
120
120
  def list_tags_parser(subparsers):
121
121
  tags_parser = subparsers.add_parser("list-tags", help="Show tags")
122
122
  tags_parser.add_argument("--json", "-j", help="Output tags as JSON", action=argparse.BooleanOptionalAction)
123
+ tags_parser.add_argument("--include-classifier", choices=classifiers, help="Show tags for an artefact type")
123
124
 
124
125
 
125
126
  def add_chat_arguments(chat_parser):
@@ -26,7 +26,7 @@ def suggest_close_name_matches_for_parent(artefact_name: str, all_artefact_names
26
26
  message = f"No match found for parent of '{artefact_name}' with name '{parent_name}'"
27
27
 
28
28
  suggest_close_names(
29
- artefact_name=artefact_name,
29
+ artefact_name=parent_name,
30
30
  all_artefact_names=all_artefact_names,
31
31
  message=message
32
32
  )
@@ -6,6 +6,7 @@ from abc import ABC, abstractmethod
6
6
  from ara_cli.classifier import Classifier
7
7
  import warnings
8
8
  import string
9
+ import os
9
10
 
10
11
 
11
12
  ALLOWED_STATUS_VALUES = ("to-do", "in-progress", "review", "done", "closed")
@@ -188,6 +189,17 @@ class Artefact(BaseModel, ABC):
188
189
  sub_dir = Classifier.get_sub_directory(self.artefact_type)
189
190
  return f"{sub_dir}/{self.title}.{self.artefact_type}"
190
191
 
192
+ @model_validator(mode="after")
193
+ def ensure_file_path_consistency(self):
194
+ if not self._file_path:
195
+ return self
196
+ file_path = self._file_path
197
+ dir_path = os.path.dirname(file_path)
198
+ artefact_type = self._artefact_type()
199
+ file_path = f"{dir_path}/{self.title}.{artefact_type}"
200
+ self._file_path = file_path
201
+ return self
202
+
191
203
  @field_validator('artefact_type')
192
204
  def validate_artefact_type(cls, v):
193
205
  if not isinstance(v, ArtefactType):
@@ -0,0 +1,125 @@
1
+ import os
2
+ from functools import lru_cache
3
+ from ara_cli.classifier import Classifier
4
+ from ara_cli.artefact_link_updater import ArtefactLinkUpdater
5
+ from ara_cli.artefact_reader import ArtefactReader
6
+ from ara_cli.artefact_models.artefact_model import Contribution
7
+ from ara_cli.template_manager import DirectoryNavigator
8
+ from ara_cli.artefact_fuzzy_search import suggest_close_name_matches
9
+ import re
10
+
11
+
12
+ class ArtefactRenamer:
13
+ def __init__(self, file_system=None):
14
+ self.file_system = file_system or os
15
+ self.link_updater = ArtefactLinkUpdater()
16
+
17
+ @lru_cache(maxsize=None)
18
+ def navigate_to_target(self) -> str:
19
+ navigator = DirectoryNavigator()
20
+ original_directory = navigator.navigate_to_target()
21
+ return original_directory
22
+
23
+ @lru_cache(maxsize=None)
24
+ def compile_pattern(self, pattern):
25
+ return re.compile(pattern)
26
+
27
+ def rename(self, old_name, new_name, classifier):
28
+ if not new_name:
29
+ raise ValueError("New name must be provided for renaming.")
30
+ if not Classifier.is_valid_classifier(classifier):
31
+ raise ValueError("Invalid classifier provided. Please provide a valid classifier.")
32
+
33
+ fs = self.file_system
34
+ original_directory = self.navigate_to_target()
35
+ original_directory = fs.path.abspath(original_directory)
36
+
37
+ classified_artefacts = ArtefactReader.read_artefacts()
38
+
39
+ artefacts_by_current_classifier = classified_artefacts.get(classifier, [])
40
+ matching_artefacts = list(filter(lambda a: a.title == old_name, artefacts_by_current_classifier))
41
+
42
+ if not matching_artefacts:
43
+ all_artefact_names = [artefact.title for artefact in artefacts_by_current_classifier]
44
+ suggest_close_name_matches(old_name, all_artefact_names)
45
+ return
46
+
47
+ matching_artefact = matching_artefacts[0]
48
+
49
+ old_file_path = matching_artefact.file_path
50
+ old_base_path = fs.path.dirname(old_file_path)
51
+ old_dir_path = f"{old_base_path}/{old_name}.data"
52
+
53
+ old_dir_exists = fs.path.exists(old_dir_path)
54
+
55
+ if not fs.path.exists(old_file_path):
56
+ raise FileNotFoundError(f"The file {old_file_path} does not exist.")
57
+
58
+ children_by_classifier = ArtefactReader.find_children(
59
+ artefact_name=old_name,
60
+ classifier=classifier,
61
+ classified_artefacts=classified_artefacts
62
+ )
63
+
64
+ matching_artefact.title = new_name
65
+ new_file_path = matching_artefact.file_path
66
+ new_base_path = fs.path.dirname(new_file_path)
67
+ new_dir_path = f"{new_base_path}/{new_name}.data"
68
+ if fs.path.exists(new_file_path):
69
+ raise FileExistsError(f"The new file name {new_file_path} already exists.")
70
+ if fs.path.exists(new_dir_path):
71
+ raise FileExistsError(f"The new directory name {new_dir_path} already exists.")
72
+
73
+ serialized_artefact = matching_artefact.serialize()
74
+ with open(matching_artefact.file_path, 'w') as file:
75
+ file.write(serialized_artefact)
76
+ fs.remove(old_file_path)
77
+
78
+ absolute_old_file_path = fs.path.abspath(old_file_path)
79
+ absolute_new_file_path = fs.path.abspath(new_file_path)
80
+ print(f"Renamed file: {absolute_old_file_path} to {absolute_new_file_path}")
81
+
82
+ if old_dir_exists:
83
+ absolute_old_dir_path = fs.path.abspath(old_dir_path)
84
+ absolute_new_dir_path = fs.path.abspath(new_dir_path)
85
+ fs.rename(old_dir_path, new_dir_path)
86
+ print(f"Renamed directory: {absolute_old_dir_path} to {absolute_new_dir_path}")
87
+
88
+ for children in children_by_classifier.values():
89
+ for child in children:
90
+ contribution = child.contribution
91
+ contribution.artefact_name = new_name
92
+ child.contribution = contribution
93
+ serialized_artefact = child.serialize()
94
+ with open(child.file_path, 'w') as file:
95
+ file.write(serialized_artefact)
96
+
97
+ fs.chdir(original_directory)
98
+
99
+ def _update_title_in_artefact(self, artefact_path, new_title, classifier):
100
+ # Format the new title: replace underscores with spaces
101
+ formatted_new_title = new_title.replace('_', ' ')
102
+
103
+ # Get the artefact title prefix using the classifier
104
+ title_prefix = Classifier.get_artefact_title(classifier.lower())
105
+
106
+ if not title_prefix:
107
+ raise ValueError(f"Invalid classifier: {classifier}")
108
+
109
+ # Read the file content
110
+ with open(artefact_path, 'r') as file:
111
+ content = file.read()
112
+
113
+ # Find the old title line
114
+ old_title_line = next((line for line in content.split('\n') if self.compile_pattern(f"^{title_prefix}").match(line)), None)
115
+ if old_title_line is None:
116
+ raise ValueError(f"The artefact file does not contain the title prefix '{title_prefix}'.")
117
+
118
+ # Construct the new title line without adding an extra colon
119
+ new_title_line = f"{title_prefix}: {formatted_new_title}"
120
+ # Replace the old title line with the new title line in the content
121
+ new_content = content.replace(old_title_line, new_title_line, 1)
122
+
123
+ # Write the updated content back to the file
124
+ with open(artefact_path, 'w') as file:
125
+ file.write(new_content)
@@ -6,7 +6,7 @@ class TagExtractor:
6
6
  def __init__(self, file_system=None):
7
7
  self.file_system = file_system or os
8
8
 
9
- def extract_tags(self, navigate_to_target=False):
9
+ def extract_tags(self, navigate_to_target=False, include_classifier=None):
10
10
  from ara_cli.template_manager import DirectoryNavigator
11
11
  from ara_cli.artefact_reader import ArtefactReader
12
12
 
@@ -16,6 +16,9 @@ class TagExtractor:
16
16
 
17
17
  artefacts = ArtefactReader.read_artefacts()
18
18
 
19
+ if include_classifier:
20
+ artefacts = {include_classifier: artefacts[include_classifier]}
21
+
19
22
  unique_tags = set()
20
23
 
21
24
  for artefact_list in artefacts.values():
@@ -19,13 +19,6 @@ def cleanup():
19
19
  shutil.rmtree(new_data_dir)
20
20
 
21
21
 
22
- @patch("ara_cli.artefact_renamer.os.path.exists")
23
- def test_rename_checks_filename_exists(mock_exists):
24
- mock_exists.return_value = False
25
- ar = ArtefactRenamer(os)
26
- with pytest.raises(FileNotFoundError):
27
- ar.rename("nonexistent_file", "new_file", "vision")
28
-
29
22
  def test_rename_checks_classifier_valid():
30
23
  ar = ArtefactRenamer(os)
31
24
  with pytest.raises(ValueError):
@@ -38,60 +31,6 @@ def test_rename_checks_new_name_provided():
38
31
  ar.rename("existing_file", None, None)
39
32
 
40
33
 
41
- @patch("builtins.open", new_callable=mock_open, read_data="Vision: Old Title\nOther content.")
42
- @patch("ara_cli.artefact_renamer.os.rename")
43
- @patch("ara_cli.artefact_renamer.os.path.exists", side_effect=[True, True, False, False, True])
44
- def test_rename_filename_with_new_name(mock_exists, mock_rename, mock_open):
45
- ar = ArtefactRenamer(os)
46
- ar.rename("existing_file", "new_file", "vision")
47
- assert mock_rename.call_count == 2
48
- mock_rename.assert_has_calls([
49
- call("vision/existing_file.vision", "vision/new_file.vision"),
50
- call("vision/existing_file.data", "vision/new_file.data")
51
- ])
52
-
53
-
54
- @patch("ara_cli.artefact_renamer.os.path.exists", side_effect=[True, True, True, False])
55
- def test_rename_throws_error_if_new_file_or_directory_exists(mock_exists):
56
- ar = ArtefactRenamer(os)
57
- with pytest.raises(FileExistsError):
58
- ar.rename("existing_file", "existing_file", "vision")
59
-
60
-
61
- @patch("ara_cli.artefact_renamer.os.path.exists", side_effect=[True, False, False])
62
- def test_rename_checks_related_data_folder_exists(mock_exists):
63
- ar = ArtefactRenamer(os)
64
- with pytest.raises(FileNotFoundError):
65
- ar.rename("old_name", "new_name", "userstory")
66
-
67
-
68
- @patch("builtins.open", new_callable=mock_open, read_data="Userstory: Old Title\nOther content.")
69
- @patch("ara_cli.artefact_renamer.os.rename")
70
- @patch("ara_cli.artefact_renamer.os.path.exists", side_effect=[True, True, False, False, True])
71
- def test_rename_also_renames_related_data_folder(mock_exists, mock_rename, mock_open):
72
- ar = ArtefactRenamer(os)
73
- ar.rename("old_name", "new_name", "userstory")
74
- assert mock_rename.call_count == 2
75
- mock_rename.assert_has_calls([
76
- call("userstories/old_name.userstory", "userstories/new_name.userstory"),
77
- call("userstories/old_name.data", "userstories/new_name.data")
78
- ])
79
-
80
-
81
- @patch("ara_cli.artefact_renamer.os.path.exists", side_effect=[True, True, True])
82
- def test_rename_throws_error_if_new_file_path_exists(mock_exists):
83
- ar = ArtefactRenamer()
84
- with pytest.raises(FileExistsError):
85
- ar.rename("old_name", "new_name", "userstory")
86
-
87
-
88
- @patch("ara_cli.artefact_renamer.os.path.exists", side_effect=[True, True, False, True])
89
- def test_rename_throws_error_if_new_data_directory_exists(mock_exists):
90
- ar = ArtefactRenamer()
91
- with pytest.raises(FileExistsError):
92
- ar.rename("old_name", "new_name", "userstory")
93
-
94
-
95
34
  @pytest.mark.parametrize("classifier,artefact_name,read_data_prefix,old_title,new_title", [
96
35
  ("vision", "Vision", "Vision: ", "Old Title", "New title"),
97
36
  ("businessgoal", "Businessgoal", "Businessgoal: ", "Old Title", "New title"),
@@ -0,0 +1,54 @@
1
+ import pytest
2
+ from unittest.mock import MagicMock, patch
3
+ from ara_cli.tag_extractor import TagExtractor
4
+
5
+
6
+ @pytest.fixture
7
+ def artefact():
8
+ """Fixture to create a mock artefact object."""
9
+ class Artefact:
10
+ def __init__(self, tags, status, users):
11
+ self.tags = tags
12
+ self.status = status
13
+ self.users = users
14
+ return Artefact
15
+
16
+
17
+ @pytest.mark.parametrize("navigate_to_target, include_classifier, artefact_data, expected_tags", [
18
+ (False, None, {'artefacts': [
19
+ (['tag1', 'tag2'], 'status1', ['user1', 'user2']),
20
+ (['tag3'], 'status2', ['user3'])
21
+ ]}, ['status1', 'status2', 'tag1', 'tag2', 'tag3', 'user_user1', 'user_user2', 'user_user3']),
22
+
23
+ (False, 'key', {'key': [
24
+ (['tag1', 'tag2'], 'status1', ['user1', 'user2'])
25
+ ]}, ['status1', 'tag1', 'tag2', 'user_user1', 'user_user2']),
26
+
27
+ (True, None, {'artefacts': [
28
+ (['tag3'], 'status2', ['user3'])
29
+ ]}, ['status2', 'tag3', 'user_user3'])
30
+ ])
31
+ @patch('ara_cli.template_manager.DirectoryNavigator')
32
+ @patch('ara_cli.artefact_reader.ArtefactReader')
33
+ def test_extract_tags(mock_artefact_reader, mock_directory_navigator, artefact, navigate_to_target, include_classifier, artefact_data, expected_tags):
34
+ # Mock the artefact reader to return artefact data
35
+ mock_artefact_reader.read_artefacts.return_value = {key: [artefact(
36
+ *data) for data in artefact_list] for key, artefact_list in artefact_data.items()}
37
+
38
+ # Mock the directory navigator
39
+ mock_navigator_instance = mock_directory_navigator.return_value
40
+ mock_navigator_instance.navigate_to_target = MagicMock()
41
+
42
+ tag_extractor = TagExtractor()
43
+
44
+ # Run the extract_tags method with include_classifier
45
+ result = tag_extractor.extract_tags(
46
+ navigate_to_target=navigate_to_target, include_classifier=include_classifier)
47
+
48
+ # Assertions
49
+ if navigate_to_target:
50
+ mock_navigator_instance.navigate_to_target.assert_called_once()
51
+ else:
52
+ mock_navigator_instance.navigate_to_target.assert_not_called()
53
+
54
+ assert result == expected_tags
@@ -1,2 +1,2 @@
1
1
  # version.py
2
- __version__ = "0.1.9.53" # fith parameter like .0 for local install test purposes only. official numbers should be 4 digit numbers
2
+ __version__ = "0.1.9.55" # fith parameter like .0 for local install test purposes only. official numbers should be 4 digit numbers
@@ -1,3 +1,3 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ara-cli
3
- Version: 0.1.9.53
3
+ Version: 0.1.9.55
@@ -1,93 +0,0 @@
1
- import os
2
- from functools import lru_cache
3
- from ara_cli.classifier import Classifier
4
- from ara_cli.artefact_link_updater import ArtefactLinkUpdater
5
- from ara_cli.template_manager import DirectoryNavigator
6
- import re
7
-
8
-
9
- class ArtefactRenamer:
10
- def __init__(self, file_system=None):
11
- self.file_system = file_system or os
12
- self.link_updater = ArtefactLinkUpdater()
13
-
14
- @lru_cache(maxsize=None)
15
- def navigate_to_target(self) -> str:
16
- navigator = DirectoryNavigator()
17
- original_directory = navigator.navigate_to_target()
18
- return original_directory
19
-
20
- @lru_cache(maxsize=None)
21
- def compile_pattern(self, pattern):
22
- return re.compile(pattern)
23
-
24
- def rename(self, old_name, new_name, classifier):
25
- original_directory = self.navigate_to_target()
26
-
27
- if not new_name:
28
- raise ValueError("New name must be provided for renaming.")
29
-
30
- if not Classifier.is_valid_classifier(classifier):
31
- raise ValueError("Invalid classifier provided. Please provide a valid classifier.")
32
-
33
- sub_directory = Classifier.get_sub_directory(classifier)
34
- old_file_path = self.file_system.path.join(sub_directory, f"{old_name}.{classifier}")
35
- new_file_path = self.file_system.path.join(sub_directory, f"{new_name}.{classifier}")
36
-
37
- old_dir_path = self.file_system.path.join(sub_directory, f"{old_name}.data")
38
- new_dir_path = self.file_system.path.join(sub_directory, f"{new_name}.data")
39
-
40
- old_dir_exists = self.file_system.path.exists(old_dir_path)
41
-
42
- # Check if the original file exists
43
- if not self.file_system.path.exists(old_file_path):
44
- raise FileNotFoundError(f"The file {old_file_path} does not exist.")
45
-
46
- # Check if the new file name and directory already exist
47
- if self.file_system.path.exists(new_file_path):
48
- raise FileExistsError(f"The new file name {new_file_path} already exists.")
49
- if self.file_system.path.exists(new_dir_path):
50
- raise FileExistsError(f"The new directory name {new_dir_path} already exists.")
51
-
52
- # Perform the renaming of the file and directory
53
- self.file_system.rename(old_file_path, new_file_path)
54
- print(f"Renamed file: {old_file_path} to {new_file_path}")
55
- if old_dir_exists:
56
- self.file_system.rename(old_dir_path, new_dir_path)
57
- print(f"Renamed directory: {old_dir_path} to {new_dir_path}")
58
-
59
- # Update the title within the artefact file
60
- self._update_title_in_artefact(new_file_path, new_name, classifier)
61
-
62
- # Update links in related artefact files
63
- self.link_updater.update_links_in_related_artefacts(old_name, new_name)
64
-
65
- os.chdir(original_directory)
66
-
67
- def _update_title_in_artefact(self, artefact_path, new_title, classifier):
68
- # Format the new title: replace underscores with spaces
69
- formatted_new_title = new_title.replace('_', ' ')
70
-
71
- # Get the artefact title prefix using the classifier
72
- title_prefix = Classifier.get_artefact_title(classifier.lower())
73
-
74
- if not title_prefix:
75
- raise ValueError(f"Invalid classifier: {classifier}")
76
-
77
- # Read the file content
78
- with open(artefact_path, 'r') as file:
79
- content = file.read()
80
-
81
- # Find the old title line
82
- old_title_line = next((line for line in content.split('\n') if self.compile_pattern(f"^{title_prefix}").match(line)), None)
83
- if old_title_line is None:
84
- raise ValueError(f"The artefact file does not contain the title prefix '{title_prefix}'.")
85
-
86
- # Construct the new title line without adding an extra colon
87
- new_title_line = f"{title_prefix}: {formatted_new_title}"
88
- # Replace the old title line with the new title line in the content
89
- new_content = content.replace(old_title_line, new_title_line, 1)
90
-
91
- # Write the updated content back to the file
92
- with open(artefact_path, 'w') as file:
93
- file.write(new_content)
@@ -1,45 +0,0 @@
1
- import pytest
2
- from unittest.mock import MagicMock, patch
3
- from ara_cli.tag_extractor import TagExtractor # Adjust the import based on your project structure
4
-
5
- @pytest.fixture
6
- def artefact():
7
- """Fixture to create a mock artefact object."""
8
- class Artefact:
9
- def __init__(self, tags, status, users):
10
- self.tags = tags
11
- self.status = status
12
- self.users = users
13
-
14
- return Artefact
15
-
16
- @pytest.mark.parametrize("navigate_to_target, artefact_data, expected_tags", [
17
- (False, {'artefacts': [(
18
- ['tag1', 'tag2'], 'status1', ['user1', 'user2']
19
- )]}, ['status1', 'tag1', 'tag2', 'user_user1', 'user_user2']),
20
- (True, {'artefacts': [(
21
- ['tag3'], 'status2', ['user3']
22
- )]}, ['status2', 'tag3', 'user_user3'])
23
- ])
24
- @patch('ara_cli.template_manager.DirectoryNavigator')
25
- @patch('ara_cli.artefact_reader.ArtefactReader')
26
- def test_extract_tags(mock_artefact_reader, mock_directory_navigator, artefact, navigate_to_target, artefact_data, expected_tags):
27
- # Mock the artefact reader to return artefact data
28
- mock_artefact_reader.read_artefacts.return_value = {'key': [artefact(*data) for data in artefact_data['artefacts']]}
29
-
30
- # Mock the directory navigator
31
- mock_navigator_instance = mock_directory_navigator.return_value
32
- mock_navigator_instance.navigate_to_target = MagicMock()
33
-
34
- tag_extractor = TagExtractor()
35
-
36
- # Run the extract_tags method
37
- result = tag_extractor.extract_tags(navigate_to_target=navigate_to_target)
38
-
39
- # Assertions
40
- if navigate_to_target:
41
- mock_navigator_instance.navigate_to_target.assert_called_once()
42
- else:
43
- mock_navigator_instance.navigate_to_target.assert_not_called()
44
-
45
- assert result == expected_tags
File without changes
File without changes
File without changes
File without changes
File without changes