github-haystack 2.0.0__py3-none-any.whl → 2.1.0__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: github-haystack
3
- Version: 2.0.0
3
+ Version: 2.1.0
4
4
  Summary: Haystack components for interacting with GitHub repositories
5
5
  Project-URL: Source, https://github.com/deepset-ai/haystack-core-integrations/github
6
6
  Project-URL: Documentation, https://github.com/deepset-ai/haystack-core-integrations/blob/main/integrations/github/README.md
@@ -15,6 +15,7 @@ Classifier: Programming Language :: Python :: 3.10
15
15
  Classifier: Programming Language :: Python :: 3.11
16
16
  Classifier: Programming Language :: Python :: 3.12
17
17
  Classifier: Programming Language :: Python :: 3.13
18
+ Classifier: Programming Language :: Python :: 3.14
18
19
  Classifier: Programming Language :: Python :: Implementation :: CPython
19
20
  Classifier: Programming Language :: Python :: Implementation :: PyPy
20
21
  Requires-Python: >=3.10
@@ -1,11 +1,11 @@
1
1
  haystack_integrations/components/connectors/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  haystack_integrations/components/connectors/github/__init__.py,sha256=aRIkCcJ_ogsyt67cwjZQu8rqP7yIQu8jRzK6TAYRGx4,557
3
- haystack_integrations/components/connectors/github/file_editor.py,sha256=4bRBaFIQO8MPWrrLr6_W11bDbaNRQC7-fcMJpWhO2Pw,11752
4
- haystack_integrations/components/connectors/github/issue_commenter.py,sha256=G_jtdzNwOr5qEnRy-GR888qo25oKwX-_e6yQWNZTMH4,5682
5
- haystack_integrations/components/connectors/github/issue_viewer.py,sha256=CJ3MFHpx_Ix0_p6ogCf5Lp8Si-HZxIKczstbk8uptzU,7413
6
- haystack_integrations/components/connectors/github/pr_creator.py,sha256=m3jMxGBaiw6EoYhYSFeEFBwGvZTXUaO_tJh5Iw-7o3U,11479
7
- haystack_integrations/components/connectors/github/repo_forker.py,sha256=DXw8GHRVXlvqs9s24XTW6Z0uAIuzhSb8lTKx-NgLi28,11573
8
- haystack_integrations/components/connectors/github/repo_viewer.py,sha256=DK_zStASIt7p5xX_SRd8l8WypsL3R1v5FoNBcx1cakQ,9232
3
+ haystack_integrations/components/connectors/github/file_editor.py,sha256=zX_mHWp64QU20vhXAY93o71lWBlDabDYcuof0SR2EO8,11760
4
+ haystack_integrations/components/connectors/github/issue_commenter.py,sha256=fqz9GdzSj4TFOtGAPGn6taYDZ9UTosqYHEb5WV_MhT8,5690
5
+ haystack_integrations/components/connectors/github/issue_viewer.py,sha256=uZMRQ6k7sGqMZXpQU9kje22oUf-H6bCJsG7By0pTFtY,7421
6
+ haystack_integrations/components/connectors/github/pr_creator.py,sha256=U373KDr5Iqkky4hbvd4JYARAeXbcPBrNcCTaq78DogE,11526
7
+ haystack_integrations/components/connectors/github/repo_forker.py,sha256=brM8W0KOuFlvFVORL2pjyJ7j5IqSqV24onmJEPb_IYg,11581
8
+ haystack_integrations/components/connectors/github/repo_viewer.py,sha256=vr4-gNssXQiIy3c0XB_cIuhPBW2kOWigfgHQ3-lmew4,9240
9
9
  haystack_integrations/prompts/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
10
  haystack_integrations/prompts/github/__init__.py,sha256=cs_w-7RycC2C9q35pN0jY-McAHWbTIM-j_O2S-AIM7Q,882
11
11
  haystack_integrations/prompts/github/context_prompt.py,sha256=RSzISqtaBHaC7v6rcyyxt2vxmbBVp5OHsWR6Z2wp5pk,8783
@@ -18,14 +18,14 @@ haystack_integrations/prompts/github/repo_viewer_prompt.py,sha256=JkU2ODn06Vs_YQ
18
18
  haystack_integrations/prompts/github/system_prompt.py,sha256=xiOEAbENJiLHL8M1qrgSdUxrfguAphI_6B0kqelxDok,4209
19
19
  haystack_integrations/tools/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
20
20
  haystack_integrations/tools/github/__init__.py,sha256=ZJKLyVZRXcg5mU-AdH_Xk1rNLeiItlPqgmY6eTqFSTA,611
