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

πŸŽ‰ Source Amazon Seller Partner: add FBA storage fees report #14625

Conversation

ganpatagarwal
Copy link
Contributor

@ganpatagarwal ganpatagarwal commented Jul 12, 2022

What

*Adding FBA storage fees report type

Recommended reading order

  1. source.py
  2. streams.py

🚨 User Impact 🚨

No breaking change

Pre-merge Checklist

Expand the relevant checklist and delete the others.

Updating a connector

Community member or Airbyter

  • Grant edit access to maintainers (instructions)
  • Secrets in the connector's spec are annotated with airbyte_secret
  • Unit & integration tests added and passing. Community members, please provide proof of success locally e.g: screenshot or copy-paste unit, integration, and acceptance test output. To run acceptance tests for a Python connector, follow instructions in the README. For java connectors run ./gradlew :airbyte-integrations:connectors:<name>:integrationTest.
  • Code reviews completed
  • Documentation updated
    • Connector's README.md
    • Connector's bootstrap.md. See description and examples
    • [] Changelog updated in docs/integrations/<source or destination>/<name>.md including changelog. See changelog example
  • PR name follows PR naming conventions

Airbyter

If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.

  • Create a non-forked branch based on this PR and test the below items on it
  • Build is successful
  • If new credentials are required for use in CI, add them to GSM. Instructions.
  • /test connector=connectors/<name> command is passing
  • New Connector version released on Dockerhub and connector version bumped by running the /publish command described here

Tests

Unit

Results (0.96s):
      93 passed
Name                                             Stmts   Miss  Cover   Missing
------------------------------------------------------------------------------
source_amazon_seller_partner/__init__.py             2      0   100%
source_amazon_seller_partner/auth.py                61     36    41%   24, 45, 48-99, 102-108
source_amazon_seller_partner/constants.py           37      1    97%   67
source_amazon_seller_partner/source.py              49     10    80%   100-111
source_amazon_seller_partner/spec.py                23      0   100%
source_amazon_seller_partner/streams.py            435    190    56%   64, 67, 70, 79, 84, 89, 94, 99, 104-116, 119-122, 128, 135-138, 186, 190, 193, 196, 199, 219-230, 239-254, 263-272, 275-282, 286-291, 297-302, 305-315, 318, 321, 334-367, 440-443, 450-451, 460-465, 469-498, 538, 547-556, 563-566, 572-594, 644, 658-663, 691, 696-698, 701, 704-708, 730, 735-746, 749, 762, 767, 802-806, 820, 837
unit_tests/test_finance_streams.py                  63      1    98%   157
unit_tests/test_reports_streams_rate_limits.py      33      0   100%
unit_tests/test_source.py                           42      0   100%
unit_tests/test_transform_function.py               23      0   100%
------------------------------------------------------------------------------
TOTAL                                              768    238    69%
Acceptance
python -m pytest integration_tests -p integration_tests.acceptance
Test session starts (platform: darwin, Python 3.9.11, pytest 6.1.2, pytest-sugar 0.9.4)
cachedir: .pytest_cache
rootdir: /Users/ganpatagarwal/stoke/airbyte, configfile: pytest.ini
plugins: sugar-0.9.4, mock-3.7.0, timeout-1.4.2
collecting ...
 airbyte-integrations/bases/source-acceptance-test/source_acceptance_test/tests/test_core.py::TestSpec.test_config_match_spec[inputs0] βœ“                                         6% β–‹
 airbyte-integrations/bases/source-acceptance-test/source_acceptance_test/tests/test_core.py::TestSpec.test_match_expected[inputs0] βœ“                                           12% β–ˆβ–Ž
 airbyte-integrations/bases/source-acceptance-test/source_acceptance_test/tests/test_core.py::TestSpec.test_docker_env[inputs0] βœ“                                               18% β–ˆβ–Š
 airbyte-integrations/bases/source-acceptance-test/source_acceptance_test/tests/test_core.py::TestSpec.test_oneof_usage[inputs0] βœ“                                              24% β–ˆβ–ˆβ–
 airbyte-integrations/bases/source-acceptance-test/source_acceptance_test/tests/test_core.py::TestSpec.test_required[inputs0] βœ“                                                 29% β–ˆβ–ˆβ–‰
 airbyte-integrations/bases/source-acceptance-test/source_acceptance_test/tests/test_core.py::TestSpec.test_optional[inputs0] βœ“                                                 35% β–ˆβ–ˆβ–ˆβ–Œ
 airbyte-integrations/bases/source-acceptance-test/source_acceptance_test/tests/test_core.py::TestSpec.test_has_secret[inputs0] βœ“                                               41% β–ˆβ–ˆβ–ˆβ–ˆβ–Ž
 airbyte-integrations/bases/source-acceptance-test/source_acceptance_test/tests/test_core.py::TestSpec.test_secret_never_in_the_output[inputs0] βœ“                               47% β–ˆβ–ˆβ–ˆβ–ˆβ–Š
 airbyte-integrations/bases/source-acceptance-test/source_acceptance_test/tests/test_core.py::TestSpec.test_defined_refs_exist_in_json_spec_file[inputs0] βœ“                     53% β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–
 airbyte-integrations/bases/source-acceptance-test/source_acceptance_test/tests/test_core.py::TestSpec.test_oauth_flow_parameters[inputs0] βœ“                                    59% β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‰
 airbyte-integrations/bases/source-acceptance-test/source_acceptance_test/tests/test_core.py::TestConnection.test_check[inputs0] βœ“                                              65% β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Œ
 airbyte-integrations/bases/source-acceptance-test/source_acceptance_test/tests/test_core.py::TestDiscovery.test_discover[inputs0] βœ“                                            71% β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–
 airbyte-integrations/bases/source-acceptance-test/source_acceptance_test/tests/test_core.py::TestDiscovery.test_defined_cursors_exist_in_schema[inputs0] βœ“                     76% β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‹
 airbyte-integrations/bases/source-acceptance-test/source_acceptance_test/tests/test_core.py::TestDiscovery.test_defined_refs_exist_in_schema[inputs0] βœ“                        82% β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Ž
 airbyte-integrations/bases/source-acceptance-test/source_acceptance_test/tests/test_core.py::TestDiscovery.test_defined_keyword_exist_in_schema[inputs0-allOf] βœ“               88% β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‰
 airbyte-integrations/bases/source-acceptance-test/source_acceptance_test/tests/test_core.py::TestDiscovery.test_defined_keyword_exist_in_schema[inputs0-not] βœ“                 94% β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Œ
 airbyte-integrations/bases/source-acceptance-test/source_acceptance_test/tests/test_core.py::TestDiscovery.test_primary_keys_exist_in_schema[inputs0] βœ“                       100% β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
{"type": "LOG", "log": {"level": "INFO", "message": "/Users/ganpatagarwal/stoke/airbyte/airbyte-integrations/connectors/source-amazon-seller-partner - SAT run - ae762ff44aaeaa0b3c2ec929ed8fe6131709c0b6 - PASSED"}}

