fancygit 1.0.19__tar.gz → 1.0.20__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 (65) hide show
  1. {fancygit-1.0.19 → fancygit-1.0.20}/PKG-INFO +1 -1
  2. fancygit-1.0.20/VERSION +1 -0
  3. {fancygit-1.0.19 → fancygit-1.0.20}/fancygit.egg-info/PKG-INFO +1 -1
  4. {fancygit-1.0.19 → fancygit-1.0.20}/fancygit.py +0 -63
  5. {fancygit-1.0.19 → fancygit-1.0.20}/tests/test_conflict_parser_integration.py +6 -4
  6. {fancygit-1.0.19 → fancygit-1.0.20}/tests/test_fancygit_advanced.py +8 -7
  7. {fancygit-1.0.19 → fancygit-1.0.20}/tests/test_fancygit_commands.py +8 -7
  8. {fancygit-1.0.19 → fancygit-1.0.20}/tests/test_fancygit_workflows.py +21 -15
  9. fancygit-1.0.19/VERSION +0 -1
  10. {fancygit-1.0.19 → fancygit-1.0.20}/.fancygit_config +0 -0
  11. {fancygit-1.0.19 → fancygit-1.0.20}/CD_GUIDE.md +0 -0
  12. {fancygit-1.0.19 → fancygit-1.0.20}/COLOR_SYSTEM_GUIDE.md +0 -0
  13. {fancygit-1.0.19 → fancygit-1.0.20}/EMAIL_SETUP_GUIDE.md +0 -0
  14. {fancygit-1.0.19 → fancygit-1.0.20}/LICENSE +0 -0
  15. {fancygit-1.0.19 → fancygit-1.0.20}/MANIFEST.in +0 -0
  16. {fancygit-1.0.19 → fancygit-1.0.20}/README.md +0 -0
  17. {fancygit-1.0.19 → fancygit-1.0.20}/TESTING_GUIDE.md +0 -0
  18. {fancygit-1.0.19 → fancygit-1.0.20}/TESTING_SUMMARY.md +0 -0
  19. {fancygit-1.0.19 → fancygit-1.0.20}/command-list.txt +0 -0
  20. {fancygit-1.0.19 → fancygit-1.0.20}/fancygit.egg-info/SOURCES.txt +0 -0
  21. {fancygit-1.0.19 → fancygit-1.0.20}/fancygit.egg-info/dependency_links.txt +0 -0
  22. {fancygit-1.0.19 → fancygit-1.0.20}/fancygit.egg-info/entry_points.txt +0 -0
  23. {fancygit-1.0.19 → fancygit-1.0.20}/fancygit.egg-info/requires.txt +0 -0
  24. {fancygit-1.0.19 → fancygit-1.0.20}/fancygit.egg-info/top_level.txt +0 -0
  25. {fancygit-1.0.19 → fancygit-1.0.20}/images/Logo.png +0 -0
  26. {fancygit-1.0.19 → fancygit-1.0.20}/images/Logo_with_name.png +0 -0
  27. {fancygit-1.0.19 → fancygit-1.0.20}/images/dark_background_logo.png +0 -0
  28. {fancygit-1.0.19 → fancygit-1.0.20}/images/light_background_logo.png +0 -0
  29. {fancygit-1.0.19 → fancygit-1.0.20}/images/overview.png +0 -0
  30. {fancygit-1.0.19 → fancygit-1.0.20}/setup.cfg +0 -0
  31. {fancygit-1.0.19 → fancygit-1.0.20}/setup.py +0 -0
  32. {fancygit-1.0.19 → fancygit-1.0.20}/src/__init__.py +0 -0
  33. {fancygit-1.0.19 → fancygit-1.0.20}/src/ai_engine.py +0 -0
  34. {fancygit-1.0.19 → fancygit-1.0.20}/src/colors.py +0 -0
  35. {fancygit-1.0.19 → fancygit-1.0.20}/src/config_manager.py +0 -0
  36. {fancygit-1.0.19 → fancygit-1.0.20}/src/fancygit_config_dc.py +0 -0
  37. {fancygit-1.0.19 → fancygit-1.0.20}/src/git_error.py +0 -0
  38. {fancygit-1.0.19 → fancygit-1.0.20}/src/git_error_parser.py +0 -0
  39. {fancygit-1.0.19 → fancygit-1.0.20}/src/git_insights.py +0 -0
  40. {fancygit-1.0.19 → fancygit-1.0.20}/src/git_runner.py +0 -0
  41. {fancygit-1.0.19 → fancygit-1.0.20}/src/loading_animation.py +0 -0
  42. {fancygit-1.0.19 → fancygit-1.0.20}/src/merge_conflict.py +0 -0
  43. {fancygit-1.0.19 → fancygit-1.0.20}/src/mermaid_export.py +0 -0
  44. {fancygit-1.0.19 → fancygit-1.0.20}/src/model_provider.py +0 -0
  45. {fancygit-1.0.19 → fancygit-1.0.20}/src/output_colorizer.py +0 -0
  46. {fancygit-1.0.19 → fancygit-1.0.20}/src/providers/__init__.py +0 -0
  47. {fancygit-1.0.19 → fancygit-1.0.20}/src/providers/anthropic_model.py +0 -0
  48. {fancygit-1.0.19 → fancygit-1.0.20}/src/providers/base_model.py +0 -0
  49. {fancygit-1.0.19 → fancygit-1.0.20}/src/providers/ollama_model.py +0 -0
  50. {fancygit-1.0.19 → fancygit-1.0.20}/src/providers/openai_model.py +0 -0
  51. {fancygit-1.0.19 → fancygit-1.0.20}/src/repo_inspector.py +0 -0
  52. {fancygit-1.0.19 → fancygit-1.0.20}/src/repo_state.py +0 -0
  53. {fancygit-1.0.19 → fancygit-1.0.20}/src/utils.py +0 -0
  54. {fancygit-1.0.19 → fancygit-1.0.20}/tests/__init__.py +0 -0
  55. {fancygit-1.0.19 → fancygit-1.0.20}/tests/conftest.py +0 -0
  56. {fancygit-1.0.19 → fancygit-1.0.20}/tests/test_ai_engine.py +0 -0
  57. {fancygit-1.0.19 → fancygit-1.0.20}/tests/test_ai_integration.py +0 -0
  58. {fancygit-1.0.19 → fancygit-1.0.20}/tests/test_config_manager.py +0 -0
  59. {fancygit-1.0.19 → fancygit-1.0.20}/tests/test_fancygit_integration.py +0 -0
  60. {fancygit-1.0.19 → fancygit-1.0.20}/tests/test_git_error.py +0 -0
  61. {fancygit-1.0.19 → fancygit-1.0.20}/tests/test_git_error_parser.py +0 -0
  62. {fancygit-1.0.19 → fancygit-1.0.20}/tests/test_git_runner.py +0 -0
  63. {fancygit-1.0.19 → fancygit-1.0.20}/tests/test_model_provider.py +0 -0
  64. {fancygit-1.0.19 → fancygit-1.0.20}/tests/test_providers.py +0 -0
  65. {fancygit-1.0.19 → fancygit-1.0.20}/welcome.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fancygit
