-
Notifications
You must be signed in to change notification settings - Fork 27
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
Add mapping integrations for taxonomy shopify/2024-07 #372
Add mapping integrations for taxonomy shopify/2024-07 #372
Conversation
chesterbot01
commented
Oct 4, 2024
•
edited
Loading
edited
- pull shopify/2024-07 from https://github.com/Shopify/product-taxonomy/releases/tag/v2024-07
- Add the new mapping folders to the data directory for shopify/2024-07
- Generate a full_names.yml for the shopify/2024-07 version
ba85a31
to
c5a1abc
Compare
5cf1907
to
8b5549e
Compare
… ; generate a full_names.yml for the shopify/2024-07 version
8b5549e
to
fbcf91e
Compare
app/commands/seed_local_command.rb
Outdated
@@ -139,6 +139,8 @@ def mapping_rules_from(data) | |||
next if integration_id.nil? | |||
|
|||
raw_mappings = sys.parse_yaml(file) | |||
next if raw_mappings["rules"].nil? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit Would prefer if rules was always an array and we didn't have to do a nil check here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed.
--- | ||
input_taxonomy: shopify/2024-07 | ||
output_taxonomy: shopify/2024-10-unstable | ||
rules: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest empty list here so that we don't have to modify the system to allow nil
rules: | |
rules: [] |
next if !taxonomy_version.include?("shopify") || taxonomy_version.include?("shopify/2022-02") || | ||
taxonomy_version.include?("shopify/2024-07") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's get a better test here
This will allow shopify/2024-07
to be used as the input/output version of any mapping, which is not what we want. For e.g. in the google/2021-09-21
mapping (from shopify) shopify/2024-07
is not a valid version.
Ok to do this in a follow up PR so we can unblock #356 and #229
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call, I've revised the test to consider taxonomy versions in mapping files as valid if:
- The source taxonomy version matches the latest Shopify taxonomy version, OR
- The source taxonomy version is included in the allowlist of Shopify legacy source taxonomies: ["shopify/2022-02", "shopify/2024-07"], AND the destination taxonomy version matches the latest Shopify taxonomy version.
0cf07f6
to
dcd3f1e
Compare
dcd3f1e
to
eede049
Compare