gofannon 0.25.16__tar.gz → 0.25.17__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.
Files changed (49) hide show
  1. {gofannon-0.25.16 → gofannon-0.25.17}/PKG-INFO +1 -1
  2. gofannon-0.25.17/gofannon/github/clone_repo.py +64 -0
  3. {gofannon-0.25.16 → gofannon-0.25.17}/gofannon/github/create_issue.py +3 -6
  4. {gofannon-0.25.16 → gofannon-0.25.17}/pyproject.toml +1 -1
  5. {gofannon-0.25.16 → gofannon-0.25.17}/LICENSE +0 -0
  6. {gofannon-0.25.16 → gofannon-0.25.17}/README.md +0 -0
  7. {gofannon-0.25.16 → gofannon-0.25.17}/gofannon/__init__.py +0 -0
  8. {gofannon-0.25.16 → gofannon-0.25.17}/gofannon/arxiv/__init__.py +0 -0
  9. {gofannon-0.25.16 → gofannon-0.25.17}/gofannon/arxiv/get_article.py +0 -0
  10. {gofannon-0.25.16 → gofannon-0.25.17}/gofannon/arxiv/search.py +0 -0
  11. {gofannon-0.25.16 → gofannon-0.25.17}/gofannon/base/__init__.py +0 -0
  12. {gofannon-0.25.16 → gofannon-0.25.17}/gofannon/base/bedrock.py +0 -0
  13. {gofannon-0.25.16 → gofannon-0.25.17}/gofannon/base/langchain.py +0 -0
  14. {gofannon-0.25.16 → gofannon-0.25.17}/gofannon/base/langflow.py +0 -0
  15. {gofannon-0.25.16 → gofannon-0.25.17}/gofannon/base/mcp.py +0 -0
  16. {gofannon-0.25.16 → gofannon-0.25.17}/gofannon/base/smol_agents.py +0 -0
  17. {gofannon-0.25.16 → gofannon-0.25.17}/gofannon/basic_math/__init__.py +0 -0
  18. {gofannon-0.25.16 → gofannon-0.25.17}/gofannon/basic_math/addition.py +0 -0
  19. {gofannon-0.25.16 → gofannon-0.25.17}/gofannon/basic_math/division.py +0 -0
  20. {gofannon-0.25.16 → gofannon-0.25.17}/gofannon/basic_math/exponents.py +0 -0
  21. {gofannon-0.25.16 → gofannon-0.25.17}/gofannon/basic_math/multiplication.py +0 -0
  22. {gofannon-0.25.16 → gofannon-0.25.17}/gofannon/basic_math/subtraction.py +0 -0
  23. {gofannon-0.25.16 → gofannon-0.25.17}/gofannon/config.py +0 -0
  24. {gofannon-0.25.16 → gofannon-0.25.17}/gofannon/github/__init__.py +0 -0
  25. {gofannon-0.25.16 → gofannon-0.25.17}/gofannon/github/commit_file.py +0 -0
  26. {gofannon-0.25.16 → gofannon-0.25.17}/gofannon/github/commit_files.py +0 -0
  27. {gofannon-0.25.16 → gofannon-0.25.17}/gofannon/github/get_repo_contents.py +0 -0
  28. {gofannon-0.25.16 → gofannon-0.25.17}/gofannon/github/pr_review_tool.py +0 -0
  29. {gofannon-0.25.16 → gofannon-0.25.17}/gofannon/github/read_issue.py +0 -0
  30. {gofannon-0.25.16 → gofannon-0.25.17}/gofannon/github/search.py +0 -0
  31. {gofannon-0.25.16 → gofannon-0.25.17}/gofannon/google_search/__init__.py +0 -0
  32. {gofannon-0.25.16 → gofannon-0.25.17}/gofannon/google_search/google_search.py +0 -0
  33. {gofannon-0.25.16 → gofannon-0.25.17}/gofannon/headless_browser/__init__.py +0 -0
  34. {gofannon-0.25.16 → gofannon-0.25.17}/gofannon/headless_browser/base.py +0 -0
  35. {gofannon-0.25.16 → gofannon-0.25.17}/gofannon/headless_browser/headless_browser_get.py +0 -0
  36. {gofannon-0.25.16 → gofannon-0.25.17}/gofannon/nasa/__init__.py +0 -0
  37. {gofannon-0.25.16 → gofannon-0.25.17}/gofannon/nasa/apod.py +0 -0
  38. {gofannon-0.25.16 → gofannon-0.25.17}/gofannon/nhsta/__init__.py +0 -0
  39. {gofannon-0.25.16 → gofannon-0.25.17}/gofannon/open_notify_space/__init__.py +0 -0
  40. {gofannon-0.25.16 → gofannon-0.25.17}/gofannon/open_notify_space/iss_locator.py +0 -0
  41. {gofannon-0.25.16 → gofannon-0.25.17}/gofannon/orchestration/__init__.py +0 -0
  42. {gofannon-0.25.16 → gofannon-0.25.17}/gofannon/orchestration/firebase_wrapper.py +0 -0
  43. {gofannon-0.25.16 → gofannon-0.25.17}/gofannon/reasoning/__init__.py +0 -0
  44. {gofannon-0.25.16 → gofannon-0.25.17}/gofannon/reasoning/base.py +0 -0
  45. {gofannon-0.25.16 → gofannon-0.25.17}/gofannon/reasoning/hierarchical_cot.py +0 -0
  46. {gofannon-0.25.16 → gofannon-0.25.17}/gofannon/reasoning/sequential_cot.py +0 -0
  47. {gofannon-0.25.16 → gofannon-0.25.17}/gofannon/reasoning/tree_of_thought.py +0 -0
  48. {gofannon-0.25.16 → gofannon-0.25.17}/gofannon/wikipedia/__init__.py +0 -0
  49. {gofannon-0.25.16 → gofannon-0.25.17}/gofannon/wikipedia/wikipedia_lookup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: gofannon
