Skip to content

Commit

Permalink
[chore] Removed $ from command for contribution guidance
Browse files Browse the repository at this point in the history
The copy in markdown file always copy the $ as well when copying the command,
I need to remove the $ manually each time.
  • Loading branch information
gyliu513 committed Dec 19, 2024
1 parent 54cbf59 commit 29b4eeb
Showing 1 changed file with 28 additions and 14 deletions.
42 changes: 28 additions & 14 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 29b4eeb

Please sign in to comment.