-
Notifications
You must be signed in to change notification settings - Fork 8
Improve style and tests #3
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
Open
nickdavidhaynes
wants to merge
22
commits into
master
Choose a base branch
from
improve-style-and-tests
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jongaegler
reviewed
May 30, 2017
| :param base_url: (optional) String representing the base URL for the Wordsmith API per documentation at http://wordsmith.readme.io/v1/docs | ||
| :param user_agent: (optional) String representing the user agent that should be sent with each API request | ||
| DEFAULT_VERSION = '1' | ||
| DEFAULT_URL = 'https://api.automatedinsights.com/v' + DEFAULT_VERSION |
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.
I don't think users should be allowed to change the default url; just the version. We don't really want people using this on incompatible sites and I don't think we want to support this for staging/qa/locally either.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background context for this PR
This SDK is need of a bit of love - a few API features have been released recently that haven't been added in, and it was due for a refactor anyway. The refactor will focus on copying the Ruby SDK functionality and design (with changes to maintain pythonic-ness where necessary), plus adding new API functionality like testing outputs and spell checking.
This PR brings the repo into PEP8 compliance and refactors the tests to match more closely to the Ruby SDK.
Quick note: the # of lines changed looks higher than it really is - the previous version used 2 spaces as indent, this version uses 4 in accordance with PEP8
What does this PR do?
Impacted areas in application
wordsmith/tests/How should PR reviewers test this?
pip install pytestand the linter withpip install flake8pip install pip install -r requirements.txtpython -m pytestflake8 .