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

TDL-23255 Upgrade Shopify API to 2023_04 #178

Merged
merged 23 commits into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
b63d570
upgrade shopify api to 23-04
leslievandemark Sep 20, 2023
0670e96
try parallel circle tests
leslievandemark Sep 20, 2023
364273d
Remove fulfillment_service from line_item resource for 2022_10
leslievandemark Sep 20, 2023
d0fc07e
Updated config.yml
leslievandemark Sep 20, 2023
980e061
Updated config.yml
leslievandemark Sep 20, 2023
f42d7b9
Updated config.yml
leslievandemark Sep 20, 2023
0082877
Updated config.yml
leslievandemark Sep 20, 2023
048d2f7
update schema name to avoid test collisions
leslievandemark Sep 20, 2023
cb489a3
Merge branch 'upgrade-shopify-api-2304' of github.com:singer-io/tap-s…
leslievandemark Sep 20, 2023
58ca778
decrease parallelism for rate limiting errors
leslievandemark Sep 20, 2023
a3ad7a9
add fulfillment_service back in since it's nested
leslievandemark Sep 20, 2023
7d98229
Remove deprecated orders.total_price_usd field for 2022_10
leslievandemark Sep 20, 2023
9d14f6e
Add new orders.merchant_of_record_app_id field
leslievandemark Sep 20, 2023
b913845
add new transactions.payment_details fields 2023_01
leslievandemark Sep 20, 2023
d14242c
Add new transactions.payment_id field for 2023_01
leslievandemark Sep 20, 2023
a41fe1f
make jsonvalidator happy
leslievandemark Sep 20, 2023
bf87a42
Remove processing_method, payment_details, gateway for 2023_04
leslievandemark Sep 21, 2023
e0c3050
Add total_unsettled_set object for 2023_04
leslievandemark Sep 21, 2023
509a9a3
Add current / original fees sets objects for 2023_04
leslievandemark Sep 21, 2023
784e588
Fix json and collapse newly added objects for readability
leslievandemark Sep 21, 2023
7267728
version_bump and changelog
leslievandemark Sep 21, 2023
8a514ed
adjust parallelism to 2 so that we don't api calls per second limit
leslievandemark Sep 22, 2023
c11642a
Fix whitespace
Sep 28, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 81 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,19 @@ version: 2.1
orbs:
slack: circleci/slack@3.4.2

jobs:
build:
executors:
docker-executor:
docker:
- image: 218546966473.dkr.ecr.us-east-1.amazonaws.com/circle-ci:stitch-tap-tester

jobs:
build:
executor: docker-executor
steps:
- run: echo "CI Done"

