Skip to content
This repository was archived by the owner on Jan 4, 2025. It is now read-only.

add all current marketplaces and alphabetize by country code#155

Merged
GriceTurrble merged 5 commits intopython-amazon-mws:developfrom
agritheory:develop
Mar 1, 2020
Merged

add all current marketplaces and alphabetize by country code#155
GriceTurrble merged 5 commits intopython-amazon-mws:developfrom
agritheory:develop

Conversation

@agritheory
Copy link
Copy Markdown
Contributor

Several more marketplaces have been added since I looked at this last:
https://docs.developer.amazonservices.com/en_US/dev_guide/DG_Endpoints.html

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 27, 2020

Codecov Report

Merging #155 into develop will increase coverage by 0.11%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #155      +/-   ##
===========================================
+ Coverage    77.39%   77.51%   +0.11%     
===========================================
  Files           18       18              
  Lines          960      965       +5     
  Branches        92       92              
===========================================
+ Hits           743      748       +5     
  Misses         212      212              
  Partials         5        5
Impacted Files Coverage Δ
mws/mws.py 69.71% <100%> (+0.89%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2988fc9...fbfd922. Read the comment docs.

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 27, 2020

Codecov Report

Merging #155 into develop will decrease coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #155      +/-   ##
===========================================
- Coverage    77.39%   77.37%   -0.03%     
===========================================
  Files           18       18              
  Lines          960      959       -1     
  Branches        92       92              
===========================================
- Hits           743      742       -1     
  Misses         212      212              
  Partials         5        5              
Impacted Files Coverage Δ
mws/mws.py 68.82% <0.00%> (ø) ⬆️
mws/decorators.py 100.00% <0.00%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2988fc9...19275bf. Read the comment docs.

Copy link
Copy Markdown
Member

@GriceTurrble GriceTurrble left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar comment as on #154 , but it seems this is also missing the AE region. Can you double check, please?

@agritheory
Copy link
Copy Markdown
Contributor Author

Similar comment as on #154 , but it seems this is also missing the AE region. Can you double check, please?

Yes, copy paste mistake with the AE marketplace, good catch.

@agritheory
Copy link
Copy Markdown
Contributor Author

@GriceTurrble Is there a test for this and if not, what would be a reasonable thing to add?

GriceTurrble
GriceTurrble previously approved these changes Feb 27, 2020
@GriceTurrble
Copy link
Copy Markdown
Member

@GriceTurrble Is there a test for this and if not, what would be a reasonable thing to add?

There is a small test case in test_mws.py that asserts the CA region:

def test_regionparameter():
api = MWS(region='CA', *mwscred)
assert api.domain == 'https://mws.amazonservices.ca'
def test_marketplaces_enum():
"""
The way to access the values.
"""
assert Marketplaces.CA.endpoint == 'https://mws.amazonservices.ca'
assert Marketplaces.CA.marketplace_id == 'A2EUQ1WTGCTBG2'

The latter of these two tests is a bit trivial (testing that a hard-coded value remains hard-coded correctly), but the former makes sense: ensuring that the domain is returned correctly for a chosen marketplace, which dictates how the request URI is built.

If you want to do a bit of busywork to extend that and cover all the domains, that would be appreciated. Otherwise I'll just accept this as-is later today. :)

@agritheory
Copy link
Copy Markdown
Contributor Author

If you want to do a bit of busywork to extend that and cover all the domains, that would be appreciated.

I think it makes sense to explicitly assert that UK and GB are the same and agree that the rest is busywork. I would prefer to add the tests before you merge and keep the fire lit!

@agritheory
Copy link
Copy Markdown
Contributor Author

@GriceTurrble Galen, please review the tests I added when you get a chance.

@GriceTurrble GriceTurrble merged commit 949538e into python-amazon-mws:develop Mar 1, 2020
Lacrymology added a commit to Shiphero/python-amazon-mws that referenced this pull request Jul 10, 2020
* upstream/develop:
  Add Feeds utility to convert dict FeedOptions to string (python-amazon-mws#181)
  Ensure correct decoding of bytes (python-amazon-mws#168)
  Compatibility fix (python-amazon-mws#124)
  Implement a couple of function for the OutboundShipments API. (python-amazon-mws#96)
  Added OutboundShipments.create_fulfillment_order (python-amazon-mws#95)
  added UpdateReportAcknowledgements (python-amazon-mws#101)
  Update feeds.py (python-amazon-mws#166)
  added easyship api support for indian marketplace (python-amazon-mws#169)
  Moving Slack link up, removing gitter chat link
  add all current marketplaces and alphabetize by country code (python-amazon-mws#155)
  Updated slack invite link
  Slack invite link (python-amazon-mws#152)
  Slack invite link
  fix clean_params (python-amazon-mws#106)
  add in NL marketplace information
  Fix flake8 warnings
  Update develop branch CI + package metadata
  include mws.apis in setup.py
  Fix bug: Remove trailing comma
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants