llama-github 0.1.7__tar.gz → 0.1.8__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 (40) hide show
  1. {llama_github-0.1.7 → llama_github-0.1.8}/CHANGELOG.md +5 -0
  2. {llama_github-0.1.7/llama_github.egg-info → llama_github-0.1.8}/PKG-INFO +6 -1
  3. {llama_github-0.1.7 → llama_github-0.1.8}/llama_github/data_retrieval/github_entities.py +14 -1
  4. llama_github-0.1.8/llama_github/version.py +1 -0
  5. {llama_github-0.1.7 → llama_github-0.1.8/llama_github.egg-info}/PKG-INFO +6 -1
  6. {llama_github-0.1.7 → llama_github-0.1.8}/setup.cfg +1 -1
  7. llama_github-0.1.7/llama_github/version.py +0 -1
  8. {llama_github-0.1.7 → llama_github-0.1.8}/LICENSE +0 -0
  9. {llama_github-0.1.7 → llama_github-0.1.8}/MANIFEST.in +0 -0
  10. {llama_github-0.1.7 → llama_github-0.1.8}/README.md +0 -0
  11. {llama_github-0.1.7 → llama_github-0.1.8}/llama_github/__init__.py +0 -0
  12. {llama_github-0.1.7 → llama_github-0.1.8}/llama_github/config/__init__.py +0 -0
  13. {llama_github-0.1.7 → llama_github-0.1.8}/llama_github/config/config.json +0 -0
  14. {llama_github-0.1.7 → llama_github-0.1.8}/llama_github/config/config.py +0 -0
  15. {llama_github-0.1.7 → llama_github-0.1.8}/llama_github/data_retrieval/__init__.py +0 -0
  16. {llama_github-0.1.7 → llama_github-0.1.8}/llama_github/data_retrieval/github_api.py +0 -0
  17. {llama_github-0.1.7 → llama_github-0.1.8}/llama_github/features/__init__.py +0 -0
  18. {llama_github-0.1.7 → llama_github-0.1.8}/llama_github/features/feature_flags.py +0 -0
  19. {llama_github-0.1.7 → llama_github-0.1.8}/llama_github/features/insider_features.py +0 -0
  20. {llama_github-0.1.7 → llama_github-0.1.8}/llama_github/github_integration/__init__.py +0 -0
  21. {llama_github-0.1.7 → llama_github-0.1.8}/llama_github/github_integration/github_auth_manager.py +0 -0
  22. {llama_github-0.1.7 → llama_github-0.1.8}/llama_github/github_rag.py +0 -0
  23. {llama_github-0.1.7 → llama_github-0.1.8}/llama_github/llm_integration/__init__.py +0 -0
  24. {llama_github-0.1.7 → llama_github-0.1.8}/llama_github/llm_integration/initial_load.py +0 -0
  25. {llama_github-0.1.7 → llama_github-0.1.8}/llama_github/llm_integration/llm_handler.py +0 -0
  26. {llama_github-0.1.7 → llama_github-0.1.8}/llama_github/logger.py +0 -0
  27. {llama_github-0.1.7 → llama_github-0.1.8}/llama_github/rag_processing/__init__.py +0 -0
  28. {llama_github-0.1.7 → llama_github-0.1.8}/llama_github/rag_processing/rag_processor.py +0 -0
  29. {llama_github-0.1.7 → llama_github-0.1.8}/llama_github/utils.py +0 -0
  30. {llama_github-0.1.7 → llama_github-0.1.8}/llama_github.egg-info/SOURCES.txt +0 -0
  31. {llama_github-0.1.7 → llama_github-0.1.8}/llama_github.egg-info/dependency_links.txt +0 -0
  32. {llama_github-0.1.7 → llama_github-0.1.8}/llama_github.egg-info/requires.txt +0 -0
  33. {llama_github-0.1.7 → llama_github-0.1.8}/llama_github.egg-info/top_level.txt +0 -0
  34. {llama_github-0.1.7 → llama_github-0.1.8}/setup.py +0 -0
  35. {llama_github-0.1.7 → llama_github-0.1.8}/tests/test_data_retrieval.py +0 -0
  36. {llama_github-0.1.7 → llama_github-0.1.8}/tests/test_github_auth_manager.py +0 -0
  37. {llama_github-0.1.7 → llama_github-0.1.8}/tests/test_initial_load.py +0 -0
  38. {llama_github-0.1.7 → llama_github-0.1.8}/tests/test_llm_handler.py +0 -0
  39. {llama_github-0.1.7 → llama_github-0.1.8}/tests/test_logger.py +0 -0
  40. {llama_github-0.1.7 → llama_github-0.1.8}/tests/test_rag_processor.py +0 -0
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.1.8] - 2024-11-03
9
+
10
+ ### Optimized
11
+ - fix bugs for get pr content file diff calculate logic
12
+
8
13
  ## [0.1.7] - 2024-10-31
