-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
Category
loading from YAML source with validation (#449)
Similar to #443, but for categories: this PR adds the ability to load `Category` objects from a YAML source with validation. This implementation **fully supports secondary paths** to a given category defined using a `secondary_children` key in the YAML source containing an array. Example: ``` - id: aa name: Apparel & Accessories children: - aa-1 attributes: - color - id: aa-1 name: Clothing children: [] secondary_children: - bi-19-10 - id: bi name: Business & Industrial children: - bi-19 attributes: - color - id: bi-19 name: Medical children: - bi-19-10 attributes: - color - id: bi-19-10 name: Scrubs children: [] attributes: - color ``` The approach to loading categories is also different from the prototype: `load_from_source` takes the parsed YAML objects for _all_ verticals (not just one). This was needed because: - We need to be able to resolve secondary paths, which can run through a different vertical - We need to check uniqueness across all verticals
- Loading branch information
Showing
3 changed files
with
619 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.