git-explain 2.2.0__tar.gz → 2.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.
- {git_explain-2.2.0 → git_explain-2.2.1}/PKG-INFO +2 -2
- {git_explain-2.2.0 → git_explain-2.2.1}/README.md +1 -1
- git_explain-2.2.1/git_explain/__init__.py +1 -0
- {git_explain-2.2.0 → git_explain-2.2.1}/git_explain/gemini.py +8 -3
- {git_explain-2.2.0 → git_explain-2.2.1}/git_explain/heuristics.py +5 -1
- {git_explain-2.2.0 → git_explain-2.2.1}/git_explain.egg-info/PKG-INFO +2 -2
- git_explain-2.2.0/git_explain/__init__.py +0 -1
- {git_explain-2.2.0 → git_explain-2.2.1}/LICENSE +0 -0
- {git_explain-2.2.0 → git_explain-2.2.1}/git_explain/__main__.py +0 -0
- {git_explain-2.2.0 → git_explain-2.2.1}/git_explain/cli.py +0 -0
- {git_explain-2.2.0 → git_explain-2.2.1}/git_explain/commit_infer.py +0 -0
- {git_explain-2.2.0 → git_explain-2.2.1}/git_explain/git.py +0 -0
- {git_explain-2.2.0 → git_explain-2.2.1}/git_explain/path_topics.py +0 -0
- {git_explain-2.2.0 → git_explain-2.2.1}/git_explain/run.py +0 -0
- {git_explain-2.2.0 → git_explain-2.2.1}/git_explain.egg-info/SOURCES.txt +0 -0
- {git_explain-2.2.0 → git_explain-2.2.1}/git_explain.egg-info/dependency_links.txt +0 -0
- {git_explain-2.2.0 → git_explain-2.2.1}/git_explain.egg-info/entry_points.txt +0 -0
- {git_explain-2.2.0 → git_explain-2.2.1}/git_explain.egg-info/requires.txt +0 -0
- {git_explain-2.2.0 → git_explain-2.2.1}/git_explain.egg-info/top_level.txt +0 -0
- {git_explain-2.2.0 → git_explain-2.2.1}/pyproject.toml +0 -0
- {git_explain-2.2.0 → git_explain-2.2.1}/setup.cfg +0 -0
- {git_explain-2.2.0 → git_explain-2.2.1}/tests/test_cli_utils.py +0 -0
- {git_explain-2.2.0 → git_explain-2.2.1}/tests/test_commit_infer.py +0 -0
- {git_explain-2.2.0 → git_explain-2.2.1}/tests/test_gemini.py +0 -0
- {git_explain-2.2.0 → git_explain-2.2.1}/tests/test_heuristics.py +0 -0
- {git_explain-2.2.0 → git_explain-2.2.1}/tests/test_run_apply.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: git-explain
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.1
|
|
4
4
|
Summary: CLI that suggests git add/commit from diffs using Gemini
|
|
5
5
|
Author: nazarli-shabnam
|
|
6
6
|
License-Expression: MIT
|
|
@@ -62,7 +62,7 @@ Run that from the repo root so Python picks up the `git_explain` folder—no `pi
|
|
|
62
62
|
Optional: install a specific tag from GitHub instead of PyPI:
|
|
63
63
|
|
|
64
64
|
```bash
|
|
65
|
-
pip install "git+https://github.com/nazarli-shabnam/git-explain.git@v2.1
|
|
65
|
+
pip install "git+https://github.com/nazarli-shabnam/git-explain.git@v2.2.1"
|
|
66
66
|
```
|
|
67
67
|
|
|
68
68
|
---
|
|
@@ -31,7 +31,7 @@ Run that from the repo root so Python picks up the `git_explain` folder—no `pi
|
|
|
31
31
|
Optional: install a specific tag from GitHub instead of PyPI:
|
|
32
32
|
|
|
33
33
|
```bash
|
|
34
|
-
pip install "git+https://github.com/nazarli-shabnam/git-explain.git@v2.1
|
|
34
|
+
pip install "git+https://github.com/nazarli-shabnam/git-explain.git@v2.2.1"
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
---
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2.2.1"
|
|
@@ -36,7 +36,7 @@ VALID_TYPES = frozenset(
|
|
|
36
36
|
|
|
37
37
|
_TYPE_RE_ALT = "|".join(sorted(VALID_TYPES | {"TESTS"}, key=len, reverse=True))
|
|
38
38
|
|
|
39
|
-
SYSTEM_PROMPT =
|
|
39
|
+
SYSTEM_PROMPT = """You are given a list of changed/added files under ## Staged, ## Unstaged, ## Untracked.
|
|
40
40
|
Each file line is: <STATUS> <PATH> where STATUS is one of:
|
|
41
41
|
- A = added/new file
|
|
42
42
|
- M = modified
|
|
@@ -67,7 +67,7 @@ git add api/Dockerfile api/nginx.conf
|
|
|
67
67
|
git commit -m "build(api): add Docker and nginx configuration"
|
|
68
68
|
"""
|
|
69
69
|
|
|
70
|
-
SYSTEM_PROMPT_WITH_DIFF =
|
|
70
|
+
SYSTEM_PROMPT_WITH_DIFF = """You are given:
|
|
71
71
|
1. A list of changed/added files (## Staged, ## Unstaged, ## Untracked) with <STATUS> <PATH>.
|
|
72
72
|
2. The full diff (## Diff) showing exact code changes.
|
|
73
73
|
|
|
@@ -119,6 +119,7 @@ def _normalize_type(t: str) -> str:
|
|
|
119
119
|
return "TEST"
|
|
120
120
|
return upper if upper in VALID_TYPES else "CHORE"
|
|
121
121
|
|
|
122
|
+
|
|
122
123
|
# Single-line subject for `git commit -m` (no body); allow longer than classic 72 when users want detail.
|
|
123
124
|
MAX_COMMIT_SUBJECT_CHARS = 200
|
|
124
125
|
|
|
@@ -363,7 +364,11 @@ def _fallback_type_and_message_with_context(
|
|
|
363
364
|
hints = test_subject_hints(files)
|
|
364
365
|
if all_tests_only and hints:
|
|
365
366
|
if len(hints) <= 4:
|
|
366
|
-
head =
|
|
367
|
+
head = (
|
|
368
|
+
", ".join(hints[:-1]) + " and " + hints[-1]
|
|
369
|
+
if len(hints) > 1
|
|
370
|
+
else hints[0]
|
|
371
|
+
)
|
|
367
372
|
else:
|
|
368
373
|
head = ", ".join(hints[:4])
|
|
369
374
|
topics.append(f"tests for {head}")
|
|
@@ -158,7 +158,11 @@ def suggest_from_changes(
|
|
|
158
158
|
hints = test_subject_hints(paths)
|
|
159
159
|
if all_tests_only and hints:
|
|
160
160
|
if len(hints) <= 4:
|
|
161
|
-
head =
|
|
161
|
+
head = (
|
|
162
|
+
", ".join(hints[:-1]) + " and " + hints[-1]
|
|
163
|
+
if len(hints) > 1
|
|
164
|
+
else hints[0]
|
|
165
|
+
)
|
|
162
166
|
else:
|
|
163
167
|
head = ", ".join(hints[:4])
|
|
164
168
|
topics.append(f"tests for {head}")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: git-explain
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.1
|
|
4
4
|
Summary: CLI that suggests git add/commit from diffs using Gemini
|
|
5
5
|
Author: nazarli-shabnam
|
|
6
6
|
License-Expression: MIT
|
|
@@ -62,7 +62,7 @@ Run that from the repo root so Python picks up the `git_explain` folder—no `pi
|
|
|
62
62
|
Optional: install a specific tag from GitHub instead of PyPI:
|
|
63
63
|
|
|
64
64
|
```bash
|
|
65
|
-
pip install "git+https://github.com/nazarli-shabnam/git-explain.git@v2.1
|
|
65
|
+
pip install "git+https://github.com/nazarli-shabnam/git-explain.git@v2.2.1"
|
|
66
66
|
```
|
|
67
67
|
|
|
68
68
|
---
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "2.2.0"
|
|
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
|