3
- Version: 1.0.19
3
+ Version: 1.0.20
4
4
  Summary: A smart CLI tool that provides intelligent recommendations and helps solve merge conflicts
5
5
  Author: Youssif Ashmawy
6
6
  Author-email: ashmawyyoussif@gmail.com
@@ -0,0 +1 @@
1
+ 1.0.20
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fancygit
3
- Version: 1.0.19
3
+ Version: 1.0.20
4
4
  Summary: A smart CLI tool that provides intelligent recommendations and helps solve merge conflicts
5
5
  Author: Youssif Ashmawy
6
6
  Author-email: ashmawyyoussif@gmail.com
@@ -136,69 +136,6 @@ class FancyGit:
136
136
  print(color_warning(f"Warning: {commands_file} not found. No commands available."))
137
137
  return []
138
138
 
139
- ## Keep these functions for now
140
- def _load_confirmation_state(self):
141
- """Load confirmation state from config file"""
142
- config_file = os.path.join(os.path.dirname(os.path.realpath(__file__)), '.fancygit_config')
143
- try:
144
- with open(config_file, 'r') as f:
145
- for line in f:
146
- if line.startswith('confirmation_enabled='):
147
- return line.strip().split('=')[1].lower() == 'true'
148
- except FileNotFoundError:
149
- pass
150
- return True # Default to enabled
151
-
152
- def _load_ai_analysis_state(self):
153
- """Load AI analysis state from config file"""
154
- config_file = os.path.join(os.path.dirname(os.path.realpath(__file__)), '.fancygit_config')
155
- try:
156
- with open(config_file, 'r') as f:
157
- for line in f:
158
- if line.startswith('ai_analysis_enabled='):
159
- return line.strip().split('=')[1].lower() == 'true'
160
- except FileNotFoundError:
161
- pass
162
- return True # Default to enabled
163
-
164
- def _load_animation_type(self):
165
- """Load loading animation type from config file"""
166
- config_file = os.path.join(os.path.dirname(os.path.realpath(__file__)), '.fancygit_config')
167
- try:
168
- with open(config_file, 'r') as f:
169
- for line in f:
170
- if line.startswith('loading_animation='):
171
- anim_type = line.strip().split('=')[1].strip()
172
- valid_types = ['run', 'dots', 'progress', 'matrix', 'brain']
173
- if anim_type in valid_types:
174
- return anim_type
175
- except FileNotFoundError:
176
- pass
177
- return 'dots' # Default to dots animation
178
-
179
- def _load_output_coloring_state(self):
180
- """Load output coloring state from config file"""
181
- config_file = os.path.join(os.path.dirname(os.path.realpath(__file__)), '.fancygit_config')
182
- try:
183
- with open(config_file, 'r') as f:
184
- for line in f:
185
- if line.startswith('output_coloring_enabled='):
186
- return line.strip().split('=')[1].lower() == 'true'
187
- except FileNotFoundError:
188
- pass
189
- return True # Default to enabled
190
-
191
- def _save_confirmation_state(self):
192
- """Save confirmation state to config file"""
193
- try:
194
- with open(self.config_file, 'w') as f:
195
- f.write(f'confirmation_enabled={self.confirmation_enabled}\n')
196
- f.write(f'ai_analysis_enabled={self.ai_analysis_enabled}\n')
197
- f.write(f'output_coloring_enabled={self.output_coloring_enabled}\n')
198
- f.write(f'loading_animation={self.loading_animation_type}\n')
199
- except Exception as e:
200
- print(color_warning(f"Warning: Could not save confirmation state: {e}"))
201
-
202
139
  def toggle_confirmation(self, enable=None):
