From 81370fcc61f2617b4658253c4c5615a4287a35d8 Mon Sep 17 00:00:00 2001 From: Guangya Liu Date: Tue, 17 Dec 2024 13:34:38 -0500 Subject: [PATCH] [chore] Removed $ from command for contribution guidance The copy in markdown file always copy the $ as well when copying the command, I need to remove the $ manually each time. --- CONTRIBUTING.md | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ab22d3821f..bebb3310d3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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,39 @@ 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: + +```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, run the following: + +```sh +git commit +git push fork feature ``` Open a pull request against the main `opentelemetry-python-contrib` repo.