ara-cli 0.1.9.58__py3-none-any.whl → 0.1.9.60__py3-none-any.whl

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.

@@ -7,7 +7,7 @@ from ara_cli.artefact_models.artefact_model import Artefact
7
7
  from ara_cli.artefact_models.artefact_templates import template_artefact_of_type
8
8
  from ara_cli.artefact_fuzzy_search import suggest_close_name_matches
9
9
  from pathlib import Path
10
- from shutil import copyfile
10
+ from shutil import copyfile, rmtree
11
11
 
12
12
 
13
13
  class ArtefactCreator:
@@ -104,6 +104,9 @@ class ArtefactCreator:
104
104
  file_exists = self.file_system.path.exists(file_path)
105
105
  dir_exists = self.file_system.path.exists(dir_path)
106
106
 
107
+ if dir_exists and not os.listdir(dir_path):
108
+ dir_exists = False
109
+
107
110
  if not self.handle_existing_files(file_exists, dir_exists):
108
111
  return
109
112
 
@@ -116,6 +119,7 @@ class ArtefactCreator:
116
119
  )
117
120
 
118
121
  artefact_content = artefact.serialize()
122
+ rmtree(dir_path, ignore_errors=True)
119
123
  os.makedirs(dir_path, exist_ok=True)
120
124
  with open(file_path, 'w') as artefact_file:
121
125
  artefact_file.write(artefact_content)
@@ -25,7 +25,8 @@ def test_run_with_invalid_classifier_prints_error_message(capfd):
25
25
 
26
26
  @patch("ara_cli.artefact_creator.input", return_value="n")
27
27
  @patch("ara_cli.artefact_creator.os.path.exists", return_value=True)
28
- def test_run_with_existing_file_does_not_overwrite(mock_input, mock_exists, capfd):
28
+ @patch("ara_cli.artefact_creator.os.listdir", return_value=["data_folder_content"])
29
+ def test_run_with_existing_file_does_not_overwrite(mock_input, mock_exists, mock_list, capfd):
29
30
  fc = ArtefactCreator()
30
31
  fc.run("filename", "vision")
31
32
 
@@ -42,6 +43,7 @@ def test_create_artefact_exploration_success():
42
43
  creator.create_artefact_prompt_files("./dest", "./source", "sample")
43
44
 
44
45
 
46
+
45
47
  def test_create_artefact_exploration_source_not_found():
46
48
  creator = ArtefactCreator()
47
49
 
ara_cli/version.py CHANGED
@@ -1,2 +1,2 @@
1
1
  # version.py
2
- __version__ = "0.1.9.58" # fith parameter like .0 for local install test purposes only. official numbers should be 4 digit numbers
2
+ __version__ = "0.1.9.60" # fith parameter like .0 for local install test purposes only. official numbers should be 4 digit numbers
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
2
- Name: ara-cli
3
- Version: 0.1.9.58
1
+ Metadata-Version: 2.4
2
+ Name: ara_cli
3
+ Version: 0.1.9.60
4
4
  Requires-Dist: litellm
5
5
  Requires-Dist: llama-index
6
6
  Requires-Dist: llama-index-llms-openai
@@ -10,6 +10,6 @@ Requires-Dist: markdown-it-py
10
10
  Requires-Dist: json-repair
11
11
  Requires-Dist: argparse
12
12
  Requires-Dist: argcomplete
13
- Requires-Dist: cmd2 >=2.5
13
+ Requires-Dist: cmd2>=2.5
14
14
  Requires-Dist: pydantic
15
-
15
+ Dynamic: requires-dist
@@ -4,7 +4,7 @@ ara_cli/analyse_artefacts.py,sha256=JwA2zxkCy8vNOHoU9f3TICJesXRRXndHi2hT5m_uQ8Q,
4
4
  ara_cli/ara_command_action.py,sha256=OsmNJ9XHVMPveVO0kxlYNU5vR16bX9Sn7mGKaOieZqg,18925
5
5
  ara_cli/ara_command_parser.py,sha256=HluFJimQbxS_yuZ2IzLcsfUPrmIJbKJB71YvsGiUXQE,16883
6
6
  ara_cli/ara_config.py,sha256=_Arkr-b9XnrNHbBlFKb9tAo3OmdP4ZZiWvbY9m6Sbo0,4178
7
- ara_cli/artefact_creator.py,sha256=s0hY8-X0EAwEfZvIRK1F67bW55tB-EvgnvH2gYNTGpY,6022
7
+ ara_cli/artefact_creator.py,sha256=Kbs0hloEGUUyInZVPimeqYtJYc70px6m7aFtJWeJU5U,6159
8
8
  ara_cli/artefact_deleter.py,sha256=Co4wwCH3yW8H9NrOq7_2p5571EeHr0TsfE-H8KqoOfY,1900
9
9
  ara_cli/artefact_fuzzy_search.py,sha256=XAvoiRafd1u21uKbX5-bow7hdq7uiLLy1KtxHNAFbCk,1337
10
10
  ara_cli/artefact_link_updater.py,sha256=itMS_Z64jE8bBly9WA01z8PqkBeNW6ntTO7ryMeCTRg,3703
