Skip to content

Commit 24af3e7

Browse files
committed
seriously bug fixes are annoying, but version 0.7.2 is a thing now in a span of 2 hours
1 parent a0625f7 commit 24af3e7

File tree

5 files changed

+150
-14
lines changed

5 files changed

+150
-14
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,14 @@ $ commit-checker --coach "refactor everything"
573573
574574
## 🎉 Recent Updates
575575
576-
### v0.7.1 - Smart Profile System (Latest)
576+
### v0.7.2 - Standalone Script Fixes (Latest)
577+
- 🔧 **Fixed Standalone Profile Commands** - `--build-profile`, `--insights`, `--coach` now work in standalone mode
578+
- 📱 **Added `--version` Flag** - Show version information and project details
579+
- 🛡️ **Enhanced Standalone Compatibility** - Profile functions now work for curl/bash installations
580+
- 🔄 **Fixed Update System** - Resolved infinite update loops in standalone mode
581+
- 📦 **Improved Command Routing** - All Smart Profile System commands now properly execute
582+
583+
### v0.7.1 - Smart Profile System
577584
- 🐛 **Critical Bug Fixes** - Fixed sys import error causing command failures
578585
- ⚡ **Enhanced Stability** - All commands now exit cleanly without errors
579586
- 🛡️ **Improved Install Script** - Better error handling during installation

commit_checker/cli.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,7 @@ def main():
456456
parser.add_argument("--update", action="store_true", help="Manually check for new GitHub version")
457457
parser.add_argument("--stats", action="store_true", help="Show ASCII commit trend charts")
458458
parser.add_argument("--diagnose", action="store_true", help="Run system diagnostics")
459+
parser.add_argument("--version", action="store_true", help="Show version information")
459460

460461
# Smart Profile System flags
461462
parser.add_argument("--build-profile", action="store_true", help="Build or rebuild your coding profile")
@@ -524,6 +525,12 @@ def main():
524525
print("\nEven small support helps keep the streak alive for devs worldwide 🌍")
525526
sys.exit(0)
526527

528+
if args.version:
529+
print("🚀 commit-checker v0.7.2")
530+
print("📅 Smart Profile System")
531+
print("🔗 https://github.com/AmariahAK/commit-checker")
532+
sys.exit(0)
533+
527534
if args.update:
528535
try:
529536
manual_update_check()

roadmap.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,14 @@
1919
- ✅ Expanded achievements system with secret badges
2020
- ✅ Standalone update system fixes for curl/bash installations
2121

22-
## ✅ v0.7.1 – Smart Profile System (Latest)
22+
## ✅ v0.7.2 – Standalone Script Fixes (Latest)
23+
- ✅ Fixed standalone profile commands: --build-profile, --insights, --coach now work properly
24+
- ✅ Added --version flag for version information
25+
- ✅ Enhanced standalone compatibility with profile functions and fallbacks
26+
- ✅ Fixed update system infinite loops in standalone mode
27+
- ✅ Improved command routing for all Smart Profile System features
28+
29+
## ✅ v0.7.1 – Smart Profile System
2330
- ✅ Critical bug fixes: Fixed sys import error causing command failures
2431
- ✅ Enhanced stability: All commands now exit cleanly without errors
2532
- ✅ Improved install script with better error handling

scripts/commit-checker-standalone.sh

Lines changed: 126 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -108,16 +108,40 @@ try:
108108
prompt_config = config.prompt_config
109109
get_auto_config = config.get_auto_config
110110
save_config = config.save_config
111-
load_profile = config.load_profile
112-
save_profile = config.save_profile
113-
is_profile_enabled = config.is_profile_enabled
114-
needs_profile_rebuild = config.needs_profile_rebuild
115-
enable_profile = config.enable_profile
116-
build_profile = profile.build_profile
117-
suggest_commit_message = profile.suggest_commit_message
118-
get_stack_suggestions = profile.get_stack_suggestions
119-
get_structure_suggestions = profile.get_structure_suggestions
120-
play_sound = profile.play_sound
111+
try:
112+
load_profile = config.load_profile
113+
save_profile = config.save_profile
114+
is_profile_enabled = config.is_profile_enabled
115+
needs_profile_rebuild = config.needs_profile_rebuild
116+
enable_profile = config.enable_profile
117+
except AttributeError:
118+
# Fallback if profile functions don't exist in older version
119+
def load_profile(): return None
120+
def save_profile(p): return True
121+
def is_profile_enabled(): return False
122+
def needs_profile_rebuild(): return True
123+
def enable_profile(e): return True
124+
125+
try:
126+
build_profile = profile.build_profile
127+
suggest_commit_message = profile.suggest_commit_message
128+
get_stack_suggestions = profile.get_stack_suggestions
129+
get_structure_suggestions = profile.get_structure_suggestions
130+
get_commit_size_suggestions = profile.get_commit_size_suggestions
131+
get_til_tag_suggestions = profile.get_til_tag_suggestions
132+
update_freeform_feedback = profile.update_freeform_feedback
133+
play_sound = profile.play_sound
134+
except AttributeError:
135+
# Fallback if profile module doesn't exist
136+
def build_profile(p): return {}
137+
def suggest_commit_message(r, p, m): return []
138+
def get_stack_suggestions(r, p): return []
139+
def get_structure_suggestions(r, p): return []
140+
def get_commit_size_suggestions(r): return []
141+
def get_til_tag_suggestions(r, p, t): return []
142+
def update_freeform_feedback(p, r, f): return p
143+
def play_sound(s): pass
144+
121145
get_current_git_repo = path_detector.get_current_git_repo
122146
add_til_entry = til.add_til_entry
123147
view_til = til.view_til
@@ -173,12 +197,14 @@ def main():
173197
parser.add_argument("--stats", action="store_true", help="Show ASCII commit trend charts")
174198
parser.add_argument("--diagnose", action="store_true", help="Run system diagnostics")
175199
parser.add_argument("--update", action="store_true", help="Check for updates")
200+
parser.add_argument("--version", action="store_true", help="Show version information")
176201
177-
# Smart Profile System flags (v0.7.0)
202+
# Smart Profile System flags (v0.7.1)
178203
parser.add_argument("--build-profile", action="store_true", help="Build or rebuild your coding profile")
179204
parser.add_argument("--coach", type=str, nargs='?', const='', help="Get commit message coaching suggestions")
180205
parser.add_argument("--insights", action="store_true", help="Show personalized coding insights")
181206
parser.add_argument("--no-profile", action="store_true", help="Skip profile-based suggestions")
207+
parser.add_argument("--feedback", choices=["good", "bad"], help="Give feedback on coaching suggestions")
182208
183209
# Repository management
184210
parser.add_argument("--scan", action="store_true", help="Scan repo folder for git repositories")
@@ -231,6 +257,12 @@ def main():
231257
print("🌐 GitHub: https://github.com/AmariahAK")
232258
sys.exit(0)
233259
260+
if args.version:
261+
print("🚀 commit-checker v0.7.2")
262+
print("📅 Smart Profile System")
263+
print("🔗 https://github.com/AmariahAK/commit-checker")
264+
sys.exit(0)
265+
234266
if args.update:
235267
manual_update_check()
236268
sys.exit(0)
@@ -269,6 +301,89 @@ def main():
269301
show_commit_stats(local_paths)
270302
sys.exit(0)
271303
304+
# Handle Smart Profile System commands
305+
if args.build_profile:
306+
local_paths = config.get('local_paths', [])
307+
if not local_paths:
308+
print("❌ No local paths configured. Run --init or --setup first.")
309+
sys.exit(1)
310+
311+
print("🧙 Building your smart coding profile...")
312+
print(" 📊 Analyzing commit history patterns...")
313+
print(" 🔍 Detecting project tech stacks...")
314+
print(" 📁 Scanning project structures...")
315+
316+
try:
317+
# Import profile functions
318+
profile_module = load_module("profile", os.path.join(script_dir, "profile.py"))
319+
build_profile = profile_module.build_profile
320+
321+
profile = build_profile(local_paths)
322+
323+
# Save profile using config functions
324+
if save_profile(profile):
325+
repo_count = len(profile.get("repos", {}))
326+
print(f"\n✅ Profile built successfully!")
327+
print(f" 📈 Analyzed {repo_count} repositories")
328+
print(f" 💡 Smart suggestions now enabled")
329+
330+
# Enable profile if not already enabled
331+
config['enable_profile'] = True
332+
save_config(config)
333+
else:
334+
print("❌ Failed to save profile. Check file permissions.")
335+
except Exception as e:
336+
print(f"❌ Profile building failed: {e}")
337+
338+
sys.exit(0)
339+
340+
if args.insights:
341+
if not config.get('enable_profile', False):
342+
print("🧙 Smart profile system is disabled.")
343+
print("💡 Run --build-profile to enable insights.")
344+
sys.exit(1)
345+
346+
# Load profile from config
347+
profile = config.get('profile', {})
348+
if not profile:
349+
print("🧙 No profile found. Run --build-profile first.")
350+
sys.exit(1)
351+
352+
print("🧠 Personal Coding Insights")
353+
print("=" * 50)
354+
355+
global_profile = profile.get("global", {})
356+
repos = profile.get("repos", {})
357+
358+
# Global insights
359+
print(f"📊 Overall Style:")
360+
print(f" • Average commit length: {global_profile.get('avg_length', 0)} words")
361+
print(f" • Preferred mood: {global_profile.get('mood', 'unknown').title()}")
362+
print(f" • Uses emojis: {'Yes' if global_profile.get('uses_emoji', False) else 'No'}")
363+
364+
# Repository insights
365+
if repos:
366+
print(f"\n📁 Repository Analysis ({len(repos)} repos):")
367+
368+
# Count tech stacks
369+
tech_stacks = {}
370+
for repo_data in repos.values():
371+
for tech in repo_data.get("tech_stack", []):
372+
tech_stacks[tech] = tech_stacks.get(tech, 0) + 1
373+
374+
if tech_stacks:
375+
print(" 🔧 Tech Stack Distribution:")
376+
for tech, count in sorted(tech_stacks.items(), key=lambda x: x[1], reverse=True):
377+
percentage = (count / len(repos)) * 100
378+
print(f" • {tech.title()}: {count} repos ({percentage:.0f}%)")
379+
380+
last_scan = profile.get("last_scan", "")
381+
if last_scan:
382+
print(f"\n🕒 Profile last updated: {last_scan[:19].replace('T', ' ')}")
383+
384+
print("\n💡 Run --build-profile to refresh your profile data")
385+
sys.exit(0)
386+
272387
# Gamification commands
273388
if args.achievements:
274389
print(display_achievements())

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
setup(
44
name="commit-checker",
5-
version="0.7.1",
5+
version="0.7.2",
66
description="CLI tool to check your daily GitHub and local commits with smart profile system, advanced analytics, TIL logging, and interactive coaching",
77
author="Amariah Kamau",
88
packages=find_packages(),

0 commit comments

Comments
 (0)