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: CONTRIBUTING.md
+7-7
Original file line number
Diff line number
Diff line change
@@ -156,16 +156,16 @@ For a deeper discussion, see: https://github.com/open-telemetry/opentelemetry-sp
156
156
## Running Tests Locally
157
157
158
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/).
159
+
2. Make sure you have `tox` installed. `pip install tox`.
160
+
3. Run `tox` without any arguments to run tests for all the packages. Read more about [tox](https://tox.readthedocs.io/en/latest/).
162
161
163
162
### Testing against a different Core repo branch/commit
164
163
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`.)
164
+
Some of the tox targets install packages from the [OpenTelemetry Python Core Repository](https://github.com/open-telemetry/opentelemetry-python) via pip. The version of the packages installed defaults to the main branch in that repository when tox is run locally. It is possible to install packages tagged with a specific git commit hash by setting an environment variable before running tox as per the following example:
The continuation integration overrides that environment variable with as per the configuration [here](https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/.github/workflows/test.yml#L9).
1. Go to your Contrib repo directory. `cd ~/git/opentelemetry-python-contrib`.
117
117
2. Create a virtual env in your Contrib repo directory. `python3 -m venv my_test_venv`.
118
118
3. Activate your virtual env. `source my_test_venv/bin/activate`.
119
-
4. Clone the [OpenTelemetry Python](https://github.com/open-telemetry/opentelemetry-python) Python Core repo to a folder named `opentelemetry-python-core`. `git clone [email protected]:open-telemetry/opentelemetry-python.git opentelemetry-python-core`.
120
-
5. Change directory to the repo that was just cloned. `cd opentelemetry-python-core`.
121
-
6. Move the head of this repo to the hash you want your tests to use. This is currently the SHA `47483865854c7adae7455f8441dab7f814f4ce2a` as seen in `.github/workflows/test.yml`. Use `git fetch && git checkout 47483865854c7adae7455f8441dab7f814f4ce2a`.
122
-
7. Go back to the root directory. `cd ../`.
123
-
8. Make sure you have `tox` installed. `pip install tox`.
124
-
9. Run tests for a package. (e.g. `tox -e test-instrumentation-flask`.)
119
+
4. Make sure you have `tox` installed. `pip install tox`.
120
+
5. Run tests for a package. (e.g. `tox -e test-instrumentation-flask`.)
125
121
126
122
### Thanks to all the people who already contributed!
Copy file name to clipboardexpand all lines: instrumentation/opentelemetry-instrumentation-aiohttp-client/src/opentelemetry/instrumentation/aiohttp_client/__init__.py
Copy file name to clipboardexpand all lines: instrumentation/opentelemetry-instrumentation-botocore/src/opentelemetry/instrumentation/botocore/__init__.py
0 commit comments