-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Call into operations.generate_metadata to generate metadata #7051
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
Conversation
As things stand, it'll completely delegate all the metadata generation to InstallRequirement's methods. Follow ups will move related code into this module.
IMO doing cleanup in-place or extracting functionality as free functions that take a the minimum required arguments would be easier to follow and require less effort to review. I'm going back and forth on this because it's hard to see where it can go. |
My plan is to be moving the methods to become functions, in the new module, in follow up PRs. There's a decent amount of code that's there only for these calls, enough that I want to split the adapt-existing-code, move-logic and cleanup-logic steps. |
@chrahunt are you suggesting to add moving the methods that are currently being directly called, to this PR? I'm not sure how to address that -- I guess I'm trying to do too less in this PR? |
That could be it. With this change on it's own I'm concerned about the proliferation of The alternative I suggested above was a way to avoid using |
Ah. Yes. My plan is to move the code in these methods (basically cut-paste-clean the methods being called) and then have Distribution objects call these methods, resulting in the removal of metadata generation logic from InstallRequirement. The methods being called would basically move over/be removed in follow ups. |
Cool, so I'm understanding that your concern is to avoid using InstallRequirement in more places -- that makes sense and I don't want to either. I'll address that pretty soon in follow up PRs. |
I'm merging this since I don't think you're opposed to the broader changes this is a part of. |
I'll start moving all the code into this module in follow up PRs.