21
- haystack_integrations/tools/github/file_editor_tool.py,sha256=BBc0a6gqoQLcsYXUnDwaoqvjFWagNmTpOP8hul99AZw,5149
22
- haystack_integrations/tools/github/issue_commenter_tool.py,sha256=NDZCE3ZQlJ9qhyfStF8plbHy0jI8wsNtg3dmlPvwX3A,5099
23
- haystack_integrations/tools/github/issue_viewer_tool.py,sha256=-CWpyX1hl4BREMOjOPnvX0skeHIupdyltHNCBE5PpLc,5036
24
- haystack_integrations/tools/github/pr_creator_tool.py,sha256=Xx5HSswLuVorum5Hizlj_IW3_Wl9eXN3yb5J5ZMtirw,4798
25
- haystack_integrations/tools/github/repo_forker_tool.py,sha256=3Lv9ukJnSSs-5rlw1iW82ftr407yuuSVTHtfQPv7d0I,4808
26
- haystack_integrations/tools/github/repo_viewer_tool.py,sha256=YmyKqXQJLF1xU8-ZuFf03xcZfNILYnqVn_O_DQ1zOL0,5851
27
- haystack_integrations/tools/github/utils.py,sha256=5j9AASDRg7lB01njb7Z7Y2Hlu6gVa5oYJoh1-6IG3TY,3292
28
- github_haystack-2.0.0.dist-info/METADATA,sha256=lgM-n9sEIc7nXDc9LGWrU8KFf6hqchhx9qyrSqo_JO0,1722
29
- github_haystack-2.0.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
30
- github_haystack-2.0.0.dist-info/licenses/LICENSE.txt,sha256=B05uMshqTA74s-0ltyHKI6yoPfJ3zYgQbvcXfDVGFf8,10280
31
- github_haystack-2.0.0.dist-info/RECORD,,
21
+ haystack_integrations/tools/github/file_editor_tool.py,sha256=mCY8bb3lmxLIpsCqYsVRrYlRPiyNy9rapdgsKK94afA,5157
22
+ haystack_integrations/tools/github/issue_commenter_tool.py,sha256=o3OAFDThWtBvEP646Rw0Bj91F1zoYjJRVQbTbJeV1Fw,5107
23
+ haystack_integrations/tools/github/issue_viewer_tool.py,sha256=Hf1hj9mdkGpZZgZNi-9eXp_kTRHuRZeDtuRShoYlwj0,5044
24
+ haystack_integrations/tools/github/pr_creator_tool.py,sha256=0IORDKBM8HTjeURrbj4BMiOWs8ns0DdAX_Sd3ednto4,4806
25
+ haystack_integrations/tools/github/repo_forker_tool.py,sha256=UUzerVSRiEtmwAuoy3ucT8jBHPq61WEIfqyNVT0Y2mE,4816
26
+ haystack_integrations/tools/github/repo_viewer_tool.py,sha256=ddwZcqK4xkZ8P6x6726ckddt04_96DDyZfg1mGX8d3E,5859
27
+ haystack_integrations/tools/github/utils.py,sha256=2CzPUxRFRlxW4mWvFlpiZRvNMGnV0f33LHrmXrreT-c,3302
28
+ github_haystack-2.1.0.dist-info/METADATA,sha256=aNG5i9CvZXi81y18aBUV3T8ZL3xJYFACNWwY6aoXWVE,1773
29
+ github_haystack-2.1.0.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
30
+ github_haystack-2.1.0.dist-info/licenses/LICENSE.txt,sha256=B05uMshqTA74s-0ltyHKI6yoPfJ3zYgQbvcXfDVGFf8,10280
31
+ github_haystack-2.1.0.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.28.0
2
+ Generator: hatchling 1.29.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -82,7 +82,7 @@ class GitHubFileEditor:
82
82
  repo: str | None = None,
83
83
  branch: str = "main",
84
84
  raise_on_failure: bool = True,
85
- ):
85
+ ) -> None:
86
86
  """
87
87
  Initialize the component.
88
88
 
@@ -41,7 +41,7 @@ class GitHubIssueCommenter:
41
41
  github_token: Secret = Secret.from_env_var("GITHUB_TOKEN"),
42
42
  raise_on_failure: bool = True,
43
43
  retry_attempts: int = 2,
44
- ):
44
+ ) -> None:
45
45
  """
46
46
  Initialize the component.
47
47
 
@@ -40,7 +40,7 @@ class GitHubIssueViewer:
40
40
  github_token: Secret | None = None,
41
41
  raise_on_failure: bool = True,
42
42
  retry_attempts: int = 2,
43
- ):
43
+ ) -> None:
44
44
  """
45
45
  Initialize the component.
46
46
 
@@ -38,7 +38,12 @@ class GitHubPRCreator:
38
38
  ```
39
39
  """
40
40
 
