-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Add CandidateEvaluator class #6424
Conversation
@uranusjr This PR is something that occurred to me when reviewing one of your earlier PR's. A subsequent PR could be to change |
630361f
to
a6c8d05
Compare
In addition, if |
This sounds like a great idea! I’ve been thinking about splitting I might start trying to split |
Great, I'm glad you like it! Do you approve of this PR so it can be merged? Regarding |
I agree. What I meant is I could try to get a better idea what else needs to be done 😃 |
I like the direction you're taking this @cjerdonek @uranusjr! :D I'll bring up the idea that it might also make sense to make |
Thanks, @uranusjr and @pradyunsg! |
By the way, re: splitting things out further, I noticed that I believe that would bring the size of the |
My gut feeling is they should be in their own class (CandidateFinder or something)? The candidate selection consists of three steps: collecting links, filtering applicable, and select best. FoundCandidates deals the last, CandidateEvaluator the second, so maybe the first should be its own component as well. |
I think the methods I mentioned aren’t named well. They’re also responsible for filtering (no “collection” takes place in them). And that filtering also depends exactly on the set of valid tags which CandidateEvaluator already has. It will be nice because it will collect together all the methods that filter and sort by the valid tags. It will be a very functional (in the sense of pure function), testable class. |
Also, I think it might be worth broadening how we think about the process beyond how it is currently structured because I feel like a number of simplifications might be possible. For example, "filtering" is currently also done inside "select best," as well as when collecting links, so the responsibilities are spread across which isn't so good. As another example, I think there is a chance that the filtering done inside "select best" could be happening a lot earlier in the process (even before the |
I just posted PR #6425 to do part of what I suggested in my previous comment. It moves |
Reading the source, I think the functions are probably both inadaquently named and implemented (in the three-step sense). |
Currently, the |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This is to further simplify the
PackageFinder
class.