Skip to content

Conversation

@JaviCerveraIngram
Copy link
Collaborator

@JaviCerveraIngram JaviCerveraIngram commented Mar 13, 2019

I have simply made the necessary changes to remove warnings when using PyCharm's Inspect Code tool, except those related to README.md and most spelling errors.

First letter in comments has also been capitalized as indicated by PEP-8 standard.

@codecov-io
Copy link

Codecov Report

Merging #20 into master will decrease coverage by 0.32%.
The diff coverage is 59.25%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #20      +/-   ##
==========================================
- Coverage   84.57%   84.25%   -0.33%     
==========================================
  Files          24       24              
  Lines         525      527       +2     
==========================================
  Hits          444      444              
- Misses         81       83       +2
Impacted Files Coverage Δ
connect/models/fulfillment.py 100% <ø> (ø) ⬆️
connect/models/asset.py 100% <ø> (ø) ⬆️
connect/models/exception.py 44.82% <0%> (-3.33%) ⬇️
connect/models/base.py 91.66% <100%> (ø) ⬆️
connect/resource/utils.py 100% <100%> (ø) ⬆️
connect/models/activation_response.py 53.84% <100%> (ø) ⬆️
connect/resource/base.py 81.08% <100%> (ø) ⬆️
connect/resource/fulfillment.py 68.75% <25%> (ø) ⬆️
connect/resource/template.py 56.25% <33.33%> (ø) ⬆️
connect/config.py 92.1% <85.71%> (ø) ⬆️

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 1dd2361...fb6d307. Read the comment docs.

@codecov-io
Copy link

codecov-io commented Mar 13, 2019

Codecov Report

Merging #20 into master will decrease coverage by 0.32%.
The diff coverage is 52.38%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #20      +/-   ##
==========================================
- Coverage   84.57%   84.25%   -0.33%     
==========================================
  Files          24       24              
  Lines         525      527       +2     
==========================================
  Hits          444      444              
- Misses         81       83       +2
Impacted Files Coverage Δ
connect/models/fulfillment.py 100% <ø> (ø) ⬆️
connect/models/asset.py 100% <ø> (ø) ⬆️
connect/models/exception.py 44.82% <0%> (-3.33%) ⬇️
connect/models/base.py 91.66% <100%> (ø) ⬆️
connect/resource/utils.py 100% <100%> (ø) ⬆️
connect/config.py 92.1% <100%> (ø) ⬆️
connect/models/activation_response.py 53.84% <100%> (ø) ⬆️
connect/resource/base.py 81.08% <100%> (ø) ⬆️
connect/resource/fulfillment.py 68.75% <25%> (ø) ⬆️
connect/resource/template.py 56.25% <33.33%> (ø) ⬆️

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 1dd2361...f05134a. Read the comment docs.

Copy link
Contributor

@marcserrat marcserrat left a comment

Choose a reason for hiding this comment

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

Can you please take a look to my few comments?

README.md Outdated
Connect Python SDK allows an easy and fast integration with Connect fulfillment API. Thanks to it you can automate the fulfillment of orders generated by your products.

In order to use this library, please ensure that you have read first the documentation available on Connect knowladge base article located here, this one will provide you a great information on the rest api that this library implements.
In order to use this library, please ensure that you have read first the documentation available on Connect knowledge base article located here, this one will provide you a great information on the rest api that this library implements.
Copy link
Contributor

Choose a reason for hiding this comment

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

please, add proper links for "here"

Copy link
Contributor

Choose a reason for hiding this comment

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

Since I didn't write the original text, I guess that the most appropriate link for that would the public API documentation? https://confluence.int.zone/display/CONNECT/Connect+Public+API

Copy link
Contributor

Choose a reason for hiding this comment

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

Not at all. Please review the original readme of php-sdk, is a copy and paste

README.md Outdated
class ExampleRequestProcessor(FulfillmentAutomation):
def process_request(self, request):

logger.info('Processing request {}'.format(request.id))
Copy link
Contributor

Choose a reason for hiding this comment

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

please also include for product X, Contract ID and marketplace

Copy link
Contributor

@JaviCervera JaviCervera Mar 18, 2019

Choose a reason for hiding this comment

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

Fine, will do tomorrow (and from the correct account, I'm on my personal laptop right now ;)).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done, I have added contract id and product and marketplace names (since I though it is more meaningful like this):

logger.info('Processing request {} for contract {}, product {}, marketplace {}'
            .format(request.id,
                    request.contract.id,
                    request.asset.product.name,
                    request.marketplace.name))

api_key=None,
products=None,
file=None
filename=None
Copy link
Contributor

Choose a reason for hiding this comment

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

why to rename to filename? People will introduce there config.json, why not file? Shall we differenciate also filepath?

Copy link
Contributor

Choose a reason for hiding this comment

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

Because PyCharm's code inspection raises a warning because 'file' is used as a standard type on Python. In this PR, I just made the required changes to the code so it can be inspected by PyCharm without any warnings.

Copy link
Contributor

Choose a reason for hiding this comment

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

can you suggest better name than filename? I don't like it 100% becouse people also will put path

@marcserrat marcserrat merged commit 72b4423 into cloudblue:master Mar 19, 2019
@JaviCerveraIngram JaviCerveraIngram deleted the suppress-warnings branch March 19, 2019 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants