gac 0.17.7__tar.gz → 0.18.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.
Potentially problematic release.
This version of gac might be problematic. Click here for more details.
- {gac-0.17.7 → gac-0.18.1}/.gitignore +0 -1
- {gac-0.17.7 → gac-0.18.1}/PKG-INFO +1 -3
- {gac-0.17.7 → gac-0.18.1}/pyproject.toml +9 -24
- {gac-0.17.7 → gac-0.18.1}/src/gac/__version__.py +1 -1
- {gac-0.17.7 → gac-0.18.1}/src/gac/ai.py +3 -5
- {gac-0.17.7 → gac-0.18.1}/LICENSE +0 -0
- {gac-0.17.7 → gac-0.18.1}/README.md +0 -0
- {gac-0.17.7 → gac-0.18.1}/src/gac/__init__.py +0 -0
- {gac-0.17.7 → gac-0.18.1}/src/gac/cli.py +0 -0
- {gac-0.17.7 → gac-0.18.1}/src/gac/config.py +0 -0
- {gac-0.17.7 → gac-0.18.1}/src/gac/config_cli.py +0 -0
- {gac-0.17.7 → gac-0.18.1}/src/gac/constants.py +0 -0
- {gac-0.17.7 → gac-0.18.1}/src/gac/diff_cli.py +0 -0
- {gac-0.17.7 → gac-0.18.1}/src/gac/errors.py +0 -0
- {gac-0.17.7 → gac-0.18.1}/src/gac/git.py +0 -0
- {gac-0.17.7 → gac-0.18.1}/src/gac/init_cli.py +0 -0
- {gac-0.17.7 → gac-0.18.1}/src/gac/main.py +0 -0
- {gac-0.17.7 → gac-0.18.1}/src/gac/preprocess.py +0 -0
- {gac-0.17.7 → gac-0.18.1}/src/gac/prompt.py +0 -0
- {gac-0.17.7 → gac-0.18.1}/src/gac/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gac
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.18.1
|
|
4
4
|
Summary: AI-powered Git commit message generator with multi-provider support
|
|
5
5
|
Project-URL: Homepage, https://github.com/cellwebb/gac
|
|
6
6
|
Project-URL: Documentation, https://github.com/cellwebb/gac#readme
|
|
@@ -22,13 +22,11 @@ Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
|
22
22
|
Requires-Python: >=3.10
|
|
23
23
|
Requires-Dist: aisuite
|
|
24
24
|
Requires-Dist: anthropic
|
|
25
|
-
Requires-Dist: black
|
|
26
25
|
Requires-Dist: cerebras-cloud-sdk
|
|
27
26
|
Requires-Dist: click
|
|
28
27
|
Requires-Dist: docstring-parser
|
|
29
28
|
Requires-Dist: groq
|
|
30
29
|
Requires-Dist: halo
|
|
31
|
-
Requires-Dist: isort
|
|
32
30
|
Requires-Dist: ollama
|
|
33
31
|
Requires-Dist: openai
|
|
34
32
|
Requires-Dist: pydantic
|
|
@@ -43,10 +43,6 @@ dependencies = [
|
|
|
43
43
|
"halo",
|
|
44
44
|
"questionary",
|
|
45
45
|
"rich",
|
|
46
|
-
|
|
47
|
-
# Code formatting
|
|
48
|
-
"black",
|
|
49
|
-
"isort",
|
|
50
46
|
]
|
|
51
47
|
|
|
52
48
|
[project.scripts]
|
|
@@ -78,9 +74,7 @@ Issues = "https://github.com/cellwebb/gac/issues"
|
|
|
78
74
|
Changelog = "https://github.com/cellwebb/gac/blob/main/CHANGELOG.md"
|
|
79
75
|
Source = "https://github.com/cellwebb/gac"
|
|
80
76
|
|
|
81
|
-
|
|
82
|
-
line-length = 120
|
|
83
|
-
target-version = ["py310", "py311", "py312", "py313"]
|
|
77
|
+
|
|
84
78
|
|
|
85
79
|
[tool.coverage.run]
|
|
86
80
|
source_pkgs = ["gac"]
|
|
@@ -108,11 +102,7 @@ exclude_lines = [
|
|
|
108
102
|
"except ImportError"
|
|
109
103
|
]
|
|
110
104
|
|
|
111
|
-
|
|
112
|
-
max-line-length = 120
|
|
113
|
-
exclude = [".git", "__pycache__", ".venv", "venv", "build", "dist"]
|
|
114
|
-
per-file-ignores = "__init__.py:F401"
|
|
115
|
-
ignore = "E203,W503,E501"
|
|
105
|
+
|
|
116
106
|
|
|
117
107
|
[tool.hatch.version]
|
|
118
108
|
path = "src/gac/__version__.py"
|
|
@@ -151,30 +141,25 @@ dependencies = [
|
|
|
151
141
|
# CLI and formatting
|
|
152
142
|
"halo",
|
|
153
143
|
|
|
154
|
-
# Code formatting
|
|
155
|
-
"black",
|
|
156
|
-
"isort",
|
|
157
|
-
|
|
158
144
|
# Testing
|
|
159
145
|
"pytest",
|
|
160
146
|
"pytest-cov",
|
|
161
147
|
"codecov",
|
|
162
148
|
|
|
163
|
-
# Linting
|
|
164
|
-
"
|
|
149
|
+
# Linting and formatting
|
|
150
|
+
"ruff",
|
|
165
151
|
]
|
|
166
152
|
|
|
167
153
|
[tool.hatch.envs.default.scripts]
|
|
168
154
|
test = "pytest {args:tests}"
|
|
169
155
|
test-cov = "coverage run -m pytest {args:tests} && coverage report"
|
|
170
156
|
lint = [
|
|
171
|
-
"
|
|
172
|
-
"
|
|
173
|
-
"flake8 .",
|
|
157
|
+
"ruff check .",
|
|
158
|
+
"ruff format --check .",
|
|
174
159
|
]
|
|
175
160
|
format = [
|
|
176
|
-
"
|
|
177
|
-
"
|
|
161
|
+
"ruff check --fix .",
|
|
162
|
+
"ruff format .",
|
|
178
163
|
]
|
|
179
164
|
|
|
180
165
|
[tool.hatch.env]
|
|
@@ -195,7 +180,7 @@ select = [
|
|
|
195
180
|
"UP", # pyupgrade
|
|
196
181
|
]
|
|
197
182
|
ignore = [
|
|
198
|
-
"E501", # line too long, handled by
|
|
183
|
+
"E501", # line too long, handled by ruff format
|
|
199
184
|
"B008", # do not perform function calls in argument defaults
|
|
200
185
|
"C901", # too complex
|
|
201
186
|
]
|
|
@@ -30,13 +30,11 @@ def count_tokens(content: str | list[dict[str, str]] | dict[str, Any], model: st
|
|
|
30
30
|
|
|
31
31
|
try:
|
|
32
32
|
client = anthropic.Anthropic()
|
|
33
|
-
|
|
33
|
+
|
|
34
|
+
# Use the messages.count_tokens API for accurate counting
|
|
34
35
|
model_name = model.split(":", 1)[1] if ":" in model else "claude-3-5-haiku-latest"
|
|
36
|
+
response = client.messages.count_tokens(model=model_name, messages=[{"role": "user", "content": text}])
|
|
35
37
|
|
|
36
|
-
# Use the beta messages.count_tokens API for accurate counting
|
|
37
|
-
response = client.messages.count_tokens(
|
|
38
|
-
model=model_name, messages=[{"role": "user", "content": text}], betas=["token-counting-2024-11-01"]
|
|
39
|
-
)
|
|
40
38
|
return response.input_tokens
|
|
41
39
|
except Exception:
|
|
42
40
|
# Fallback to simple estimation for Anthropic models
|
|
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
|