ensure_env:
executor: docker-executor
steps:
- checkout
- run:
Expand All @@ -15,16 +24,39 @@ jobs:
source /usr/local/share/virtualenvs/tap-shopify/bin/activate
pip install -U 'pip<19.2' 'setuptools<51.0.0'
pip install .[dev]
- persist_to_workspace:
root: /usr/local/share/virtualenvs
paths:
- tap-shopify
- dev_env.sh
run_pylint:
executor: docker-executor
steps:
- checkout
- attach_workspace:
at: /usr/local/share/virtualenvs
- run:
name: 'pylint'
command: |
source /usr/local/share/virtualenvs/tap-shopify/bin/activate
pylint tap_shopify -d missing-docstring,too-many-branches
json_validator:
executor: docker-executor
steps:
- checkout
- attach_workspace:
at: /usr/local/share/virtualenvs
- run:
name: 'JSON Validator'
command: |
source /usr/local/share/virtualenvs/tap-tester/bin/activate
stitch-validate-json tap_shopify/schemas/*.json
run_unit_tests:
executor: docker-executor
steps:
- checkout
- attach_workspace:
at: /usr/local/share/virtualenvs
- run:
name: 'Unit Tests'
command: |
Expand All @@ -36,6 +68,13 @@ jobs:
path: test_output/report.xml
- store_artifacts:
path: htmlcov
run_integration_tests:
executor: docker-executor
parallelism: 2
steps:
- checkout
- attach_workspace:
at: /usr/local/share/virtualenvs
- run:
name: 'Integration Tests'
command: |
Expand All @@ -44,7 +83,14 @@ jobs:
mkdir /tmp/${CIRCLE_PROJECT_REPONAME}
export STITCH_CONFIG_DIR=/tmp/${CIRCLE_PROJECT_REPONAME}
source /usr/local/share/virtualenvs/tap-tester/bin/activate
run-test --tap=tap-shopify tests
circleci tests glob "tests/test_*.py" | circleci tests split > ./tests-to-run
if [ -s ./tests-to-run ]; then
for test_file in $(cat ./tests-to-run)
do
echo $test_file > $STITCH_CONFIG_DIR/tap_test.txt
run-test --tap=${CIRCLE_PROJECT_REPONAME} $test_file
done
fi
- slack/notify-on-failure:
only_for_branches: master
- store_artifacts:
Expand All @@ -54,10 +100,42 @@ workflows:
version: 2
commit: &commit_jobs
jobs:
- ensure_env:
context:
- circleci-user
- tier-1-tap-user
- run_pylint:
context:
- circleci-user
- tier-1-tap-user
requires:
- ensure_env
- json_validator:
context:
- circleci-user
- tier-1-tap-user
requires:
- ensure_env
- run_unit_tests:
context:
- circleci-user
- tier-1-tap-user
requires:
- ensure_env
- run_integration_tests:
context:
- circleci-user
- tier-1-tap-user
requires:
- ensure_env
- build:
context:
- circleci-user
- tier-1-tap-user
requires:
- run_pylint
- run_unit_tests
- run_integration_tests
build_daily:
<<: *commit_jobs
triggers:
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 1.8.0
* Updates the Shopify SDK to 12.3.0
* Updates API version used to 2023_04
* Adds and removes fields per Shopify API changelog for versions 2022_10, 2023_01, 2023_04 [#178](https://github.com/singer-io/tap-shopify/pull/178)

## 1.7.6
* Add backoff for 404 error code [#159](https://github.com/singer-io/tap-shopify/pull/159)

Expand Down
2 changes: 0 additions & 2 deletions setup.cfg

This file was deleted.

4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@

setup(
name="tap-shopify",
version="1.7.6",
version="1.8.0",
description="Singer.io tap for extracting Shopify data",
author="Stitch",
url="http://github.com/singer-io/tap-shopify",
classifiers=["Programming Language :: Python :: 3 :: Only"],
python_requires='>=3.5.2',
py_modules=["tap_shopify"],
install_requires=[
"ShopifyAPI==12.0.1",
"ShopifyAPI==12.3.0",
"singer-python==5.12.1",
],
extras_require={
Expand Down
2 changes: 1 addition & 1 deletion tap_shopify/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
def initialize_shopify_client():
api_key = Context.config['api_key']
shop = Context.config['shop']
version = '2022-07'
version = '2023-04'
session = shopify.Session(shop, version, api_key)
shopify.ShopifyResource.activate_session(session)

Expand Down
2 changes: 1 addition & 1 deletion tap_shopify/schemas/definitions.json
Original file line number Diff line number Diff line change
Expand Up @@ -1481,4 +1481,4 @@
"array"
]
}
}
}
113 changes: 55 additions & 58 deletions tap_shopify/schemas/orders.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,6 @@
"line_items": {
"$ref": "definitions.json#/line_items"
},
"processing_method": {
"type": [
"null",
"string"
]
},
"order_number": {
"type": [
"null",
Expand Down Expand Up @@ -414,44 +408,6 @@
],
"format": "singer.decimal"
},
"payment_details": {
"properties": {
"avs_result_code": {
"type": [
"null",
"string"
]
},
"credit_card_company": {
"type": [
"null",
"string"
]
},
"cvv_result_code": {
"type": [
"null",
"string"
]
},
"credit_card_bin": {
"type": [
"null",
"string"
]
},
"credit_card_number": {
"type": [
"null",
"string"
]
}
},
"type": [
"null",
"object"
]
},
"number": {
"type": [
"null",
Expand Down Expand Up @@ -574,13 +530,6 @@
"object"
]
},
"total_price_usd": {
"type": [
"null",
"string"
],
"format": "singer.decimal"
},
"closed_at": {
"type": [
"null",
Expand Down Expand Up @@ -987,12 +936,6 @@
"integer"
]
},
"gateway": {
"type": [
"null",
"string"
]
},
"cart_token": {
"type": [
"null",
Expand Down Expand Up @@ -1278,7 +1221,61 @@
"null",
"boolean"
]
},
"merchant_of_record_app_id": {
"type": ["null", "integer"]
},
"current_total_additional_fees_set": {
"type": ["null", "object"],
"properties": {
"presentment_money": {
"type": ["null", "object"],
"properties": {
"amount": {
"type": ["null", "string"],
"format": "singer.decimal"},
"currency": {
"type": ["null", "string"]}
}
},
"shop_money": {
"type": ["null", "object"],
"properties": {
"amount": {
"type": ["null", "string"],
"format": "singer.decimal"},
"currency": {
"type": ["null", "string"]}
}
}
}
},
"original_total_additional_fees_set": {
"type": ["null", "object"],
"properties": {
"presentment_money": {
"type": ["null", "object"],
"properties": {
"amount": {
"type": ["null", "string"],
"format": "singer.decimal"},
"currency": {
"type": ["null", "string"]
}
}
},
"shop_money": {
"type": ["null", "object"],
"properties": {
"amount": {
"type": ["null", "string"],
"format": "singer.decimal"},
"currency": {
"type": ["null", "string"]}
}
}
}
}
},
"type": "object"
}
}
Loading