================================================================================== short test summary info ===================================================================================
SKIPPED [1] ../../bases/source-acceptance-test/source_acceptance_test/plugin.py:56: Skipping TestBasicRead.test_read because not found in the config
SKIPPED [1] ../../bases/source-acceptance-test/source_acceptance_test/plugin.py:56: Skipping TestFullRefresh.test_sequential_reads because not found in the config
SKIPPED [1] ../../bases/source-acceptance-test/source_acceptance_test/plugin.py:56: Skipping TestIncremental.test_two_sequential_reads because not found in the config

Results (11.55s):
      17 passed

@harshithmullapudi
Copy link
Contributor

Hey @ganpatagarwal could you resolve the conflicts

…azon-seller-partner-fba-storage-fees-report
@ganpatagarwal
Copy link
Contributor Author

Hey @ganpatagarwal could you resolve the conflicts

Done !!

@harshithmullapudi
Copy link
Contributor

harshithmullapudi commented Jul 15, 2022

/test connector=connectors/source-amazon-seller-partner

πŸ•‘ connectors/source-amazon-seller-partner https://github.com/airbytehq/airbyte/actions/runs/2676839098
βœ… connectors/source-amazon-seller-partner https://github.com/airbytehq/airbyte/actions/runs/2676839098
Python tests coverage:

