Skip to content

Commit 5cae747

Browse files
Merge pull request #50 from lightstep/sarah/LS-5226
LS-5226: Updated README and Tox with functional developer setup
2 parents dff35fe + c097934 commit 5cae747

File tree

5 files changed

+31
-9
lines changed

5 files changed

+31
-9
lines changed

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- checkout
1313
- run: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS
1414
- run: sudo pip install tox
15-
- run: make test
15+
- run: make test27
1616
- store_test_results:
1717
path: /tmp/circleci-test-results
1818
- store_artifacts:
@@ -32,7 +32,7 @@ jobs:
3232
- checkout
3333
- run: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS
3434
- run: sudo pip install tox
35-
- run: make test
35+
- run: make test34
3636
- store_test_results:
3737
path: /tmp/circleci-test-results
3838
- store_artifacts:

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@ dist/*
1010
.DS_Store
1111
**/.DS_Store
1212
.idea
13+
.pytest_cache/
14+
.python-version

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@ publish: dist
4949
example: build
5050
python examples/trivial/main.py
5151

52+
test27: build
53+
tox -e py27
54+
55+
test34: build
56+
tox -e py34
57+
5258
test: build
5359
tox
5460

README.md

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,35 @@ apt-get install python-dev
1111
pip install lightstep
1212
```
1313

14-
## Getting started
14+
## Developer Setup
1515

16-
Please see the [example programs](examples/) for examples of how to use this library. In particular:
16+
### Prerequisites
17+
* [PyEnv](https://github.com/pyenv/pyenv)
1718

18-
* [Trivial Example](examples/trivial/main.py) shows how to use the library on a single host.
19-
* [Context in Headers](examples/http/context_in_headers.py) shows how to pass a `TraceContext` through `HTTP` headers.
19+
```python
20+
pyenv install 2.7.15
21+
pyenv install 3.4.9
22+
pyenv local 2.7.15 3.4.9
23+
```
2024

21-
You can run the examples by doing:
25+
* [Tox](https://pypi.org/project/tox/)
2226
```python
2327
tox
28+
```
29+
30+
* Run the examples:
31+
```python
2432
source .tox/py27/bin/activate
2533
python examples/nontrivial/main.py
2634
```
2735

36+
## Getting Started with Tracing
37+
38+
Please see the [example programs](examples/) for examples of how to use this library. In particular:
39+
40+
* [Trivial Example](examples/trivial/main.py) shows how to use the library on a single host.
41+
* [Context in Headers](examples/http/context_in_headers.py) shows how to pass a `TraceContext` through `HTTP` headers.
42+
2843
Or if your python code is already instrumented for OpenTracing, you can simply switch to LightStep's implementation with:
2944

3045
```python
@@ -43,4 +58,3 @@ if __name__ == "__main__":
4358
```
4459

4560
This library is the LightStep binding for [OpenTracing](http://opentracing.io/). See the [OpenTracing Python API](https://github.com/opentracing/opentracing-python) for additional detail.
46-

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
; envlist = py26, py27, py34
2+
envlist = py27, py34
33

44
[testenv]
55
deps =

0 commit comments

Comments
 (0)