Orphan detection for attributes + linking orphans#854
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
0d50a81 to
688442f
Compare
688442f to
2bb44cf
Compare
|
39 orphaned attributes were found and this is the category that I assigned them to
|
e7e7b85 to
00697ea
Compare
|
Tried linking the orphans to correctly but not entirely sure if they all went to the right files. Will need to regenerate the taxonomy.json and categories.json if this looks good |
danielpgross
left a comment
There was a problem hiding this comment.
Code looks good overall 👍 left a few comments
As for fixing the orphans by adding them to categories, this is a content (not code) decision so we'll need approval from @ricardotejedorsanz. Considering that, it might be helpful to break this up into two PRs to keep up momentum: one for attributes and the other for return reasons.
00697ea to
6deba9d
Compare
ea5459a to
473d426
Compare
|
return reasons are moved to this pr |
danielpgross
left a comment
There was a problem hiding this comment.
A few more comments, almost there
ricardotejedorsanz
left a comment
There was a problem hiding this comment.
Thanks for working on this @hadijafar, great suggestions!
A couple of general comments:
- Some attributes were added to parents but won't apply to all children, we tend to avoid this - e.g.
paintball/airsoft_equipment_includedin Airsoft, since this won't apply to categories likeAirsoft Gun Batteries - Some attribute connections create duplication, generally because the attribute we're adding is the extended version of a base attribute or viceversa - e.g.
pole/post_materialvspole_materialinParasols & Rain Umbrellas
Here's the list of changes I recommend SKIPPING/REJECTING:
| Category | Category Type | Attribute | Issue | Comment |
|---|---|---|---|---|
| Airsoft | parent | paintball/airsoft_equipment_included |
Parent category with child-specific attributes | We tend to avoid attributes at the parent that won't apply to the children; this ensures the right granularity applies at the category level |
| Arrows & Bolts | parent | arrow/bolt_material |
Duplicate | Duplicates material |
| Binoculars | leaf | binocular/monocular_design |
Duplicate | Duplicates binocular design (extended attribute) |
| Book Covers | leaf | book/file_cover_material |
Duplicate | Duplicates book / cover material (extended attribute) |
| Chairs | parent | chair/sofa_features |
Duplicate | Duplicates chair features (it is an extended attributes of it) |
| Door Frames | leaf | door/frame_application |
Duplicate | Duplicates door/frame application (extended attribute) |
| Incontinence Aids | parent | diaper_type |
Parent category with child-specific attributes | We tend to avoid attributes at the parent that won't apply to the children; this ensures the right granularity applies at the category level |
| Laundry Appliances | parent | washer/dryer_features |
Parent category with child-specific attributes | We tend to avoid attributes at the parent that won't apply to the children; this ensures the right granularity applies at the category level |
| Monoculars | leaf | binocular/monocular_design |
Duplicate | Duplicates monocular design (extended attribute) |
| Paintball | parent | paintball/airsoft_equipment_included |
Parent category with child-specific attributes | We tend to avoid attributes at the parent that won't apply to the children; this ensures the right granularity applies at the category level |
| Parasols & Rain Umbrellas | parent | pole/post_material |
Duplicate | Duplicates pole material (it is an extended attributes of it) |
| Pet Apparel | parent | pet_apparel/bedding_features |
Duplicate | Duplicates pet/apparel features (it is an extended attributes of it) |
| Pet Beds | parent | pet_apparel/bedding_features |
Duplicate | Duplicates pet/bedding features (it is an extended attributes of it) |
| Rugs | leaf | mat/rug_shape |
Duplicate | Duplicates rug shape (extended attribute) |
| Shipping Containers | leaf | accessory_material |
Duplicate | Duplicates material |
| Shipping Containers | leaf | disposable/reusable_item_material |
Duplicate | Duplicates material |
| Sofas | parent | chair/sofa_features |
Duplicate | Duplicates sofa features (it is an extended attributes of it) |
| Watch Bands | leaf | watch/band_material |
Duplicate | Duplicates band material |
| Watches | leaf | timepiece_features |
Duplicate | Duplicates watch features |
|
Also @hadijafar let me know if you run into any conflicts you don't know how to solve while rebasing, we have merged quite a few changes to main recently 🙏 |
a30dff3 to
43894fb
Compare
43894fb to
56b579a
Compare
56b579a to
0ff1347
Compare
danielpgross
left a comment
There was a problem hiding this comment.
Code changes look good 👍
ricardotejedorsanz
left a comment
There was a problem hiding this comment.
Reviewed the final mappings, everything looks good. Thanks @hadijafar !
|
these 4 were removed in 46ae1d3
Unsure orphansThese appear to be duplicates or near-duplicates of attributes already present on the relevant categories, which matches the same review logic already applied elsewhere in this PR:
|

resolves https://github.com/orgs/shop/projects/165/views/22?sliceBy%5Bvalue%5D=hadijafar&pane=issue&itemId=153383691&issue=shop%7Cissues-taxonomy%7C187
Add integration test for orphan detection in product taxonomy
Added a new integration test file that detects orphaned elements in the product taxonomy system. The test ensures data integrity by verifying that all taxonomy components are properly connected.
The test validates three key relationships:
Each test provides detailed output when orphans are found, making it easier to identify and fix disconnected taxonomy elements.