Skip to content

Conversation

@bjk7119
Copy link
Contributor

@bjk7119 bjk7119 commented Jan 10, 2025

Description

Remove duplicate OSS from Binary DB.

  • Duplicate condition: If oss name, oss version, and license are the same.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Documentation update
  • Refactoring, Maintenance
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

@bjk7119 bjk7119 added the chore [PR/Issue] Refactoring, maintenance the code label Jan 10, 2025
@bjk7119 bjk7119 requested a review from soimkim January 10, 2025 05:31
@bjk7119 bjk7119 self-assigned this Jan 10, 2025
@bjk7119 bjk7119 force-pushed the fixduple branch 4 times, most recently from 9e1391c to 1e5f07d Compare January 13, 2025 09:43
@soimkim soimkim changed the title Remove duplicate OSS Remove duplicates from OSS information loaded from Binary DB Jan 14, 2025
Copy link
Contributor

@soimkim soimkim left a comment

Choose a reason for hiding this comment

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

이렇게 포문 돌리면...ossItem 에 있는 OSS 다른 정보 만큼 oss_from_db를 추가해서 오히려 중복이 생깁니다.
all(oss_item.name != oss_from_db.name or oss_item.version != oss_from_db.version or oss_item.license != oss_from_db.license for oss_item in bin_oss_items)를 활용해주십시오.

any가 더 낫겠네요.
any(oss_item.name == oss_from_db.name and oss_item.version == oss_from_db.version and oss_item.license == oss_from_db.license for oss_item in bin_oss_items)

⚠️ camelCase와 snake_case를 혼재하여 사용하지 말아주십시오.
ossItem 대신 oss_item으로 변수 선언해주십시오.

@soimkim soimkim requested a review from dd-jy January 14, 2025 02:38
@bjk7119 bjk7119 merged commit 7cb6d59 into main Jan 15, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore [PR/Issue] Refactoring, maintenance the code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants