Skip to content

Commit 02b0958

Browse files
committed
Tweaks Documentation
* Adds separate page that details the CLI config file format. It wasn't appropriate in-line where it was. * Adds coveralls support * Adds badges for pypi downloads and pypi version * Converts README.md to rst format and renames to README.rst. rst is the main format supported on PyPi. * Consolidate unittest2 import logic
1 parent c2a893c commit 02b0958

26 files changed

+97
-128
lines changed

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,3 @@ install:
1111
- "if [[ $TRAVIS_PYTHON_VERSION = 2.6 ]]; then pip install unittest2 --use-mirrors; fi"
1212
# command to run tests
1313
script: python setup.py nosetests
14-

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
include LICENSE
2-
include README.md
2+
include README.rst

README.md renamed to README.rst

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,34 @@
11
SoftLayer API Python Client
22
===========================
3-
SoftLayer API bindings for Python. For use with
4-
[SoftLayer's API](http://sldn.softlayer.com/reference/softlayerapi).
53

6-
* [Module Documentation](http://softlayer.github.com/softlayer-api-python-client)
7-
* [API Documentation](http://softlayer.github.com/softlayer-api-python-client/client.html)
8-
* [CLI Documentation](http://softlayer.github.com/softlayer-api-python-client/cli.html)
4+
.. image:: https://badge.fury.io/py/SoftLayer.png
5+
:target: http://badge.fury.io/py/SoftLayer
96

10-
This library provides a simple interface to interact with SoftLayer's XML-RPC
11-
API and provides support for many of SoftLayer API's features like
12-
[object masks](http://sldn.softlayer.com/article/Using-Object-Masks-SoftLayerAPI).
13-
It also contains a command-line interface that can be used to access various
14-
SoftLayer services using the API.
7+
.. image:: https://pypip.in/d/SoftLayer/badge.png
8+
:target: https://crate.io/packages/SoftLayer
159

10+
SoftLayer API bindings for Python. For use with `SoftLayer's API <http://sldn.softlayer.com/reference/softlayerapi>`_.
11+
12+
This library provides a simple interface to interact with SoftLayer's XML-RPC API and provides support for many of SoftLayer API's features like `object masks <http://sldn.softlayer.com/article/Using-Object-Masks-SoftLayerAPI>`_ and a command-line interface that can be used to access various SoftLayer services using the API.
13+
14+
Documentation
15+
-------------
16+
Documentation is available at http://softlayer.github.com/softlayer-api-python-client
17+
1618
Installation
1719
------------
1820
Install via pip:
19-
```
20-
pip install softlayer
21-
```
21+
22+
.. code-block:: bash
23+
24+
$ pip install softlayer
25+
2226
2327
Or you can install from source. Download source and run:
2428

25-
```
26-
python setup.py install
27-
```
29+
.. code-block:: bash
30+
31+
$ python setup.py install
2832
2933
3034
The most up to date version of this library can be found on the SoftLayer
@@ -43,5 +47,5 @@ System Requirements
4347

4448
Copyright
4549
---------
46-
This software is Copyright (c) 2013 [SoftLayer Technologies, Inc](http://www.softlayer.com/).
50+
This software is Copyright (c) 2013 SoftLayer Technologies, Inc.
4751
See the bundled LICENSE file for more information.

SoftLayer/CLI/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ def main(args=sys.argv[1:], env=Environment()):
175175
if s:
176176
env.out(s)
177177

178-
except InvalidCommand, e:
178+
except InvalidCommand as e:
179179
env.err(resolver.get_module_help(e.module_name))
180180
if e.command_name:
181181
env.err('')

SoftLayer/tests/CLI/core_tests.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,11 @@
55
:copyright: (c) 2013, SoftLayer Technologies, Inc. All rights reserved.
66
:license: BSD, see LICENSE for more details.
77
"""
8-
try:
9-
import unittest2 as unittest
10-
except ImportError:
11-
import unittest # NOQA
128
from mock import MagicMock, patch
139

1410
import SoftLayer
1511
import SoftLayer.CLI as cli
12+
from SoftLayer.tests import unittest
1613
from SoftLayer.CLI.helpers import CLIAbort
1714
from SoftLayer.CLI.environment import Environment, InvalidModule
1815

SoftLayer/tests/CLI/environment_tests.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,10 @@
77
"""
88
import sys
99
import os
10-
try:
11-
import unittest2 as unittest
12-
except ImportError:
13-
import unittest # NOQA
1410
from mock import patch, MagicMock
1511

1612
from SoftLayer import API_PUBLIC_ENDPOINT
13+
from SoftLayer.tests import unittest
1714
from SoftLayer.CLI.environment import Environment, InvalidCommand
1815

1916
if sys.version_info >= (3,):

SoftLayer/tests/CLI/helper_tests.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,10 @@
88
import sys
99
import os
1010
import json
11-
try:
12-
import unittest2 as unittest
13-
except ImportError:
14-
import unittest # NOQA
1511
from mock import patch
1612

1713
import SoftLayer.CLI as cli
14+
from SoftLayer.tests import unittest
1815

1916
if sys.version_info >= (3,):
2017
raw_input_path = 'builtins.input'

SoftLayer/tests/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
try:
3+
import unittest2 as unittest
4+
except ImportError:
5+
import unittest # NOQA

SoftLayer/tests/api_tests.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,11 @@
55
:copyright: (c) 2013, SoftLayer Technologies, Inc. All rights reserved.
66
:license: BSD, see LICENSE for more details.
77
"""
8-
try:
9-
import unittest2 as unittest
10-
except ImportError:
11-
import unittest # NOQA
12-
138
from mock import patch, call
149

1510
import SoftLayer
1611
import SoftLayer.API
12+
from SoftLayer.tests import unittest
1713
from SoftLayer.consts import USER_AGENT
1814

1915

SoftLayer/tests/auth_tests.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,9 @@
55
:copyright: (c) 2013, SoftLayer Technologies, Inc. All rights reserved.
66
:license: BSD, see LICENSE for more details.
77
"""
8-
try:
9-
import unittest2 as unittest
10-
except ImportError:
11-
import unittest # NOQA
12-
138
from SoftLayer.auth import (
149
AuthenticationBase, BasicAuthentication, TokenAuthentication)
10+
from SoftLayer.tests import unittest
1511

1612

1713
class TestAuthenticationBase(unittest.TestCase):

0 commit comments

Comments
 (0)