You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/dev/index.rst
+16-5Lines changed: 16 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,22 +20,33 @@ Code Organization
20
20
21
21
Setting Up A Dev Environment
22
22
----------------------------
23
-
Before installing/downloading anything I highly recommend learning how to use Python's `virtualenv <https://pypi.python.org/pypi/virtualenv>`_. Virtualenv allows you to have isolated python environments, which is extremely useful for development. After you have a virtualenv, download the SoftLayer API Python Bindings source code. That's explained here: :ref:`install`. After you have the source, change into the base directory and run the following to install the pre-requisites for testing the project. Make sure you've activated your virtualenv before you do this.
23
+
Before working with the SoftLayer Python API client source, we strongly recommend that you know how to use Python's virtualization environment, `virtualenv <https://pypi.python.org/pypi/virtualenv>`_. Virtualenv allows you to create Python setups that are individually tailored to particular develpment efforts. Each environment can have its own set of libraries, and even its own Python interpreter; each is isolated from the other environments so the possibilities difficulties arising from library conflicts is reduced.
24
+
25
+
After you have virtualenv, you should set up a virtual environment and activate it whenever you are working on softlayer-python. The commands needed to setup an environment and activate it might look something like this:
24
26
25
27
::
26
28
27
-
pip install -r requirements
29
+
virtualenv --no-site-packages softlayer_env
30
+
31
+
source softlayer_env/bin/activate
32
+
33
+
Please refer to the virtualenv documentation for more information about creating, and working with virtual environments.
34
+
35
+
Once you have an appropriate environment, you will then download the SoftLayer API Python Bindings source code by following the :ref:`installation instructions <install_from_source>`. Change into softlayer-python source directory and run the following to install the pre-requisites needed to run the development tests:
36
+
37
+
::
38
+
39
+
pip install -r tools/test-requirements.txt
28
40
29
41
30
42
Testing
31
43
-------
32
-
The project have a mix of functional and unit tests. All the tests run using `nose <https://nose.readthedocs.org>`_. To run the test suite, change into the base directory and run:
44
+
The project have a mix of functional and unit tests. All the tests run using `nose <https://nose.readthedocs.org>`_. Some of the tests make use of the `mock <http://www.voidspace.org.uk/python/mock/>`_ package. To run the test suite, change into the base directory and run:
33
45
34
46
::
35
47
36
48
python setup.py nosetests
37
49
38
-
39
50
To test with all supported versions of Python, this project utilizes `tox <https://pypi.python.org/pypi/tox>`_.
40
51
41
52
To avoid having to install those versions of Python locally, you can also set up `Travis <https://travis-ci.org>`_ on your fork. This can run all the required tests on every code push to github. This is highly recommended.
@@ -61,7 +72,7 @@ The primary docs are built at `Read the Docs <https://readthedocs.org/projects/s
61
72
62
73
Style
63
74
-----
64
-
This project follows :pep:`8` and most of the style suggestions that pyflakes recommends. `Flake8 <https://pypi.python.org/pypi/flake8/2.0>`_ should be ran regularly.
75
+
This project follows :pep:`8` and most of the style suggestions that pyflakes recommends. Run `Flake8 <https://pypi.python.org/pypi/flake8/2.0>`_ regularly.
The most up to date version of this library can be found on the SoftLayer GitHub public repositories: https://github.com/softlayer. Please post to the SoftLayer forums https://forums.softlayer.com/ or open a support ticket in the SoftLayer customer portal if you have any questions regarding use of this library.
17
+
The most up to date version of this library can be found on the `SoftLayer GitHub public repositories<https://github.com/softlayer>`_. Please post to the `SoftLayer Forums <https://forums.softlayer.com/>`_ or open a support ticket in the `SoftLayer Customer Portal <https://control.softlayer.com>`_ if you have any questions regarding use of this library.
18
18
19
19
.. _install_from_source:
20
20
21
21
From Source
22
22
-----------
23
23
24
-
The project is developed on GitHub, at `github.com/softlayer/softlayer-api-python-client <https://github.com/softlayer/softlayer-api-python-client>`_.
25
-
24
+
The project is developed on GitHub, at `https://github.com/softlayer/softlayer-python <https://github.com/softlayer/softlayer-python>`_.
0 commit comments