Repository navigation
chechuironman wants to merge 14 commits into
Conversation
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.
You will likely need to use the SoftLayer.utils.lookup helper when accessing that for two reasons:
- Depending on permissions, not everyone will have access to the billing item information. In that case, this would result in a KeyError exception being thrown here.
- To be able to cleanly split this into multiple lines to match the 80-character PEP-8 limitation.
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 tried to change to:
table.add_row(['owner', FormattedItem(
lookup(result, 'billingItem', 'orderItem','order','userRecord','username'),
) or blank()])
But I got this:
NameError: global name 'lookup' is not defined
any idea?
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.
At the top of every python file, there are imports for external modules.
For example, this imports the SoftLayer.utils module:
https://github.com/sudorandom/softlayer-api-python-client/blob/pep8/SoftLayer/CLI/modules/nas.py#L13.
and this uses it:
https://github.com/sudorandom/softlayer-api-python-client/blob/pep8/SoftLayer/CLI/modules/nas.py#L38
sudorandom
commented
Jun 30, 2014
A few of the tests are failing because the fixture and the expected response in those tests should be updated to match. To run these tests, you can use tox. Note that it's okay if it complains about missing python versions. That's why we have this hooked up to Travis-ci.
$ pip install -r test-requirements $ tox
Thanks for the pull request. Let me know if you need any additional help.
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.
Can you add a trailing comma here to avoid having to modify unrelated lines to add new items?
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.
mmm sorry Im new in all of this, and not a real developer :(
I tried to install tox with the commands you mentioned before, but I got this:
Could not open requirements file: [Errno 2] No such file or directory: 'test-requirements'
Storing debug log for failure in /Users/chechu/Library/Logs/pip.log
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.
My fault. tests-requirements.txt is in the tools directory. So it should be pip install -r tools/requirement.txt
chechuironman
commented
Jul 1, 2014
hey Kevin,
I managed to install it...but I can not run tox :(
chechuironman
commented
Jul 7, 2014
Hey Kevin,
Could you check it again...I ́ve already run Tox..not sure if I fixed what you wanted...
underscorephil
commented
Jul 7, 2014
I am working with @chechuironman offline on finding these errors.
chechuironman
commented
Jul 31, 2014
It supposed to be fixed...what should I do to continue with the PR?
Fix for pep8 CI failures
underscorephil
commented
Aug 7, 2014
These changes are included in #372
No description provided.