203
140
  """Toggle confirmation messages before executing commands
204
141
 
@@ -20,10 +20,12 @@ class TestConflictParserIntegration:
20
20
  """Setup method called before each test"""
21
21
  # Initialize FancyGit with mocked config
22
22
  with patch.object(FancyGit, '_load_commands', return_value=['add', 'commit', 'push', 'pull']):
23
- with patch.object(FancyGit, '_load_confirmation_state', return_value=True):
24
- with patch.object(FancyGit, '_load_ai_analysis_state', return_value=False):
25
- with patch.object(FancyGit, '_load_animation_type', return_value='simple'):
26
- self.fancy_git = FancyGit()
23
+ with patch('src.config_manager.ConfigManager'):
24
+ self.fancy_git = FancyGit()
25
+ # Configure test settings
26
+ self.fancy_git.config_manager.config.confirmation_enabled = True
27
+ self.fancy_git.config_manager.config.ai_analysis_enabled = False
28
+ self.fancy_git.config_manager.config.loading_animation = 'simple'
27
29
 
28
30
  def test_conflict_parser_no_conflicts(self, temp_git_repo):
29
31
  """Test conflict parser when no conflicts exist"""
@@ -20,13 +20,14 @@ class TestFancyGitAdvancedCommands:
20
20
  'notes', 'range-diff', 'restore', 'revert', 'shortlog', 'show',
21
21
  'sparse-checkout', 'submodule', 'switch', 'tag', 'worktree', 'log', 'status'
22
22
  ]):
23
- with patch.object(FancyGit, '_load_ai_analysis_state', return_value=False):
24
- with patch.object(FancyGit, '_load_output_coloring_state', return_value=False):
25
- with patch.object(FancyGit, '_load_animation_type', return_value='dots'):
26
- with patch('builtins.input', return_value='y'):
27
- self.fancy_git = FancyGit()
28
- # Disable confirmation directly on config
29
- self.fancy_git.config_manager.config.confirmation_enabled = False
23
+ with patch('src.config_manager.ConfigManager'):
24
+ with patch('builtins.input', return_value='y'):
25
+ self.fancy_git = FancyGit()
26
+ # Configure test settings
27
+ self.fancy_git.config_manager.config.ai_analysis_enabled = False
28
+ self.fancy_git.config_manager.config.output_coloring_enabled = False
29
+ self.fancy_git.config_manager.config.loading_animation = 'dots'
30
+ self.fancy_git.config_manager.config.confirmation_enabled = False
30
31
 
31
32
  @patch('src.git_runner.GitRunner.run_git_command')
32
33
  def test_archive_command(self, mock_run_git):
@@ -20,13 +20,14 @@ class TestFancyGitCommands:
20
20
  'merge', 'rebase', 'reset', 'log', 'diff', 'stash', 'rm', 'mv',
21
21
  'welcome', 'confirmation', 'ai', 'colors', 'insights', 'visualize'
22
22
  ]):
23
- with patch.object(FancyGit, '_load_ai_analysis_state', return_value=False):
24
- with patch.object(FancyGit, '_load_output_coloring_state', return_value=False):
25
- with patch.object(FancyGit, '_load_animation_type', return_value='dots'):
26
- with patch('builtins.input', return_value='y'):
27
- self.fancy_git = FancyGit()
28
- # Disable confirmation directly on config
29
- self.fancy_git.config_manager.config.confirmation_enabled = False
23
+ with patch('src.config_manager.ConfigManager'):
24
+ with patch('builtins.input', return_value='y'):
25
+ self.fancy_git = FancyGit()
26
+ # Configure test settings
27
+ self.fancy_git.config_manager.config.ai_analysis_enabled = False
28
+ self.fancy_git.config_manager.config.output_coloring_enabled = False
29
+ self.fancy_git.config_manager.config.loading_animation = 'dots'
30
+ self.fancy_git.config_manager.config.confirmation_enabled = False
30
31
 
31
32
  @patch('src.git_runner.GitRunner.run_git_command')
32
33
  def test_add_command_success(self, mock_run_git):
@@ -19,11 +19,13 @@ class TestFancyGitCommandWorkflows:
19
19
  'merge', 'rebase', 'reset', 'log', 'diff', 'stash', 'rm', 'mv', 'revert',
20
20
  'welcome', 'confirmation', 'ai', 'colors', 'insights', 'visualize'
21
21
  ]):
22
- with patch.object(FancyGit, '_load_confirmation_state', return_value=False):
23
- with patch.object(FancyGit, '_load_ai_analysis_state', return_value=False):
24
- with patch.object(FancyGit, '_load_output_coloring_state', return_value=False):
25
- with patch.object(FancyGit, '_load_animation_type', return_value='dots'):
26
- self.fancy_git = FancyGit()
22
+ with patch('src.config_manager.ConfigManager'):
23
+ self.fancy_git = FancyGit()
24
+ # Configure test settings
25
+ self.fancy_git.config_manager.config.confirmation_enabled = False
26
+ self.fancy_git.config_manager.config.ai_analysis_enabled = False
27
+ self.fancy_git.config_manager.config.output_coloring_enabled = False
28
+ self.fancy_git.config_manager.config.loading_animation = 'dots'
27
29
 
28
30
  @patch('src.git_runner.GitRunner.run_git_command')
29
31
  def test_complete_add_commit_workflow(self, mock_run_git):
@@ -211,11 +213,13 @@ class TestFancyGitSpecialCommandWorkflows:
211
213
  'merge', 'rebase', 'reset', 'log', 'diff', 'stash', 'rm', 'mv',
212
214
  'welcome', 'confirmation', 'ai', 'colors', 'insights', 'visualize'
213
215
  ]):
214
- with patch.object(FancyGit, '_load_confirmation_state', return_value=False):
215
- with patch.object(FancyGit, '_load_ai_analysis_state', return_value=False):
216
- with patch.object(FancyGit, '_load_output_coloring_state', return_value=False):
217
- with patch.object(FancyGit, '_load_animation_type', return_value='dots'):
218
- self.fancy_git = FancyGit()
216
+ with patch('src.config_manager.ConfigManager'):
217
+ self.fancy_git = FancyGit()
218
+ # Configure test settings
219
+ self.fancy_git.config_manager.config.confirmation_enabled = False
220
+ self.fancy_git.config_manager.config.ai_analysis_enabled = False
221
+ self.fancy_git.config_manager.config.output_coloring_enabled = False
222
+ self.fancy_git.config_manager.config.loading_animation = 'dots'
219
223
 
220
224
  @patch('src.git_runner.GitRunner.run_git_command')
221
225
  def test_ai_error_analysis_workflow(self, mock_run_git):
@@ -345,11 +349,13 @@ class TestFancyGitErrorRecoveryWorkflows:
345
349
  def setup_method(self):
346
350
  """Setup method called before each test"""
347
351
  with patch.object(FancyGit, '_load_commands', return_value=['add', 'commit', 'push', 'pull', 'status']):
348
- with patch.object(FancyGit, '_load_confirmation_state', return_value=False):
349
- with patch.object(FancyGit, '_load_ai_analysis_state', return_value=False):
350
- with patch.object(FancyGit, '_load_output_coloring_state', return_value=False):
351
- with patch.object(FancyGit, '_load_animation_type', return_value='dots'):
352
- self.fancy_git = FancyGit()
352
+ with patch('src.config_manager.ConfigManager'):
353
+ self.fancy_git = FancyGit()
354
+ # Configure test settings
355
+ self.fancy_git.config_manager.config.confirmation_enabled = False
356
+ self.fancy_git.config_manager.config.ai_analysis_enabled = False
357
+ self.fancy_git.config_manager.config.output_coloring_enabled = False
358
+ self.fancy_git.config_manager.config.loading_animation = 'dots'
353
359
 
354
360
  @patch('src.git_runner.GitRunner.run_git_command')
355
361
  def test_network_error_recovery(self, mock_run_git):
fancygit-1.0.19/VERSION DELETED
@@ -1 +0,0 @@
1
- 1.0.19
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes