Skip to content

Conversation

@konard
Copy link
Member

@konard konard commented Sep 13, 2025

Summary

Fixed issue #54: "top Visual Basic is not working"

  • The root cause was that the top_langs() method was using split(r"\s+", ...) to parse language names, which incorrectly split "Visual Basic" into ["Visual", "Basic"]
  • This caused the bot to search for users who have both "Visual" AND "Basic" as separate languages, instead of users with "Visual Basic" as a single language
  • Added a new parse_programming_languages() function that properly handles multi-word languages like "Visual Basic"
  • Updated the top_langs() method to use the new parsing function

Test plan

  • Created comprehensive tests in the experiments folder demonstrating the issue and fix
  • Verified that "Visual Basic" is now correctly parsed as a single language
  • Verified that other language combinations (like "Python Java") continue to work as expected
  • Confirmed that the fix handles case-insensitive matching

The bot will now correctly respond to commands like:

  • top Visual Basic
  • top visual basic
  • top Visual Basic Python

🤖 Generated with Claude Code


Resolves #54

Adding CLAUDE.md with task information for AI processing.
This file will be removed when the task is complete.

Issue: #54
@konard konard self-assigned this Sep 13, 2025
- Fixed issue #54 where "top Visual Basic" command was not working
- The problem was that split(r"\s+", ...) was incorrectly breaking "Visual Basic" into ["Visual", "Basic"]
- Added new parse_programming_languages() function to utils.py that properly handles multi-word languages
- Updated top_langs() method in commands.py to use the new parsing function
- Added comprehensive tests demonstrating the fix in experiments folder

The fix ensures that "Visual Basic" is treated as a single language name,
allowing the bot to correctly find users who have "Visual Basic" in their profiles.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@konard konard changed the title [WIP] top Visual Basic is not working Fix Visual Basic language parsing in top command Sep 14, 2025
@konard konard marked this pull request as ready for review September 14, 2025 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

top Visual Basic is not working

2 participants