|
1 |
| -#Optimizely Python SDK |
2 |
| -[](http://www.apache.org/licenses/LICENSE-2.0) |
| 1 | +#Optimizely Python SDK |
| 2 | +[](http://www.apache.org/licenses/LICENSE-2.0) |
3 | 3 |
|
4 |
| -This Python SDK is an interface to the Optimizely testing framework allowing you to setup and manage your Custom experiments. |
| 4 | +This repository houses the Python SDK for Optimizely's server-side testing product, which is currently in private beta. |
| 5 | + |
| 6 | +##Getting Started |
5 | 7 |
|
6 | 8 | ###Installing the SDK
|
7 | 9 |
|
8 |
| -Build the SDK using the following command: |
| 10 | +The SDK is available through [PyPi](https://pypi.python.org/pypi?name=optimizely-sdk&:action=display). To install: |
| 11 | + |
9 | 12 | ```
|
10 |
| -python setup.py sdist |
| 13 | +pip install optimizely-sdk |
11 | 14 | ```
|
12 | 15 |
|
13 |
| -This will create a tarball under `dist/` |
| 16 | +###Using the SDK |
| 17 | +See the Optimizely server-side testing [developer documentation](http://developers.optimizely.com/server/reference/index) to learn how to set up your first custom project and use the SDK. **Please note that you must be a member of the private server-side testing beta to create custom projects and use this SDK.** |
| 18 | + |
| 19 | +##Development |
| 20 | + |
| 21 | +###Building the SDK |
| 22 | + |
| 23 | +Build the SDK using the following command: |
14 | 24 |
|
15 |
| -Install the SDK by typing the following command: |
16 | 25 | ```
|
17 |
| -pip install optimizely-testing-sdk-python-{VERSION}.tar.gz |
| 26 | +python setup.py sdist |
18 | 27 | ```
|
19 | 28 |
|
20 |
| -The install command will set up all requisite packages. |
| 29 | +This will create a tarball under `dist/` |
21 | 30 |
|
22 |
| -###Using the SDK |
| 31 | +You can then install the SDK and its dependencies with: |
23 | 32 |
|
24 |
| -Instructions on using the SDK can be found [here](http://developers.optimizely.com/server/reference/index). |
| 33 | +``` |
| 34 | +pip install dist/optimizely-sdk-{VERSION}.tar.gz |
| 35 | +``` |
25 | 36 |
|
26 | 37 | ###Unit tests
|
27 | 38 |
|
28 |
| -#####Run all tests |
29 |
| -You can trigger all unit tests by typing the following command: |
| 39 | +#####Running all tests |
| 40 | +You can run all unit tests with: |
| 41 | + |
30 | 42 | ```
|
31 | 43 | nosetests
|
32 | 44 | ```
|
33 | 45 |
|
34 |
| -#####Run all tests in file |
35 |
| -In order to run all tests under a particular test file you can run the following command: |
| 46 | +#####Running all tests in a file |
| 47 | +To run all tests under a particular test file you can use the following command: |
| 48 | + |
36 | 49 | ```
|
37 | 50 | nosetests tests.<file_name_without_extension>
|
38 | 51 | ```
|
39 | 52 |
|
40 |
| -For example to run all tests under `test_event`, the command would be: |
| 53 | +For example, to run all tests under `test_event`, the command would be: |
| 54 | + |
41 | 55 | ```
|
42 | 56 | nosetests tests.test_event
|
43 | 57 | ```
|
44 | 58 |
|
45 |
| -#####Run all tests under class |
46 |
| -In order to run all tests under a particular class of tests you can run the following command: |
| 59 | +#####Running all tests under a class |
| 60 | +To run all tests under a particular class of tests you can use the following command: |
| 61 | + |
47 | 62 | ```
|
48 | 63 | nosetests tests.<file_name_without_extension>:ClassName
|
49 | 64 | ```
|
50 | 65 |
|
51 |
| -For example to run all tests under `test_event.EventTest`, the command would be: |
| 66 | +For example, to run all tests under `test_event.EventTest`, the command would be: |
52 | 67 | ```
|
53 | 68 | nosetests tests.test_event:EventTest
|
54 | 69 | ```
|
55 | 70 |
|
56 |
| -#####Run single test |
57 |
| -In order to run one single test the command would be: |
| 71 | +#####Running a single test |
| 72 | +To run a single test you can use the following command: |
| 73 | + |
58 | 74 | ```
|
59 | 75 | nosetests tests.<file_name_without_extension>:ClassName:test_name
|
60 | 76 | ```
|
61 | 77 |
|
62 |
| -For example in order to run `test_event.EventTest.test_dispatch`, the command would be: |
| 78 | +For example, to run `test_event.EventTest.test_dispatch`, the command would be: |
| 79 | + |
63 | 80 | ```
|
64 | 81 | nosetests tests.test_event:EventTest.test_dispatch
|
65 | 82 | ```
|
| 83 | + |
| 84 | +###Contributing |
| 85 | + |
| 86 | +Please see [CONTRIBUTING](CONTRIBUTING.md). |
0 commit comments