9
14
 
10
15
  ### Optimized
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: llama-github
3
- Version: 0.1.7
3
+ Version: 0.1.8
4
4
  Summary: Llama-github is an open-source Python library that empowers LLM Chatbots, AI Agents, and Auto-dev Agents to conduct Retrieval from actively selected GitHub public projects. It Augments through LLMs and Generates context for any coding question, in order to streamline the development of sophisticated AI-driven applications.
5
5
  Home-page: https://github.com/JetXu-LLM/llama-github
6
6
  Author: Jet Xu
@@ -140,6 +140,11 @@ All notable changes to this project will be documented in this file.
140
140
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
141
141
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
142
142
 
143
+ ## [0.1.8] - 2024-11-03
144
+
145
+ ### Optimized
146
+ - fix bugs for get pr content file diff calculate logic
147
+
143
148
  ## [0.1.7] - 2024-10-31
144
149
 
145
150
  ### Optimized
@@ -123,7 +123,7 @@ class Repository:
123
123
  return None
124
124
  self.update_last_read_time()
125
125
  return self._repo
126
-
126
+
127
127
  def get_structure(self, path="/") -> dict:
128
128
  """
129
129
  Retrieves the structure of the repository using a singleton design pattern.
@@ -183,6 +183,8 @@ class Repository:
183
183
  decoded_content = base64.b64decode(file_content.content).decode('utf-8')
184
184
  elif (file_content.encoding is None or file_content.encoding == 'none') and hasattr(file_content, 'download_url') and file_content.download_url:
185
185
  try:
186
+ logger.debug(f"Downloading file {file_path} from {file_content.download_url}")
187
+ # Use requests to download the file content
186
188
  response = requests.get(
187
189
  file_content.download_url,
188
190
  timeout=30,
@@ -526,6 +528,7 @@ class Repository:
526
528
  pr_data["commit_stats"] = {}
527
529
 
528
530
  # Process file changes
531
+ comparison = None
529
532
  dependency_files = ['requirements.txt', 'Pipfile', 'Pipfile.lock', 'setup.py']
530
533
  config_files = ['.env', 'settings.py', 'config.yaml', 'config.yml', 'config.json']
531
534
  for file in pr_files:
@@ -552,6 +555,16 @@ class Repository:
552
555
  custom_diff = ''
553
556
  else:
554
557
  custom_diff = DiffGenerator.generate_custom_diff(base_content, head_content, context_lines)
558
+ if not custom_diff or custom_diff.strip() == '':
559
+ try:
560
+ #use compare API if custom diff is empty
561
+ if not comparison:
562
+ comparison = self.repo.compare(pr.base.sha, pr.head.sha)
563
+ patches = [f.patch for f in comparison.files if f.filename == file_path]
564
+ custom_diff = patches[0] if patches else None
565
+ except Exception as e:
566
+ logger.exception(f"Error fetching file diff for PR #{number}")
567
+ custom_diff = ''
555
568
 
556
569
  # Categorize code changes
557
570
  change_categories = CodeAnalyzer.categorize_change(custom_diff)
@@ -0,0 +1 @@
1
+ __version__ = '0.1.8'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: llama-github
3
- Version: 0.1.7
3
+ Version: 0.1.8
4
4
  Summary: Llama-github is an open-source Python library that empowers LLM Chatbots, AI Agents, and Auto-dev Agents to conduct Retrieval from actively selected GitHub public projects. It Augments through LLMs and Generates context for any coding question, in order to streamline the development of sophisticated AI-driven applications.
5
5
  Home-page: https://github.com/JetXu-LLM/llama-github
6
6
  Author: Jet Xu
@@ -140,6 +140,11 @@ All notable changes to this project will be documented in this file.
140
140
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
141
141
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
142
142
 
143
+ ## [0.1.8] - 2024-11-03
144
+
145
+ ### Optimized
146
+ - fix bugs for get pr content file diff calculate logic
147
+
143
148
  ## [0.1.7] - 2024-10-31
144
149
 
145
150
  ### Optimized
@@ -1,6 +1,6 @@
1
1
  [metadata]
2
2
  name = llama-github
3
- version = 0.1.7
3
+ version = 0.1.8
4
4
  author = Jet Xu
5
5
  author_email = Voldemort.xu@foxmail.com
6
6
  description = Llama-github is an open-source Python library that empowers LLM Chatbots, AI Agents, and Auto-dev Agents to conduct Retrieval from actively selected GitHub public projects. It Augments through LLMs and Generates context for any coding question, in order to streamline the development of sophisticated AI-driven applications.
@@ -1 +0,0 @@
1
- __version__ = '0.1.7'
File without changes
File without changes
File without changes
File without changes