Skip to content

Commit b6b2f73

Browse files
authored
Cleanup (#31)
* remove unnecessary stuff * syntax * cleaning * Automated pre-commit update
1 parent 34f759b commit b6b2f73

File tree

6 files changed

+8
-120
lines changed

6 files changed

+8
-120
lines changed

STRUCTURE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ example-name/
1616
├── README.md # Documentation and usage examples
1717
├── run.py # Main implementation
1818
├── guide.md # (Optional) Additional technical details
19-
└── repo-before/ # (Optional) Sample code for transformation
19+
└── input_repo/ # (Optional) Sample code for transformation
2020
```
2121

2222
## Code Organization in `run.py`
@@ -43,7 +43,7 @@ Your `run.py` should follow this structure, demonstrated well in the `generate_t
4343
@codegen.function("your-function-name")
4444
def run(codebase: Codebase):
4545
"""Clear docstring explaining what the function does.
46-
46+
4747
Include:
4848
1. Purpose of the function
4949
2. Key steps or transformations
@@ -128,7 +128,7 @@ def get_function_context(function) -> dict:
128128
@codegen.function("generate-training-data")
129129
def run(codebase: Codebase):
130130
"""Generate training data using a node2vec-like approach...
131-
131+
132132
This codemod:
133133
1. Finds all functions...
134134
2. For each function...

examples/flask_to_fastapi_migration/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,7 @@ The script will process all Python files in the `repo-before` directory and appl
6363
## Understanding the Code
6464

6565
- `run.py` - The migration script
66-
- `repo-before/` - Sample Flask application to migrate
67-
- `guide.md` - Additional notes and explanations
66+
- `input_repo/` - Sample Flask application to migrate
6867

6968
## Learn More
7069

examples/python2_to_python3/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,7 @@ The script will process all Python files in the `repo-before` directory and appl
8383
## Understanding the Code
8484

8585
- `run.py` - The migration script
86-
- `repo-before/` - Sample Python 2 code to migrate
87-
- `guide.md` - Additional notes and explanations
86+
- `input_repo/` - Sample Python 2 code to migrate
8887

8988
## Learn More
9089

examples/sqlalchemy_1.6_to_2.0/README.md

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -60,23 +60,10 @@ The migration script handles four key transformations:
6060
addresses: Mapped[List["Address"]] = relationship()
6161
```
6262

63-
## Running the Example
64-
65-
```bash
66-
# Install Codegen
67-
pip install codegen
68-
69-
# Run the migration
70-
python run.py
71-
```
72-
73-
The script will process all Python files in the `repo-before` directory and apply the transformations in the correct order.
74-
7563
## Understanding the Code
7664

77-
- `run.py` - The migration script
78-
- `repo-before/` - Sample SQLAlchemy 1.6 application to migrate
79-
- `guide.md` - Additional notes and explanations
65+
- `input_repo` - Sample SQLAlchemy 1.6 application to migrate
66+
- `output_repo` - Sample SQLAlchemy 2.0 application after migration
8067

8168
## Learn More
8269

examples/sqlalchemy_1.6_to_2.0/guide.md

Lines changed: 0 additions & 96 deletions
This file was deleted.

examples/unittest_to_pytest/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,7 @@ The script will process all Python test files in the `repo-before` directory and
8989
## Understanding the Code
9090

9191
- `run.py` - The migration script
92-
- `repo-before/` - Sample `unittest` test suite to migrate
93-
- `guide.md` - Additional notes and explanations
92+
- `input_repo/` - Sample `unittest` test suite to migrate
9493

9594
## Learn More
9695

0 commit comments

Comments
 (0)