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: .github/workflows/misc_0.yml
+3-3
Original file line number
Diff line number
Diff line change
@@ -236,8 +236,8 @@ jobs:
236
236
- name: Check github workflows are up to date
237
237
run: git diff --exit-code || (echo 'Generated workflows are out of date, run "tox -e generate-workflows" and commit the changes in this PR.' && exit 1)
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+46-15
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ some aspects of development, including testing against multiple Python versions.
45
45
To install `tox`, run:
46
46
47
47
```console
48
-
$ pip install tox
48
+
pip install tox
49
49
```
50
50
51
51
You can run `tox` with the following arguments:
@@ -60,19 +60,36 @@ You can run `tox` with the following arguments:
60
60
-`tox -e lint-some-package` to run lint checks on `some-package`
61
61
-`tox -e generate-workflows` to run creation of new CI workflows if tox environments have been updated
62
62
-`tox -e ruff` to run ruff linter and formatter checks against the entire codebase
63
+
-`tox -e precommit` to run all `pre-commit` actions
63
64
64
65
`ruff check` and `ruff format` are executed when `tox -e ruff` is run. We strongly recommend you to configure [pre-commit](https://pre-commit.com/) locally to run `ruff` automatically before each commit by installing it as git hooks. You just need to [install pre-commit](https://pre-commit.com/#install) in your environment:
65
66
66
67
```console
67
-
$ pip install pre-commit -c dev-requirements.txt
68
+
pip install pre-commit -c dev-requirements.txt
68
69
```
69
70
70
71
and run this command inside the git repository:
71
72
72
73
```console
73
-
$ pre-commit install
74
+
pre-commit install
74
75
```
75
76
77
+
### Virtual Environment
78
+
79
+
You can also create a single virtual environment to make it easier to run local tests.
80
+
81
+
For that, you'll need to install [`uv`](https://docs.astral.sh/uv/getting-started/installation/).
82
+
83
+
After installing `uv`, you can run the following command:
84
+
85
+
```sh
86
+
uv sync
87
+
```
88
+
89
+
This will create a virtual environment in the `.venv` directory and install all the necessary dependencies.
90
+
91
+
### Public Symbols
92
+
76
93
We try to keep the amount of _public symbols_ in our code minimal. A public symbol is any Python identifier that does not start with an underscore.
77
94
Every public symbol is something that has to be kept in order to maintain backwards compatibility, so we try to have as few as possible.
Some of the `tox` targets install packages from the [OpenTelemetry Python Contrib Repository](https://github.com/open-telemetry/opentelemetry-python.git) via
113
130
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
@@ -153,31 +170,45 @@ pull requests (PRs).
153
170
To create a new PR, fork the project in GitHub and clone the upstream repo:
0 commit comments