Skip to content

Commit de93b2a

Browse files
dhruv-voraalrex
and
alrex
authored
Update CONTRIBUTING document (#417)
Co-authored-by: alrex <[email protected]>
1 parent 9c81eda commit de93b2a

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Diff for: CONTRIBUTING.md

+15
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,21 @@ rather than conform to specific API names or argument patterns in the spec.
153153

154154
For a deeper discussion, see: https://github.com/open-telemetry/opentelemetry-specification/issues/165
155155

156+
## Running Tests Locally
157+
158+
1. Go to your Contrib repo directory. `git clone [email protected]:open-telemetry/opentelemetry-python-contrib.git && cd opentelemetry-python-contrib`.
159+
2. Clone the [OpenTelemetry Python](https://github.com/open-telemetry/opentelemetry-python) Python Core repo to a folder named `opentelemetry-python-core`. `git clone https://github.com/open-telemetry/opentelemetry-python.git opentelemetry-python-core`.
160+
3. Make sure you have `tox` installed. `pip install tox`.
161+
4. Run `tox` without any arguments to run tests for all the packages. Read more about [tox](https://tox.readthedocs.io/en/latest/).
162+
163+
### Testing against a different Core repo branch/commit
164+
165+
1. Change directory to the repo that was cloned above. `cd opentelemetry-python-core`.
166+
2. Move the head of this repo to the SHA hash you want your tests to use. The current SHA hash can be found in `.github/workflows/test.yml` file under the `opentelemetry-python-contrib` directory. For example, currently it is `1a12fa0d681e37c1fda9cb8d46212ff3bbf6b76a`. So use `git fetch && git checkout <current SHA hash>`.
167+
3. Go back to the root directory. `cd ../`.
168+
4. With `tox` installed, run tests for a package. (e.g. `tox -e test-instrumentation-flask`.)
169+
170+
156171
## Style Guide
157172

158173
* docstrings should adhere to the [Google Python Style

0 commit comments

Comments
 (0)