repr-cli 0.2.15__py3-none-any.whl → 0.2.16__py3-none-any.whl
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.
- repr/cli.py +17 -0
- repr/config.py +1 -1
- repr/storage.py +32 -0
- {repr_cli-0.2.15.dist-info → repr_cli-0.2.16.dist-info}/METADATA +3 -1
- {repr_cli-0.2.15.dist-info → repr_cli-0.2.16.dist-info}/RECORD +9 -9
- {repr_cli-0.2.15.dist-info → repr_cli-0.2.16.dist-info}/WHEEL +1 -1
- {repr_cli-0.2.15.dist-info → repr_cli-0.2.16.dist-info}/entry_points.txt +0 -0
- {repr_cli-0.2.15.dist-info → repr_cli-0.2.16.dist-info}/licenses/LICENSE +0 -0
- {repr_cli-0.2.15.dist-info → repr_cli-0.2.16.dist-info}/top_level.txt +0 -0
repr/cli.py
CHANGED
|
@@ -491,6 +491,23 @@ def generate(
|
|
|
491
491
|
console.print(f" [{BRAND_MUTED}]No commits found[/]")
|
|
492
492
|
continue
|
|
493
493
|
|
|
494
|
+
# Filter out already-processed commits
|
|
495
|
+
from .storage import get_processed_commit_shas
|
|
496
|
+
processed_shas = get_processed_commit_shas(repo_name=repo_info.name)
|
|
497
|
+
|
|
498
|
+
original_count = len(commit_list)
|
|
499
|
+
commit_list = [c for c in commit_list if c["full_sha"] not in processed_shas]
|
|
500
|
+
|
|
501
|
+
if not json_output and processed_shas:
|
|
502
|
+
skipped_count = original_count - len(commit_list)
|
|
503
|
+
if skipped_count > 0:
|
|
504
|
+
console.print(f" [{BRAND_MUTED}]Skipping {skipped_count} already-processed commits[/]")
|
|
505
|
+
|
|
506
|
+
if not commit_list:
|
|
507
|
+
if not json_output:
|
|
508
|
+
console.print(f" [{BRAND_MUTED}]All commits already processed[/]")
|
|
509
|
+
continue
|
|
510
|
+
|
|
494
511
|
# Dry run: show what would be sent
|
|
495
512
|
if dry_run:
|
|
496
513
|
from .openai_analysis import estimate_tokens, get_batch_size
|
repr/config.py
CHANGED
|
@@ -108,7 +108,7 @@ DEFAULT_CONFIG = {
|
|
|
108
108
|
},
|
|
109
109
|
"generation": {
|
|
110
110
|
"batch_size": 5, # Commits per story
|
|
111
|
-
"auto_generate_on_hook":
|
|
111
|
+
"auto_generate_on_hook": True, # Auto-generate when hook runs
|
|
112
112
|
"default_template": "resume", # Default story template
|
|
113
113
|
"token_limit": 100000, # Max tokens per cloud request
|
|
114
114
|
"max_commits_per_batch": 50, # Max commits per request
|
repr/storage.py
CHANGED
|
@@ -246,6 +246,38 @@ def update_story_metadata(story_id: str, updates: dict[str, Any]) -> bool:
|
|
|
246
246
|
return False
|
|
247
247
|
|
|
248
248
|
|
|
249
|
+
def get_processed_commit_shas(repo_name: str | None = None) -> set[str]:
|
|
250
|
+
"""
|
|
251
|
+
Get all commit SHAs that have already been processed into stories.
|
|
252
|
+
|
|
253
|
+
Args:
|
|
254
|
+
repo_name: Optional filter by repository name
|
|
255
|
+
|
|
256
|
+
Returns:
|
|
257
|
+
Set of commit SHAs that have been processed
|
|
258
|
+
"""
|
|
259
|
+
ensure_directories()
|
|
260
|
+
|
|
261
|
+
processed_shas = set()
|
|
262
|
+
|
|
263
|
+
for meta_path in STORIES_DIR.glob("*.json"):
|
|
264
|
+
try:
|
|
265
|
+
metadata = json.loads(meta_path.read_text())
|
|
266
|
+
|
|
267
|
+
# Filter by repo if specified
|
|
268
|
+
if repo_name and metadata.get("repo_name") != repo_name:
|
|
269
|
+
continue
|
|
270
|
+
|
|
271
|
+
# Collect commit SHAs from this story
|
|
272
|
+
commit_shas = metadata.get("commit_shas", [])
|
|
273
|
+
processed_shas.update(commit_shas)
|
|
274
|
+
|
|
275
|
+
except (json.JSONDecodeError, IOError):
|
|
276
|
+
continue
|
|
277
|
+
|
|
278
|
+
return processed_shas
|
|
279
|
+
|
|
280
|
+
|
|
249
281
|
def get_unpushed_stories() -> list[dict[str, Any]]:
|
|
250
282
|
"""Get stories that haven't been pushed to cloud."""
|
|
251
283
|
stories = list_stories()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: repr-cli
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.16
|
|
4
4
|
Summary: A beautiful, privacy-first CLI that analyzes your code repositories and generates a compelling developer profile
|
|
5
5
|
Author-email: Repr <hello@repr.dev>
|
|
6
6
|
License: MIT License
|
|
@@ -219,6 +219,8 @@ repr generate --since "2 weeks ago" --local
|
|
|
219
219
|
repr generate --since monday --local
|
|
220
220
|
```
|
|
221
221
|
|
|
222
|
+
**Note:** `repr generate` automatically skips commits that have already been processed into stories. You can safely run it multiple times without creating duplicates.
|
|
223
|
+
|
|
222
224
|
### Publish your profile (optional)
|
|
223
225
|
|
|
224
226
|
```bash
|
|
@@ -2,8 +2,8 @@ repr/__init__.py,sha256=jraImidqaPxv03Uy76zPtnAcNnOl5KLZSXYBzxI85BI,446
|
|
|
2
2
|
repr/__main__.py,sha256=N7amYwdGB3yzk2ZJJbtH2hhESNkDuhDL11dDEm5Kl60,166
|
|
3
3
|
repr/api.py,sha256=SfcoGysf_G5tXegM-zk_Rzsh5Zs59ptzUlStWgrHXP0,13812
|
|
4
4
|
repr/auth.py,sha256=xFtDRtdecT0T8ToTEpGinJoLf53zRQSdKSoPWjeyvoQ,12252
|
|
5
|
-
repr/cli.py,sha256=
|
|
6
|
-
repr/config.py,sha256=
|
|
5
|
+
repr/cli.py,sha256=BVPRkjcxf9J13z-gFNG35tTAp2_2kAFPcpuzS6BEQWo,91630
|
|
6
|
+
repr/config.py,sha256=bxgOfsIAiTiYFclmEetPNRmrP1BcOn6z0rvo_rghdIc,30600
|
|
7
7
|
repr/discovery.py,sha256=2RYmJleqV7TbxIMMYP2izkEBUeKH7U1F-U4KAUlUNww,14816
|
|
8
8
|
repr/doctor.py,sha256=-ZyaRu_tb0vpT-ol7vLkgke68UQAxbpwqbubTJqbWsU,13443
|
|
9
9
|
repr/extractor.py,sha256=lGPN8gwTF_ZSezoQoPBMnf95nCJArGIteNiInfb39FM,10566
|
|
@@ -12,15 +12,15 @@ repr/keychain.py,sha256=CpKU3tjFZVEPgiHiplSAtBQFDPA6qOSovv4IXXgJXbY,6957
|
|
|
12
12
|
repr/llm.py,sha256=inABX2kwEhPnON7sjCzcTMZZeCf0k3G08LyrKsi6Sko,14637
|
|
13
13
|
repr/openai_analysis.py,sha256=PE3UBTXcmJe-uwZUKR00PAfghGHIgsxHi1SWA15uRKM,28883
|
|
14
14
|
repr/privacy.py,sha256=sN1tkoZjCDSwAjkQWeH6rHaLrtv727yT1HNHQ54GRis,9834
|
|
15
|
-
repr/storage.py,sha256=
|
|
15
|
+
repr/storage.py,sha256=rjHTBs-6tFds6Cb-hA9Ezdjrd-MS6pFCZ3E0tDTAdzg,15775
|
|
16
16
|
repr/telemetry.py,sha256=M1NribTkiezpvweLrdbJxKDU2mlTe7frke6sUP0Yhiw,7000
|
|
17
17
|
repr/templates.py,sha256=O9pONIkrfWR-JqIyRp6C7e_csnD50SgbJxNNTZSjWFg,7449
|
|
18
18
|
repr/tools.py,sha256=opAWp34PY_8So9n_nYQQiF3OpokQsJebanhOdjX867Q,21130
|
|
19
19
|
repr/ui.py,sha256=29pl_paJEWfCUu4GcDaePlmeWTQ0B3MFhD7de6LgJsM,6105
|
|
20
20
|
repr/updater.py,sha256=rybVVIxDk6RmKaswyKogVun8egVaonyH9nh_q2Rr0Vk,7335
|
|
21
|
-
repr_cli-0.2.
|
|
22
|
-
repr_cli-0.2.
|
|
23
|
-
repr_cli-0.2.
|
|
24
|
-
repr_cli-0.2.
|
|
25
|
-
repr_cli-0.2.
|
|
26
|
-
repr_cli-0.2.
|
|
21
|
+
repr_cli-0.2.16.dist-info/licenses/LICENSE,sha256=tI16Ry3IQhjsde6weJ_in6czzWW2EF4Chz1uicyDLAA,1061
|
|
22
|
+
repr_cli-0.2.16.dist-info/METADATA,sha256=jgPfM4b5FYsxRGmRJCS0j_MTGtPfhd0-mdQO1FDZwEo,11396
|
|
23
|
+
repr_cli-0.2.16.dist-info/WHEEL,sha256=qELbo2s1Yzl39ZmrAibXA2jjPLUYfnVhUNTlyF1rq0Y,92
|
|
24
|
+
repr_cli-0.2.16.dist-info/entry_points.txt,sha256=SJoKgNB-fRy6O2T_lztFr9T3ND_BQl0ijWxNW-J7dUU,38
|
|
25
|
+
repr_cli-0.2.16.dist-info/top_level.txt,sha256=LNgPqdJPQnlicRve7uzI4a6rEUdcxHrNkUq_2w7eeiA,5
|
|
26
|
+
repr_cli-0.2.16.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|