Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pr fixing issue exception when artist sorted name has no last name pa… #367

Open
wants to merge 1 commit into
base: 2.0
Choose a base branch
from

Conversation

sambhavnoobcoder
Copy link

…rt issue#350

fixes #350

added conditional , that recognises a single word artist name different from one with a last name .In such cases, the code generates initials for this single word to serve as an abbreviated representation.The initials are formed by taking the first letter of each part of the single word and appending a dot ('.') after each letter.

moreover the code also handles the whitespaces in sorted and unsorted names .

…rt issue#350

fixes metabrainz#350 

added conditional , that recognises a single word artist name different from one with a last name .In such cases, the code generates initials for this single word to serve as an abbreviated representation.The initials are formed by taking the first letter of each part of the single word and appending a dot ('.') after each letter.

moreover the code also handles the whitespaces in sorted and unsorted names .
Copy link
Contributor

@Sophist-UK Sophist-UK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry - but I am unable to review this because it contains multiple changes in a single commit and it is impossible to relate changes made to the problem they are fixing:

a. To fix the exception reported in #350;
b. To do other stuff

There are no examples that have been provided to test the use cases that have changed both before and after changes, nor examples that can be used to test that functionality has not changed for existing releases that work just fine.

In addition, there seems to be a for ... else statement that has been removed but I cannot determine why this was removed and what the impact would be.

sortTag,
)
log.debug("Abbreviated (%s, %s) to (%s, %s)." % (surname, forename, surname, inits))
else: # while loop ended without a break i.e. no errors
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you remove this else statement? Removing this else statement changes the whole meaning of the statements that follow it.

@sambhavnoobcoder
Copy link
Author

okay , I'll take this into account and redraft smaller pr's in a systematic manner to make it easier to review and more step by step to resolve any issues in the code as well . in doing so , I'll also provide with the adequate testing use cases for both before and after the changes to assist with testing the changes in the code . thanks .

@phw
Copy link
Member

phw commented Jan 5, 2024

@sambhavnoobcoder Yes, that would be great. I find this a bit difficult to review as it is, but you already had to wrap you head around all the functionality here. Especially some real test cases, if you have some, would be useful.

@eharris
Copy link

eharris commented May 19, 2024

I would love to see this get fixed, having quite a few errors with this plugin.

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.

[abbreviate_artistsort] exception when artist sorted name has no last name part
4 participants