41
- def __init__(self, *, github_token: Secret = Secret.from_env_var("GITHUB_TOKEN"), raise_on_failure: bool = True):
41
+ def __init__(
42
+ self,
43
+ *,
44
+ github_token: Secret = Secret.from_env_var("GITHUB_TOKEN"),
45
+ raise_on_failure: bool = True,
46
+ ) -> None:
42
47
  """
43
48
  Initialize the component.
44
49
 
@@ -48,7 +48,7 @@ class GitHubRepoForker:
48
48
  poll_interval: int = 2,
49
49
  auto_sync: bool = True,
50
50
  create_branch: bool = True,
51
- ):
51
+ ) -> None:
52
52
  """
53
53
  Initialize the component.
54
54
 
@@ -76,7 +76,7 @@ class GitHubRepoViewer:
76
76
  max_file_size: int = 1_000_000, # 1MB default limit
77
77
  repo: str | None = None,
78
78
  branch: str = "main",
79
- ):
79
+ ) -> None:
80
80
  """
81
81
  Initialize the component.
82
82
 
@@ -31,7 +31,7 @@ class GitHubFileEditorTool(ComponentTool):
31
31
  outputs_to_string: dict[str, str | Callable[[Any], str]] | None = None,
32
32
  inputs_from_state: dict[str, str] | None = None,
33
33
  outputs_to_state: dict[str, dict[str, str | Callable]] | None = None,
34
- ):
34
+ ) -> None:
35
35
  """
36
36
  Initialize the GitHub file editor tool.
37
37
 
@@ -30,7 +30,7 @@ class GitHubIssueCommenterTool(ComponentTool):
30
30
  outputs_to_string: dict[str, str | Callable[[Any], str]] | None = None,
31
31
  inputs_from_state: dict[str, str] | None = None,
32
32
  outputs_to_state: dict[str, dict[str, str | Callable]] | None = None,
33
- ):
33
+ ) -> None:
34
34
  """
35
35
  Initialize the GitHub issue commenter tool.
36
36
 
@@ -30,7 +30,7 @@ class GitHubIssueViewerTool(ComponentTool):
30
30
  outputs_to_string: dict[str, str | Callable[[Any], str]] | None = None,
31
31
  inputs_from_state: dict[str, str] | None = None,
32
32
  outputs_to_state: dict[str, dict[str, str | Callable]] | None = None,
33
- ):
33
+ ) -> None:
34
34
  """
35
35
  Initialize the GitHub issue viewer tool.
36
36
 
@@ -29,7 +29,7 @@ class GitHubPRCreatorTool(ComponentTool):
29
29
  outputs_to_string: dict[str, str | Callable[[Any], str]] | None = None,
30
30
  inputs_from_state: dict[str, str] | None = None,
31
31
  outputs_to_state: dict[str, dict[str, str | Callable]] | None = None,
32
- ):
32
+ ) -> None:
33
33
  """
34
34
  Initialize the GitHub PR creator tool.
35
35
 
@@ -29,7 +29,7 @@ class GitHubRepoForkerTool(ComponentTool):
29
29
  outputs_to_string: dict[str, str | Callable[[Any], str]] | None = None,
30
30
  inputs_from_state: dict[str, str] | None = None,
31
31
  outputs_to_state: dict[str, dict[str, str | Callable]] | None = None,
32
- ):
32
+ ) -> None:
33
33
  """
34
34
  Initialize the GitHub Repo Forker tool.
35
35
 
@@ -32,7 +32,7 @@ class GitHubRepoViewerTool(ComponentTool):
32
32
  outputs_to_string: dict[str, str | Callable[[Any], str]] | None = None,
33
33
  inputs_from_state: dict[str, str] | None = None,
34
34
  outputs_to_state: dict[str, dict[str, str | Callable]] | None = None,
35
- ):
35
+ ) -> None:
36
36
  """
37
37
  Initialize the GitHub repository viewer tool.
38
38
 
@@ -21,7 +21,7 @@ def message_handler(documents: list[Document], max_length: int = 150_000) -> str
21
21
  result_str = ""
22
22
  for document in documents:
23
23
  if document.meta["type"] in ["file", "dir", "error"]:
24
- result_str += document.content or "" + "\n"
24
+ result_str += (document.content or "") + "\n"
25
25
  else:
26
26
  result_str += f"File Content for {document.meta['path']}\n\n"
27
27
  result_str += document.content or ""
@@ -29,7 +29,7 @@ def message_handler(documents: list[Document], max_length: int = 150_000) -> str
29
29
  if len(result_str) > max_length:
30
30
  result_str = result_str[:max_length] + "...(large file can't be fully displayed)"
31
31
 
32
- return result_str
32
+ return result_str.strip()
33
33
 
34
34
 
35
35
  def serialize_handlers(