github-haystack 2.0.0__py3-none-any.whl → 3.0.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.
- {github_haystack-2.0.0.dist-info → github_haystack-3.0.0.dist-info}/METADATA +5 -4
- {github_haystack-2.0.0.dist-info → github_haystack-3.0.0.dist-info}/RECORD +18 -18
- {github_haystack-2.0.0.dist-info → github_haystack-3.0.0.dist-info}/WHEEL +1 -1
- {github_haystack-2.0.0.dist-info → github_haystack-3.0.0.dist-info}/licenses/LICENSE.txt +1 -1
- haystack_integrations/components/connectors/github/file_editor.py +2 -2
- haystack_integrations/components/connectors/github/issue_commenter.py +1 -1
- haystack_integrations/components/connectors/github/issue_viewer.py +1 -1
- haystack_integrations/components/connectors/github/pr_creator.py +7 -2
- haystack_integrations/components/connectors/github/repo_forker.py +1 -1
- haystack_integrations/components/connectors/github/repo_viewer.py +1 -1
- haystack_integrations/prompts/github/context_prompt.py +0 -5
- haystack_integrations/tools/github/file_editor_tool.py +1 -1
- haystack_integrations/tools/github/issue_commenter_tool.py +1 -1
- haystack_integrations/tools/github/issue_viewer_tool.py +1 -1
- haystack_integrations/tools/github/pr_creator_tool.py +1 -1
- haystack_integrations/tools/github/repo_forker_tool.py +1 -1
- haystack_integrations/tools/github/repo_viewer_tool.py +1 -1
- haystack_integrations/tools/github/utils.py +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
2
|
Name: github-haystack
|
|
3
|
-
Version:
|
|
3
|
+
Version: 3.0.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
|
|
@@ -11,13 +11,14 @@ License-File: LICENSE.txt
|
|
|
11
11
|
Classifier: Development Status :: 4 - Beta
|
|
12
12
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
13
13
|
Classifier: Programming Language :: Python
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
15
14
|
Classifier: Programming Language :: Python :: 3.11
|
|
16
15
|
Classifier: Programming Language :: Python :: 3.12
|
|
17
16
|
Classifier: Programming Language :: Python :: 3.13
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
18
19
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
19
20
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
20
|
-
Requires-Python: >=3.
|
|
21
|
+
Requires-Python: >=3.11
|
|
21
22
|
Requires-Dist: haystack-ai>=2.22.0
|
|
22
23
|
Description-Content-Type: text/markdown
|
|
23
24
|
|
|
@@ -1,14 +1,14 @@
|
|
|
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=
|
|
4
|
-
haystack_integrations/components/connectors/github/issue_commenter.py,sha256=
|
|
5
|
-
haystack_integrations/components/connectors/github/issue_viewer.py,sha256=
|
|
6
|
-
haystack_integrations/components/connectors/github/pr_creator.py,sha256=
|
|
7
|
-
haystack_integrations/components/connectors/github/repo_forker.py,sha256=
|
|
8
|
-
haystack_integrations/components/connectors/github/repo_viewer.py,sha256=
|
|
3
|
+
haystack_integrations/components/connectors/github/file_editor.py,sha256=RQyhHVuahDCTYFjsHtelG0FlkX1CqhteuLHTUHxSi0k,11824
|
|
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=L5O9GSBTs1FnqeeWHOsPn-Q70fL8OR7zRQdAf3zAvu4,11542
|
|
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
|
-
haystack_integrations/prompts/github/context_prompt.py,sha256=
|
|
11
|
+
haystack_integrations/prompts/github/context_prompt.py,sha256=RjjhXiSomHO4JkLP8uA0NtKSBekPRk_Czvd3UwNDJPs,8683
|
|
12
12
|
haystack_integrations/prompts/github/file_editor_prompt.py,sha256=_ro-I3MbVIpYpVFJbSpj4TuzbKLX7wTGn55Q95q8jFE,3301
|
|
13
13
|
haystack_integrations/prompts/github/issue_commenter_prompt.py,sha256=EPynR1z6joRMowsse5hHjkDmpQljYeEBK4fCCxeBCvY,904
|
|
14
14
|
haystack_integrations/prompts/github/issue_viewer_prompt.py,sha256=QlEjfrnoTRiZYlbySMbGu2EP2jfi62c3qfEPNuV_bUc,930
|
|
@@ -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=
|
|
22
|
-
haystack_integrations/tools/github/issue_commenter_tool.py,sha256=
|
|
23
|
-
haystack_integrations/tools/github/issue_viewer_tool.py,sha256
|
|
24
|
-
haystack_integrations/tools/github/pr_creator_tool.py,sha256=
|
|
25
|
-
haystack_integrations/tools/github/repo_forker_tool.py,sha256=
|
|
26
|
-
haystack_integrations/tools/github/repo_viewer_tool.py,sha256=
|
|
27
|
-
haystack_integrations/tools/github/utils.py,sha256=
|
|
28
|
-
github_haystack-
|
|
29
|
-
github_haystack-
|
|
30
|
-
github_haystack-
|
|
31
|
-
github_haystack-
|
|
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-3.0.0.dist-info/METADATA,sha256=zzRSrzSgzpugwkkI13Tu1FlZ4lgLm41A8oDq93H4qJU,1773
|
|
29
|
+
github_haystack-3.0.0.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
|
|
30
|
+
github_haystack-3.0.0.dist-info/licenses/LICENSE.txt,sha256=44lZUs4xwRaQpUSwfedbIAcWD1SbNxUJ4rMaD2ueerM,10273
|
|
31
|
+
github_haystack-3.0.0.dist-info/RECORD,,
|
|
@@ -58,7 +58,7 @@ APPENDIX: How to apply the Apache License to your work.
|
|
|
58
58
|
|
|
59
59
|
To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
|
|
60
60
|
|
|
61
|
-
Copyright
|
|
61
|
+
Copyright 2023-present deepset GmbH
|
|
62
62
|
|
|
63
63
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
64
64
|
you may not use this file except in compliance with the License.
|
|
@@ -12,7 +12,7 @@ from haystack.utils import Secret, deserialize_secrets_inplace
|
|
|
12
12
|
logger = logging.getLogger(__name__)
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
class Command(str, Enum):
|
|
15
|
+
class Command(str, Enum): # noqa: UP042 # StrEnum would change str() of this public enum
|
|
16
16
|
"""
|
|
17
17
|
Available commands for file operations in GitHub.
|
|
18
18
|
|
|
@@ -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
|
|
|
@@ -38,7 +38,12 @@ class GitHubPRCreator:
|
|
|
38
38
|
```
|
|
39
39
|
"""
|
|
40
40
|
|
|
41
|
-
def __init__(
|
|
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
|
|
|
@@ -243,7 +248,7 @@ class GitHubPRCreator:
|
|
|
243
248
|
# For cross-repository PRs, head must be in the format username:branch
|
|
244
249
|
head = f"{fork_owner}:{branch}"
|
|
245
250
|
|
|
246
|
-
pr_data = {
|
|
251
|
+
pr_data: dict[str, Any] = {
|
|
247
252
|
"title": title,
|
|
248
253
|
"body": body,
|
|
249
254
|
"head": head,
|
|
@@ -168,9 +168,4 @@ This is a mono-repo maintained by the deepset-Team that contains integrations fo
|
|
|
168
168
|
Typically, an integration consists of one or more components. Some integrations only contain document stores.
|
|
169
169
|
Each integration is a standalone pypi-package but you can find all of them in the core integrations repo.
|
|
170
170
|
|
|
171
|
-
|
|
172
|
-
3. "deepset-ai/haystack-experimental"
|
|
173
|
-
|
|
174
|
-
Contains experimental features for the Haystack framework.
|
|
175
|
-
|
|
176
171
|
"""
|
|
@@ -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(
|