3
- Version: 0.25.16
3
+ Version: 0.25.17
4
4
  Summary: A collection of tools for LLMs
5
5
  License: ASFv2
6
6
  Author: Trevor Grant
@@ -0,0 +1,64 @@
1
+ import git
2
+ from pathlib import Path
3
+
4
+ from..base import BaseTool
5
+ from ..config import FunctionRegistry
6
+ import logging
7
+
8
+ logger = logging.getLogger(__name__)
9
+
10
+ @FunctionRegistry.register
11
+ class CloneRepo(BaseTool):
12
+ """
13
+ Clone a GitHub repository to a specified local directory.
14
+ This tool takes a GitHub repository URL and a target local directory,
15
+ then clones the repository into that directory using GitPython.
16
+ Returns a success message if the operation completes successfully,
17
+ or an error message if it fails.
18
+ """
19
+ def __init__(self, name="clone_github_repo"):
20
+ super().__init__()
21
+ self.name = name
22
+
23
+ @property
24
+ def definition(self):
25
+ return {
26
+ "type": "function",
27
+ "function": {
28
+ "name": self.name,
29
+ "description": "Clone a GitHub repository to a specified local directory.",
30
+ "parameters": {
31
+ "type": "object",
32
+ "properties": {
33
+ "repo_url": {
34
+ "type": "string",
35
+ "description": "The URL of the GitHub repository to clone."
36
+ },
37
+ "local_dir": {
38
+ "type": "string",
39
+ "description": "The local directory where the repository should be cloned."
40
+ }
41
+ },
42
+ "required": ["repo_url", "local_dir"]
43
+ }
44
+ }
45
+ }
46
+
47
+ def fn(self, repo_url, local_dir):
48
+ logger.debug(f"Cloning repository {repo_url} to {local_dir}")
49
+
50
+ # Ensure the local directory exists
51
+ local_dir_path = Path(local_dir)
52
+ if not local_dir_path.exists():
53
+ local_dir_path.mkdir(parents=True, exist_ok=True)
54
+
55
+ try:
56
+ # Clone the repository
57
+ repo = git.Repo.clone_from(repo_url, local_dir_path)
58
+ return f"Repository cloned successfully to {local_dir}"
59
+ except git.exc.GitCommandError as e:
60
+ logger.error(f"Error cloning repository: {e}")
61
+ return f"Error cloning repository: {e}"
62
+ except Exception as e:
63
+ logger.error(f"Unexpected error: {e}")
64
+ return f"Unexpected error: {e}"
@@ -39,11 +39,8 @@ class CreateIssue(BaseTool):
39
39
  "description": "The body of the issue"
40
40
  },
41
41
  "labels": {
42
- "type": "array",
43
- "items": {
44
- "type": "string"
45
- },
46
- "description": "An array of labels for the issue"
42
+ "type": "string",
43
+ "description": "A comma separated list of labels to apply to the issue"
47
44
  }
48
45
  },
49
46
  "required": ["repo_url", "title", "body"]
@@ -70,7 +67,7 @@ class CreateIssue(BaseTool):
70
67
  }
71
68
 
72
69
  if labels:
73
- payload["labels"] = labels
70
+ payload["labels"] = labels.split(',')
74
71
 
75
72
  response = post(api_url, headers=headers, json=payload)
76
73
  response.raise_for_status()
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "gofannon"
3
- version = "0.25.16"
3
+ version = "0.25.17"
4
4
  description = "A collection of tools for LLMs"
5
5
  authors = ["Trevor Grant <trevor.d.grant@gmail.com>"]
6
6
  license = "ASFv2"
File without changes
File without changes