@@ -31,7 +31,7 @@ ara_cli/run_file_lister.py,sha256=XbrrDTJXp1LFGx9Lv91SNsEHZPP-PyEMBF_P4btjbDA,23
31
31
  ara_cli/tag_extractor.py,sha256=R5T103Y60NppYifKV7b8KoI5kE1M66fULz6f_Fdc9VU,1081
32
32
  ara_cli/template_manager.py,sha256=YXPj2jGNDb-diIHFEK_vGJ-ZucodnXSGAPofKTnOofI,6633
33
33
  ara_cli/update_config_prompt.py,sha256=PZgNIN3dTw6p80GyX8Sp5apkAhSoykwnkEbHo3IOkUo,4571
34
- ara_cli/version.py,sha256=qdSo9o1YwdXa0HfBW8B4HWfKm2lrHaX0bWf7t1Rum4c,146
34
+ ara_cli/version.py,sha256=lJSAoY11nbjwbD8FiJoiAKgyv0FNBfcMfo_JyCTBpjw,146
35
35
  ara_cli/artefact_models/artefact_load.py,sha256=dNcwZDW2Dk0bts9YnPZ0ESmWD2NbsLIvl4Z-qQeGmTQ,401
36
36
  ara_cli/artefact_models/artefact_mapping.py,sha256=8aD0spBjkJ8toMAmFawc6UTUxB6-tEEViZXv2I-r88Q,1874
37
37
  ara_cli/artefact_models/artefact_model.py,sha256=vV-Hhtl6DwVt7qcFTnxxr_WqyTZnKtkFU-nryVnTbUg,14853
@@ -142,14 +142,14 @@ ara_cli/tests/test_chat.py,sha256=V75baLk2ZFz5WDSFTlvdbmMb6Dm7o12xoFEulmMgMDI,46
142
142
  ara_cli/tests/test_classifier.py,sha256=grYGPksydNdPsaEBQxYHZTuTdcJWz7VQtikCKA6BNaQ,1920
143
143
  ara_cli/tests/test_directory_navigator.py,sha256=7G0MVrBbtBvbrFUpL0zb_9EkEWi1dulWuHsrQxMJxDY,140
144
144
  ara_cli/tests/test_file_classifier.py,sha256=6OYM-lYVYjxq4Qwl8U1btv_FYJhc5t3rKjYr2CXZ4uI,10069
145
- ara_cli/tests/test_file_creator.py,sha256=ssrl7gfU13H4ogrrX1BXx4WO4bQ7OG1R2tXZC1MP8EY,2004
145
+ ara_cli/tests/test_file_creator.py,sha256=G257M1duenDrgLCSql3wVWNuzcxyQqLQDybfbxiGYN0,2100
146
146
  ara_cli/tests/test_file_lister.py,sha256=f6B_vIv-wAulKH2ZGgNg4SG79XqGGbfwoIvZlbEnYyM,4306
147
147
  ara_cli/tests/test_list_filter.py,sha256=gSRKirTtFuhRS3QlFHqWl89WvCvAdVEnFsCWTYmgB2o,7928
148
148
  ara_cli/tests/test_tag_extractor.py,sha256=n2xNApbDciqKO3QuaveEWSPXU1PCUa_EhxlZMrukONw,2074
149
149
  ara_cli/tests/test_template_manager.py,sha256=bRxka6cxHsCAOvXjfG8MrVO8qSZXhxW01tnph80UtNk,3143
150
150
  ara_cli/tests/test_update_config_prompt.py,sha256=vSsLvc18HZdVjVM93qXWVbJt752xTLL6VGjSVCrPufk,6729
151
- ara_cli-0.1.9.58.dist-info/METADATA,sha256=c_8LXIyOHDd4PIFaHlL0x6C4CPg3dSAqvQg38xZ4YL4,367
152
- ara_cli-0.1.9.58.dist-info/WHEEL,sha256=5sUXSg9e4bi7lTLOHcm6QEYwO5TIF1TNbTSVFVjcJcc,92
153
- ara_cli-0.1.9.58.dist-info/entry_points.txt,sha256=v4h7MzysTgSIDYfEo3oj4Kz_8lzsRa3hq-KJHEcLVX8,45
154
- ara_cli-0.1.9.58.dist-info/top_level.txt,sha256=zzee_PwFmKqfBi9XgIunP6xy2S4TIt593CLLxenNaAE,8
155
- ara_cli-0.1.9.58.dist-info/RECORD,,
151
+ ara_cli-0.1.9.60.dist-info/METADATA,sha256=WTu3iMjkrTJdAdbFBxMqAgF3CI8sVqnqIM9zxzGLvos,388
152
+ ara_cli-0.1.9.60.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
153
+ ara_cli-0.1.9.60.dist-info/entry_points.txt,sha256=v4h7MzysTgSIDYfEo3oj4Kz_8lzsRa3hq-KJHEcLVX8,45
154
+ ara_cli-0.1.9.60.dist-info/top_level.txt,sha256=zzee_PwFmKqfBi9XgIunP6xy2S4TIt593CLLxenNaAE,8
155
+ ara_cli-0.1.9.60.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.41.1)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5