commit-maker 0.2.0__tar.gz → 0.2.1__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.
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.1
2
2
  Name: commit-maker
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: CLI-утилита для генерации git-коммитов с помощью ИИ
5
5
  Home-page: https://github.com/Sashayerty/commit_maker
6
6
  Author: Alex Bulgakov
@@ -10,10 +10,6 @@ Project-URL: Homepage, https://github.com/sashayerty/commit_maker
10
10
  Requires-Python: >=3.8
11
11
  Description-Content-Type: text/markdown
12
12
  License-File: LICENSE
13
- Dynamic: author
14
- Dynamic: home-page
15
- Dynamic: license-file
16
- Dynamic: requires-python
17
13
 
18
14
  # Commit Maker [![Created with Python](https://img.shields.io/badge/Created_with-Python-blue)](https://www.python.org/) [![Created with uv](https://img.shields.io/badge/Created_with-uv-purple)](https://docs.astral.sh/uv/) [![Created with ollama](https://img.shields.io/badge/Created_with-ollama-white)](https://ollama.com/) [![PyPi](https://img.shields.io/badge/Available_on-pypi-orange)](https://pypi.org/project/commit-maker/)
19
15
 
@@ -101,7 +97,7 @@ pip3 install commit_maker
101
97
 
102
98
  ### Пример использования
103
99
 
104
- **`-h`**, **`--help`** - вывод помощи
100
+ **`-h`**, **`--help`** - вывод помощи
105
101
  **`-l`**, **`--local-models`** - использование локальных моделей
106
102
  **`-m`**, **`--max-symbols`** - ограничение длины сообщения коммита
107
103
  **`-M`**, **`--model`** - какую локальную модель использовать (при **`-l`**)
@@ -84,7 +84,7 @@ pip3 install commit_maker
84
84
 
85
85
  ### Пример использования
86
86
 
87
- **`-h`**, **`--help`** - вывод помощи
87
+ **`-h`**, **`--help`** - вывод помощи
88
88
  **`-l`**, **`--local-models`** - использование локальных моделей
89
89
  **`-m`**, **`--max-symbols`** - ограничение длины сообщения коммита
90
90
  **`-M`**, **`--model`** - какую локальную модель использовать (при **`-l`**)
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "commit-maker"
3
- version = "0.2.0"
3
+ version = "0.2.1"
4
4
  authors = [
5
5
  { name="Alex Bulgakov", email="sashayerty@ya.ru" }
6
6
  ]
@@ -2,7 +2,7 @@ from setuptools import find_packages, setup
2
2
 
3
3
  setup(
4
4
  name="commit-maker",
5
- version="0.2.0",
5
+ version="0.2.1",
6
6
  author="Alex Bulgakov",
7
7
  author_email="sashayerty@ya.ru",
8
8
  description="CLI-утилита для генерации git-коммитов с помощью ИИ",
@@ -286,20 +286,23 @@ def main() -> None:
286
286
  encoding="utf-8",
287
287
  ).stdout
288
288
 
289
- # Получаем список моделей из Ollama, если Ollama есть
290
- ollama_list_of_models = (
291
- subprocess.run(
292
- ["ollama", "ls"],
293
- capture_output=True,
294
- text=True,
295
- encoding="utf-8",
289
+ if use_local_models:
290
+ # Получаем список моделей из Ollama, если Ollama есть
291
+ ollama_list_of_models = (
292
+ subprocess.run(
293
+ ["ollama", "ls"],
294
+ capture_output=True,
295
+ text=True,
296
+ encoding="utf-8",
297
+ )
298
+ .stdout.strip()
299
+ .split("\n")
296
300
  )
297
- .stdout.strip()
298
- .split("\n")
299
- )
300
- ollama_list_of_models = [
301
- i.split()[0] for i in ollama_list_of_models[1:]
302
- ]
301
+ ollama_list_of_models = [
302
+ i.split()[0] for i in ollama_list_of_models[1:]
303
+ ]
304
+ else:
305
+ ollama_list_of_models = 0
303
306
 
304
307
  # Обработка отсутствия ollama
305
308
  if not ollama_list_of_models and use_local_models:
@@ -556,6 +559,12 @@ def main() -> None:
556
559
  == "y"
557
560
  else None
558
561
  )
562
+ except FileNotFoundError as e:
563
+ print(
564
+ colored("Ollama не установлена!", "red")
565
+ if "ollama" in str(e)
566
+ else colored(str(e), "red")
567
+ )
559
568
  except Exception as e:
560
569
  print(colored("Ошибка:", "red") + " " + str(e))
561
570
 
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.1
2
2
  Name: commit-maker
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: CLI-утилита для генерации git-коммитов с помощью ИИ
5
5
  Home-page: https://github.com/Sashayerty/commit_maker
6
6
  Author: Alex Bulgakov
@@ -10,10 +10,6 @@ Project-URL: Homepage, https://github.com/sashayerty/commit_maker
10
10
  Requires-Python: >=3.8
11
11
  Description-Content-Type: text/markdown
12
12
  License-File: LICENSE
13
- Dynamic: author
14
- Dynamic: home-page
15
- Dynamic: license-file
16
- Dynamic: requires-python
17
13
 
18
14
  # Commit Maker [![Created with Python](https://img.shields.io/badge/Created_with-Python-blue)](https://www.python.org/) [![Created with uv](https://img.shields.io/badge/Created_with-uv-purple)](https://docs.astral.sh/uv/) [![Created with ollama](https://img.shields.io/badge/Created_with-ollama-white)](https://ollama.com/) [![PyPi](https://img.shields.io/badge/Available_on-pypi-orange)](https://pypi.org/project/commit-maker/)
19
15
 
@@ -101,7 +97,7 @@ pip3 install commit_maker
101
97
 
102
98
  ### Пример использования
103
99
 
104
- **`-h`**, **`--help`** - вывод помощи
100
+ **`-h`**, **`--help`** - вывод помощи
105
101
  **`-l`**, **`--local-models`** - использование локальных моделей
106
102
  **`-m`**, **`--max-symbols`** - ограничение длины сообщения коммита
107
103
  **`-M`**, **`--model`** - какую локальную модель использовать (при **`-l`**)
File without changes
File without changes