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

Extract the logic that is responsible for aggregating small components #3896

Open
suhaibmujahid opened this issue Dec 6, 2023 · 0 comments
Assignees

Comments

@suhaibmujahid
Copy link
Member

The logic responsible for aggregating small components should live in a separate class for reusability, rather than being part of the component model.

def filter_component(self, product, component):
full_comp = f"{product}::{component}"
if full_comp in self.CONFLATED_COMPONENTS_INVERSE_MAPPING:
return self.CONFLATED_COMPONENTS_INVERSE_MAPPING[full_comp]
if (product, component) in self.meaningful_product_components:
return full_comp
for conflated_component in self.CONFLATED_COMPONENTS:
if full_comp.startswith(conflated_component):
return conflated_component
return None

@suhaibmujahid suhaibmujahid self-assigned this Dec 6, 2023
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

No branches or pull requests

1 participant