-
Notifications
You must be signed in to change notification settings - Fork 2k
Discogs: fixes for: 6177, 6068 #6179
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
base: master
Are you sure you want to change the base?
Conversation
91ece4c to
d68514e
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6179 +/- ##
==========================================
+ Coverage 68.68% 68.70% +0.01%
==========================================
Files 138 138
Lines 18532 18600 +68
Branches 3061 3069 +8
==========================================
+ Hits 12729 12779 +50
- Misses 5149 5169 +20
+ Partials 654 652 -2
🚀 New features to boost your workflow:
|
This comment was marked as resolved.
This comment was marked as resolved.
f0902d3 to
cb4b4fc
Compare
cb4b4fc to
ec23eec
Compare
f1e1620 to
21a6456
Compare
semohr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just had some time to have a look here. Added some comments for potential improvements.
Thanks for starting to tackle the discogs plugin, it is in dire need of some love 😄
|
Thanks Sebastian! I'm out of town at the moment but will get these applied once I'm back. |
|
No hurry! Take your time and enjoy the holidays. |
beetsplug/discogs.py
Outdated
| index = 0 | ||
| divisions: list[str] = [] | ||
| next_divisions: list[str] = [] | ||
| t: TracklistInfo = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we try to not use single character variable names? I get that they simplify things in writing but my fish brain forgets what t is after reading like 20 lines 🤣
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed - they're fine for hashing out the ideas but they do make retreading the code a lot harder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should good here!
While the whole logic is still a bit convoluted, I feel like it is a major improvement from before the PR 👍
Thank you for taking the initiative!
|
Updated the variable name - can go ahead and merge if all looks good! |
|
I think @snejus wants to have a look too since he self assigned this to himself too. |
Description
Fixes #6177, #6068.
I fixed the issue in #6177 by removing the derived class interface, and moving those fields back into function variables. They're a bit unwieldy still, but that's the algorithm it came with. There's a lot of room to continue to improve the clarity of the code in that section, but I think that'll require a deeper overhaul.
For #6068, I created the
ArtistInfoandAlbumArtistInfotyped dictionaries, and was able to centralize the logic of building the artist info intobuild_artistinfoandbuild_albumartistinfo. Tests for these scenarios were created largely by expanding existing tests to incorporate the new fields.I think I'll have to re-think the entire algorithm for 6030 to make it more flexible at parsing the issue for #6030, so I'll move that to a later PR in the interest of getting the flex attr fix in.
To Do
docs/changelog.rstto the bottom of one of the lists near the top of the document.)