From 33755019b13801d0b7177d1373467ca262f9ba3c Mon Sep 17 00:00:00 2001 From: Vishal Shenoy Date: Tue, 28 Jan 2025 19:39:42 -0800 Subject: [PATCH 1/5] . --- README.md | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index b5d40d6..b0d5dfa 100644 --- a/README.md +++ b/README.md @@ -8,27 +8,42 @@ This is a collection of examples using [Codegen](https://codegen.com). You can u We recommend using [`uv`](https://github.com/astral-sh/uv) with Python 3.13 for the best experience. +The complete installation guide for Codegen is available [here](https://docs.codegen.com/introduction/installation). The steps below are a quickstart to getting the examples working. + First, install uv if you haven't already ```bash brew install uv ``` -Create and activate a Python 3.13 virtual environment +Install the Codegen CLI globally +```bash +uv tool install codegen +``` + +Initialize Codegen in your project ```bash -uv venv && source .venv/bin/activate +codegen init ``` -Install the `codegen` package +Activate a virtual environment ```bash -uv sync +source .codegen/.venv/bin/activate ``` +Your environment is now ready to run example codemods. + +### IDE Configuration + +To configure your IDE for optimal use with Codegen, follow our [IDE setup guide](https://docs.codegen.com/introduction/ide-usage#configuring-your-ide-interpreter). + ## Examples -Each directory contains a self-contained example with: -- A README explaining the transformation -- Sample code to transform -- The Codegen script that performs the transformation +Within the /examples folder, each subdirectory contains a self-contained example with: +- An explanation of the transformation (`README.md`) +- A Codegen script that performs the transformation (`run.py`) +- Sample code to transform if not using a repository (`input_repo/`) + +To see the transformation, simply run the `run.py` script within the desired directory. ## Learn More From 1da1f6a4c8a1154867f8f641e3fe5a88e0964ddf Mon Sep 17 00:00:00 2001 From: Vishal Shenoy Date: Tue, 28 Jan 2025 19:45:10 -0800 Subject: [PATCH 2/5] . --- README.md | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index b0d5dfa..9dea82e 100644 --- a/README.md +++ b/README.md @@ -8,12 +8,7 @@ This is a collection of examples using [Codegen](https://codegen.com). You can u We recommend using [`uv`](https://github.com/astral-sh/uv) with Python 3.13 for the best experience. -The complete installation guide for Codegen is available [here](https://docs.codegen.com/introduction/installation). The steps below are a quickstart to getting the examples working. - -First, install uv if you haven't already -```bash -brew install uv -``` +To install Codegen, please follow the [official installation guide](https://docs.codegen.com/introduction/installation). Once Codegen is installed, use these steps to run the examples in this repository: Install the Codegen CLI globally ```bash @@ -25,20 +20,20 @@ Initialize Codegen in your project codegen init ``` -Activate a virtual environment +Activate the virtual environment ```bash source .codegen/.venv/bin/activate ``` Your environment is now ready to run example codemods. -### IDE Configuration +### IDE Configuration (Optional) To configure your IDE for optimal use with Codegen, follow our [IDE setup guide](https://docs.codegen.com/introduction/ide-usage#configuring-your-ide-interpreter). ## Examples -Within the /examples folder, each subdirectory contains a self-contained example with: +Within the examples folder, each subdirectory contains a self-contained example with: - An explanation of the transformation (`README.md`) - A Codegen script that performs the transformation (`run.py`) - Sample code to transform if not using a repository (`input_repo/`) From a698b8d5db39faecc26457dbe2b829ca905c04d1 Mon Sep 17 00:00:00 2001 From: Vishal Shenoy Date: Tue, 28 Jan 2025 19:46:24 -0800 Subject: [PATCH 3/5] . --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9dea82e..7bf44f1 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ Within the examples folder, each subdirectory contains a self-contained example - A Codegen script that performs the transformation (`run.py`) - Sample code to transform if not using a repository (`input_repo/`) -To see the transformation, simply run the `run.py` script within the desired directory. +To see a transformation, simply run the `run.py` script within the desired directory. ## Learn More From 0f8bb997f9075805bed966b55697a80532ee6e1d Mon Sep 17 00:00:00 2001 From: Vishal Shenoy Date: Tue, 28 Jan 2025 19:48:06 -0800 Subject: [PATCH 4/5] . --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7bf44f1..f054dd0 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ To configure your IDE for optimal use with Codegen, follow our [IDE setup guide] Within the examples folder, each subdirectory contains a self-contained example with: - An explanation of the transformation (`README.md`) - A Codegen script that performs the transformation (`run.py`) -- Sample code to transform if not using a repository (`input_repo/`) +- Sample code to transform, if not using a repository (`input_repo/`) To see a transformation, simply run the `run.py` script within the desired directory. From bfeb23a26c6e92a256f784f594fe3630cf5f6c80 Mon Sep 17 00:00:00 2001 From: vishalshenoy <34020235+vishalshenoy@users.noreply.github.com> Date: Wed, 29 Jan 2025 03:48:43 +0000 Subject: [PATCH 5/5] Automated pre-commit update --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f054dd0..8fe8901 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ Within the examples folder, each subdirectory contains a self-contained example - A Codegen script that performs the transformation (`run.py`) - Sample code to transform, if not using a repository (`input_repo/`) -To see a transformation, simply run the `run.py` script within the desired directory. +To see a transformation, simply run the `run.py` script within the desired directory. ## Learn More