Name                                                 Stmts   Miss  Cover
------------------------------------------------------------------------
source_acceptance_test/utils/__init__.py                 6      0   100%
source_acceptance_test/tests/__init__.py                 4      0   100%
source_acceptance_test/__init__.py                       2      0   100%
source_acceptance_test/tests/test_full_refresh.py       52      2    96%
source_acceptance_test/utils/asserts.py                 37      2    95%
source_acceptance_test/config.py                        77      6    92%
source_acceptance_test/utils/json_schema_helper.py     105     13    88%
source_acceptance_test/tests/test_incremental.py       121     25    79%
source_acceptance_test/utils/common.py                  80     17    79%
source_acceptance_test/tests/test_core.py              294    106    64%
source_acceptance_test/utils/compare.py                 62     23    63%
source_acceptance_test/base.py                          10      4    60%
source_acceptance_test/utils/connector_runner.py       110     48    56%
------------------------------------------------------------------------
TOTAL                                                  960    246    74%
Name                                        Stmts   Miss  Cover
---------------------------------------------------------------
source_amazon_seller_partner/spec.py           23      0   100%
source_amazon_seller_partner/__init__.py        2      0   100%
source_amazon_seller_partner/constants.py      37      1    97%
source_amazon_seller_partner/source.py         49     10    80%
source_amazon_seller_partner/streams.py       468    215    54%
source_amazon_seller_partner/auth.py           61     36    41%
---------------------------------------------------------------
TOTAL                                         640    262    59%

Build Passed

Test summary info:

=========================== short test summary info ============================
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/source_acceptance_test/plugin.py:56: Skipping TestBasicRead.test_read because not found in the config
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/source_acceptance_test/plugin.py:56: Skipping TestFullRefresh.test_sequential_reads because not found in the config
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/source_acceptance_test/plugin.py:56: Skipping TestIncremental.test_two_sequential_reads because not found in the config
======================== 17 passed, 3 skipped in 5.79s =========================

@harshithmullapudi
Copy link
Contributor

harshithmullapudi commented Jul 15, 2022

/test connector=connectors/source-amazon-seller-partner

πŸ•‘ connectors/source-amazon-seller-partner https://github.com/airbytehq/airbyte/actions/runs/2679066250
βœ… connectors/source-amazon-seller-partner https://github.com/airbytehq/airbyte/actions/runs/2679066250
Python tests coverage:

Name                                                 Stmts   Miss  Cover
------------------------------------------------------------------------
source_acceptance_test/utils/__init__.py                 6      0   100%
source_acceptance_test/tests/__init__.py                 4      0   100%
source_acceptance_test/__init__.py                       2      0   100%
source_acceptance_test/tests/test_full_refresh.py       52      2    96%
source_acceptance_test/utils/asserts.py                 37      2    95%
source_acceptance_test/config.py                        77      6    92%
source_acceptance_test/utils/json_schema_helper.py     105     13    88%
source_acceptance_test/tests/test_incremental.py       121     25    79%
source_acceptance_test/utils/common.py                  80     17    79%
source_acceptance_test/tests/test_core.py              294    106    64%
source_acceptance_test/utils/compare.py                 62     23    63%
source_acceptance_test/base.py                          10      4    60%
source_acceptance_test/utils/connector_runner.py       110     48    56%
------------------------------------------------------------------------
TOTAL                                                  960    246    74%
Name                                        Stmts   Miss  Cover
---------------------------------------------------------------
source_amazon_seller_partner/spec.py           23      0   100%
source_amazon_seller_partner/__init__.py        2      0   100%
source_amazon_seller_partner/constants.py      37      1    97%
source_amazon_seller_partner/source.py         49     10    80%
source_amazon_seller_partner/streams.py       468    215    54%
source_amazon_seller_partner/auth.py           61     36    41%
---------------------------------------------------------------
TOTAL                                         640    262    59%

Build Passed

Test summary info:

=========================== short test summary info ============================
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/source_acceptance_test/plugin.py:56: Skipping TestBasicRead.test_read because not found in the config
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/source_acceptance_test/plugin.py:56: Skipping TestFullRefresh.test_sequential_reads because not found in the config
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/source_acceptance_test/plugin.py:56: Skipping TestIncremental.test_two_sequential_reads because not found in the config
======================== 17 passed, 3 skipped in 5.80s =========================

@harshithmullapudi
Copy link
Contributor

harshithmullapudi commented Jul 17, 2022

/publish connector=connectors/source-amazon-seller-partner

πŸ•‘ Publishing the following connectors:
connectors/source-amazon-seller-partner
https://github.com/airbytehq/airbyte/actions/runs/2685472563


Connector Did it publish? Were definitions generated?
connectors/source-amazon-seller-partner βœ… βœ…

if you have connectors that successfully published but failed definition generation, follow step 4 here ▢️

@harshithmullapudi harshithmullapudi merged commit 638db80 into airbytehq:master Jul 17, 2022
@ganpatagarwal ganpatagarwal deleted the amazon-seller-partner-fba-storage-fees-report branch July 18, 2022 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants