Skip to content

Commit 64eb79f

Browse files
Merge pull request #2 from optimizely/add_contributing_instructions
Adding contributing instructions.
2 parents d5e0bb3 + 7c27046 commit 64eb79f

File tree

3 files changed

+73
-23
lines changed

3 files changed

+73
-23
lines changed

CONTRIBUTING.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#Contributing to the Optimizely Python SDK
2+
We welcome contributions and feedback! Please read the [README](README.md) to set up your development environment, then read the guidelines below for information on submitting your code.
3+
4+
##Development process
5+
6+
1. Create a branch off of `master`: `git checkout -b YOUR_NAME/branch_name`.
7+
2. Commit your changes. Make sure to add tests!
8+
3. Lint your changes before submitting with `pep8 YOUR_CHANGED_FILES.py`.
9+
4. `git push` your changes to GitHub.
10+
5. Make sure that all unit tests are passing and that there are no merge conflicts between your branch and `master`.
11+
6. Open a pull request from `YOUR_NAME/branch_name` to `master`.
12+
7. A repository maintainer will review your pull request and, if all goes well, merge it!
13+
14+
##Pull request acceptance criteria
15+
16+
* **All code must have test coverage.** We use unittest. Changes in functionality should have accompanying unit tests. Bug fixes should have accompanying regression tests.
17+
* Tests are located in `/tests` with one file per class.
18+
* Please don't change the `__version__`. We'll take care of bumping the version when we next release.
19+
* Lint your code with PEP-8 before submitting.
20+
21+
##Style
22+
We enforce PEP-8 rules with a few minor deviations.
23+
24+
##License
25+
26+
By contributing your code, you agree to license your contribution under the terms of the [Apache License v2.0](http://www.apache.org/licenses/LICENSE-2.0).
27+
28+
##Contact
29+
If you have questions, please contact [email protected].

README.md

Lines changed: 43 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,86 @@
1-
#Optimizely Python SDK
2-
[![Apache 2.0](https://img.shields.io/github/license/nebula-plugins/gradle-extra-configurations-plugin.svg)](http://www.apache.org/licenses/LICENSE-2.0)
1+
#Optimizely Python SDK
2+
[![Apache 2.0](https://img.shields.io/github/license/nebula-plugins/gradle-extra-configurations-plugin.svg)](http://www.apache.org/licenses/LICENSE-2.0)
33

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
57

68
###Installing the SDK
79

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+
912
```
10-
python setup.py sdist
13+
pip install optimizely-sdk
1114
```
1215

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:
1424

15-
Install the SDK by typing the following command:
1625
```
17-
pip install optimizely-testing-sdk-python-{VERSION}.tar.gz
26+
python setup.py sdist
1827
```
1928

20-
The install command will set up all requisite packages.
29+
This will create a tarball under `dist/`
2130

22-
###Using the SDK
31+
You can then install the SDK and its dependencies with:
2332

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+
```
2536

2637
###Unit tests
2738

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+
3042
```
3143
nosetests
3244
```
3345

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+
3649
```
3750
nosetests tests.<file_name_without_extension>
3851
```
3952

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+
4155
```
4256
nosetests tests.test_event
4357
```
4458

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+
4762
```
4863
nosetests tests.<file_name_without_extension>:ClassName
4964
```
5065

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:
5267
```
5368
nosetests tests.test_event:EventTest
5469
```
5570

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+
5874
```
5975
nosetests tests.<file_name_without_extension>:ClassName:test_name
6076
```
6177

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+
6380
```
6481
nosetests tests.test_event:EventTest.test_dispatch
6582
```
83+
84+
###Contributing
85+
86+
Please see [CONTRIBUTING](CONTRIBUTING.md).

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
description="A Python SDK for Optimizely's server-side testing product, which is currently in private beta.",
2424
author='Optimizely',
2525
author_email='[email protected]',
26-
url='https://github.com/optimizely/optimizely-testing-sdk-python',
26+
url='https://github.com/optimizely/python-sdk',
2727
license=open('LICENSE').read(),
2828
classifiers=[
2929
'Development Status :: 3 - Alpha',

0 commit comments

Comments
 (0)