Skip to content

Commit 2501a60

Browse files
author
codegen-bot
committed
move example repos into repositories/
1 parent a5211cf commit 2501a60

File tree

32 files changed

+32
-9
lines changed

32 files changed

+32
-9
lines changed

.vscode/launch.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
8+
{
9+
"name": "Python Debugger: Current File",
10+
"type": "debugpy",
11+
"request": "launch",
12+
"program": "${file}",
13+
"console": "integratedTerminal",
14+
"env": {
15+
"PYTHONPATH": "${workspaceFolder}"
16+
}
17+
}
18+
]
19+
}

examples/flask_to_fastapi_migration/run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
codebase = Codebase(PYTHON_REPO_DIR)
77

88
# Define the target directory
9-
TARGET_DIR = "01_small_library"
9+
TARGET_DIR = "02_castle"
1010

1111

1212
def update_flask_imports_and_init(file):

examples/python2_to_python3/run.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
from codegen import Codebase
22

3-
# Initialize codebase
4-
codebase = Codebase("./")
3+
from examples.main import PYTHON_REPO_DIR
4+
5+
codebase = Codebase(PYTHON_REPO_DIR)
56

67
# Define the target directory
7-
TARGET_DIR = "repo-before"
8+
TARGET_DIR = "03_python2"
89

910

1011
def convert_print_statements(file):

examples/sqlalchemy_type_annotations/run.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
import shutil
66
import os
77

8+
from examples.main import PYTHON_REPO_DIR
9+
810

911
def init_git_repo(repo_path: str) -> None:
1012
"""Initialize a git repository in the given path."""
@@ -132,7 +134,7 @@ def run(codebase: Codebase):
132134

133135

134136
if __name__ == "__main__":
135-
input_repo = "./input_repo"
137+
input_repo = PYTHON_REPO_DIR / "05_sqlalchemy_type"
136138
print("Initializing git repository...")
137139
init_git_repo(input_repo)
138140

examples/unittest_to_pytest/run.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
from codegen import Codebase
22

3-
# Initialize codebase
4-
codebase = Codebase("./")
3+
from examples.main import PYTHON_REPO_DIR
4+
5+
codebase = Codebase(PYTHON_REPO_DIR)
56

67
# Define the target directory
7-
TARGET_DIR = "repo-before/tests"
8+
TARGET_DIR = "02_castle"
89

910

1011
def remove_unittest_inheritance(file):

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ requirements = [
4545
package_module_name_map.codegen = "codegen"
4646

4747
[tool.hatch.build.targets.wheel]
48-
packages = ["src"]
48+
packages = ["examples"]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)