alita-sdk 0.3.280__py3-none-any.whl → 0.3.281__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.
@@ -283,6 +283,7 @@ class VectorStoreWrapper(BaseToolApiWrapper):
283
283
 
284
284
  for document in documents:
285
285
  key = key_fn(document)
286
+ key = key if isinstance(key, str) else str(key)
286
287
  if key in indexed_keys and collection_suffix == indexed_data[key]['metadata'].get('collection'):
287
288
  if compare_fn(document, indexed_data[key]):
288
289
  # Disabled addition of new collection to already indexed documents
@@ -363,8 +363,20 @@ class TestPlanApiWrapper(NonCodeIndexerToolkit):
363
363
  logger.error(f"Error getting test cases: {e}")
364
364
  return ToolException(f"Error getting test cases: {e}")
365
365
 
366
- def _base_loader(self, plan_id: str, suite_ids: Optional[list[str]] = [], chunking_tool: str = None, **kwargs) -> Generator[Document, None, None]:
366
+ def get_suites_in_plan(self, plan_id: int) -> List[dict]:
367
+ """Get all test suites in a test plan."""
368
+ try:
369
+ test_suites = self._client.get_test_suites_for_plan(self.project, plan_id)
370
+ return [suite.as_dict() for suite in test_suites]
371
+ except Exception as e:
372
+ logger.error(f"Error getting test suites: {e}")
373
+ return ToolException(f"Error getting test suites: {e}")
374
+
375
+ def _base_loader(self, plan_id: int, suite_ids: Optional[List[int]] = [], chunking_tool: str = None, **kwargs) -> Generator[Document, None, None]:
367
376
  cases = []
377
+ if not suite_ids:
378
+ suites = self.get_suites_in_plan(plan_id)
379
+ suite_ids = [suite['id'] for suite in suites if 'id' in suite]
368
380
  for sid in suite_ids:
369
381
  cases.extend(self.get_test_cases(plan_id, sid))
370
382
  #
@@ -381,6 +393,7 @@ class TestPlanApiWrapper(NonCodeIndexerToolkit):
381
393
  'suite_id': case.get('test_suite', {}).get('id', ''),
382
394
  'description': data.get('System.Description', ''),
383
395
  'updated_on': data.get('System.Rev', ''),
396
+ # content is in metadata for chunking tool post-processing
384
397
  IndexerKeywords.CONTENT_IN_BYTES.value: data.get('Microsoft.VSTS.TCM.Steps', '').encode("utf-8")
385
398
  })
386
399
  else:
@@ -398,8 +411,10 @@ class TestPlanApiWrapper(NonCodeIndexerToolkit):
398
411
  def _index_tool_params(self):
399
412
  """Return the parameters for indexing data."""
400
413
  return {
401
- "plan_id": (str, Field(description="ID of the test plan for which test cases are requested")),
402
- "suite_ids": (Optional[List[str]], Field(description='List of test suite IDs for which test cases are requested (can be empty). Example: ["2", "23"]', default=[])),
414
+ "plan_id": (int, Field(description="ID of the test plan for which test cases are requested")),
415
+ "suite_ids": (Optional[List[int]], Field(description='List of test suite IDs for which test cases are requested '
416
+ '(can be empty for all suites indexing from the plan). '
417
+ 'Example: [2, 23]', default=[])),
403
418
  'chunking_tool':(Literal['html'], Field(description="Name of chunking tool", default='html'))
404
419
  }
405
420
 
@@ -240,6 +240,7 @@ class BaseIndexerToolkit(VectorStoreWrapperBase):
240
240
 
241
241
  for document in documents:
242
242
  key = self.key_fn(document)
243
+ key = key if isinstance(key, str) else str(key)
243
244
  if key in indexed_keys and collection_suffix == indexed_data[key]['metadata'].get('collection'):
244
245
  if self.compare_fn(document, indexed_data[key]):
245
246
  continue
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: alita_sdk
3
- Version: 0.3.280
3
+ Version: 0.3.281
4
4
  Summary: SDK for building langchain agents using resources from Alita
5
5
  Author-email: Artem Rozumenko <artyom.rozumenko@gmail.com>, Mikalai Biazruchka <mikalai_biazruchka@epam.com>, Roman Mitusov <roman_mitusov@epam.com>, Ivan Krakhmaliuk <lifedjik@gmail.com>, Artem Dubrovskiy <ad13box@gmail.com>
6
6
  License-Expression: Apache-2.0
@@ -118,7 +118,7 @@ alita_sdk/runtime/tools/pgvector_search.py,sha256=NN2BGAnq4SsDHIhUcFZ8d_dbEOM8Qw
118
118
  alita_sdk/runtime/tools/prompt.py,sha256=nJafb_e5aOM1Rr3qGFCR-SKziU9uCsiP2okIMs9PppM,741
119
119
  alita_sdk/runtime/tools/router.py,sha256=wCvZjVkdXK9dMMeEerrgKf5M790RudH68pDortnHSz0,1517
120
120
  alita_sdk/runtime/tools/tool.py,sha256=lE1hGi6qOAXG7qxtqxarD_XMQqTghdywf261DZawwno,5631
121
- alita_sdk/runtime/tools/vectorstore.py,sha256=U2TNZEp6QmoERXbuL5MyEl7HUbyestCH2_dVcAkiA7A,35766
121
+ alita_sdk/runtime/tools/vectorstore.py,sha256=PN_Im5pkbFR6vXUhlBppEwHEhsg-UsO9eYrMS8UstFk,35826
122
122
  alita_sdk/runtime/tools/vectorstore_base.py,sha256=CTAsQXImOHjlcddU2hoqyRAf8iNaDMTfr0pJbIaOG7o,27744
