[chore] Removed $ from command for contribution guidance (#3114)

The copy in markdown file always copy the $ as well when copying the command,
I need to remove the $ manually each time.

Co-authored-by: Leighton Chen <lechen@microsoft.com>
Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
This commit is contained in:
Guangya Liu
2024-12-23 09:02:02 -05:00
committed by GitHub
parent 77708cd7dd
commit 59894979ef

View File

@ -56,7 +56,7 @@ some aspects of development, including testing against multiple Python versions.
To install `tox`, run:
```sh
$ pip install tox
pip install tox
```
You can run `tox` with the following arguments:
@ -74,13 +74,13 @@ You can run `tox` with the following arguments:
`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:
```console
$ pip install pre-commit -c dev-requirements.txt
pip install pre-commit -c dev-requirements.txt
```
and run this command inside the git repository:
```console
$ pre-commit install
pre-commit install
```
See
@ -126,31 +126,45 @@ pull requests (PRs).
To create a new PR, fork the project in GitHub and clone the upstream repo:
```sh
$ git clone https://github.com/open-telemetry/opentelemetry-python-contrib.git
$ cd opentelemetry-python-contrib
git clone https://github.com/open-telemetry/opentelemetry-python-contrib.git
cd opentelemetry-python-contrib
```
Add your fork as an origin:
```sh
$ git remote add fork https://github.com/YOUR_GITHUB_USERNAME/opentelemetry-python-contrib.git
git remote add fork https://github.com/YOUR_GITHUB_USERNAME/opentelemetry-python-contrib.git
```
Run tests:
make sure you have all supported versions of Python installed, install `tox` only for the first time:
```sh
# make sure you have all supported versions of Python installed
$ pip install tox # only first time.
$ tox # execute in the root of the repository
pip install tox
```
Run tests in the root of the repository (this will run all tox environments and may take some time):
```sh
tox
```
Check out a new branch, make modifications and push the branch to your fork:
```sh
$ git checkout -b feature
# edit files
$ git commit
$ git push fork feature
git checkout -b feature
```
After you edit the files, stage changes in the current directory:
```sh
git add .
```
Then run the following to commit the changes:
```sh
git commit
git push fork feature
```
Open a pull request against the main `opentelemetry-python-contrib` repo.