123
123
  alita_sdk/runtime/utils/AlitaCallback.py,sha256=E4LlSBuCHWiUq6W7IZExERHZY0qcmdjzc_rJlF2iQIw,7356
124
124
  alita_sdk/runtime/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -131,7 +131,7 @@ alita_sdk/runtime/utils/toolkit_runtime.py,sha256=MU63Fpxj0b5_r1IUUc0Q3-PN9VwL7r
131
131
  alita_sdk/runtime/utils/toolkit_utils.py,sha256=I9QFqnaqfVgN26LUr6s3XlBlG6y0CoHURnCzG7XcwVs,5311
132
132
  alita_sdk/runtime/utils/utils.py,sha256=VXNLsdeTmf6snn9EtUyobv4yL-xzLhUcH8P_ORMifYc,675
133
133
  alita_sdk/tools/__init__.py,sha256=8oFahbggsv8h7hEqqeQ4iF6g2m85Ki17iSeknviCNis,10613
134
- alita_sdk/tools/base_indexer_toolkit.py,sha256=WOwGICQX4iylVTc2jzE5TfjffYkliju5WvsF-XvmO4c,19262
134
+ alita_sdk/tools/base_indexer_toolkit.py,sha256=h3KnF4_tgAkxWUjW8djPUyNEKpI24kU6LDjCnJtxE-o,19322
135
135
  alita_sdk/tools/elitea_base.py,sha256=aoh4fjNHIem8jzPPqtvxD4PtkGgN3KBQwrMqb9f6k00,32991
136
136
  alita_sdk/tools/non_code_indexer_toolkit.py,sha256=v9uq1POE1fQKCd152mbqDtF-HSe0qoDj83k4E5LAkMI,1080
137
137
  alita_sdk/tools/ado/__init__.py,sha256=u2tdDgufGuDb-7lIgKKQlqgStL9Wd1gzNmRNYems2c0,1267
@@ -139,7 +139,7 @@ alita_sdk/tools/ado/utils.py,sha256=PTCludvaQmPLakF2EbCGy66Mro4-rjDtavVP-xcB2Wc,
139
139
  alita_sdk/tools/ado/repos/__init__.py,sha256=n-IhKED05RwQGWT4LfCaxJ85uDyG4S9zTjSjK6A8N4o,5192
140
140
  alita_sdk/tools/ado/repos/repos_wrapper.py,sha256=e3bGsM03m0UggSQfoVh5Gg_M1MYt_BTKS-s9G2Unc1k,49739
141
141
  alita_sdk/tools/ado/test_plan/__init__.py,sha256=4fEw_3cm4shuZ868HhAU-uMH3xNXPyb3uRjyNWoBKls,5243
142
- alita_sdk/tools/ado/test_plan/test_plan_wrapper.py,sha256=W9xTSErS8vZt92KU2800Vwjg0Bmfm3XOw90IEC9iBN0,21102
142
+ alita_sdk/tools/ado/test_plan/test_plan_wrapper.py,sha256=p3mbBiu0jthZG-Bj2-duO7DDZQ4LHYZ6Q1nOVd-KTrc,21944
143
143
  alita_sdk/tools/ado/wiki/__init__.py,sha256=uBKo_Meu2ZxMxcxGsMmvCXyplRE2um1_PIRvdYd37rM,5171
144
144
  alita_sdk/tools/ado/wiki/ado_wrapper.py,sha256=AjavSE3peuQ-uONQmmfT3MS_8mxeSBRv7Q5QHt0Z2KU,14952
145
145
  alita_sdk/tools/ado/work_item/__init__.py,sha256=HNcdIMwTSNe-25_Pg-KmVVXTFci3vNa84tkTFkls36c,5373
@@ -347,8 +347,8 @@ alita_sdk/tools/zephyr_scale/api_wrapper.py,sha256=HOt9ShtJI_1tVPcwd3Rwk-VS0SMLq
347
347
  alita_sdk/tools/zephyr_squad/__init__.py,sha256=0AI_j27xVO5Gk5HQMFrqPTd4uvuVTpiZUicBrdfEpKg,2796
348
348
  alita_sdk/tools/zephyr_squad/api_wrapper.py,sha256=kmw_xol8YIYFplBLWTqP_VKPRhL_1ItDD0_vXTe_UuI,14906
349
349
  alita_sdk/tools/zephyr_squad/zephyr_squad_cloud_client.py,sha256=R371waHsms4sllHCbijKYs90C-9Yu0sSR3N4SUfQOgU,5066
350
- alita_sdk-0.3.280.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
351
- alita_sdk-0.3.280.dist-info/METADATA,sha256=QOuDXtWQ5nKGzPVKGd0QQ7_-TnV69apgQfMhbAPaX6Q,18897
352
- alita_sdk-0.3.280.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
353
- alita_sdk-0.3.280.dist-info/top_level.txt,sha256=0vJYy5p_jK6AwVb1aqXr7Kgqgk3WDtQ6t5C-XI9zkmg,10
354
- alita_sdk-0.3.280.dist-info/RECORD,,
350
+ alita_sdk-0.3.281.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
351
+ alita_sdk-0.3.281.dist-info/METADATA,sha256=ZiYq3cmMaWw-f-W9eHMQAHSl1OKlPTn7enCmmtnXeao,18897
352
+ alita_sdk-0.3.281.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
353
+ alita_sdk-0.3.281.dist-info/top_level.txt,sha256=0vJYy5p_jK6AwVb1aqXr7Kgqgk3WDtQ6t5C-XI9zkmg,10
354
+ alita_sdk-0.3.281.dist-info/RECORD,,