Skip to content

Commit 27beaec

Browse files
authored
refactor!: Move codegen.sdk to graph_sitter (#12)
- Moves codegen.sdk to graph_sitter, codegen.shared to graph_sitter.shared - Updates various build/dev tools to use correct package names
1 parent ac6c44a commit 27beaec

File tree

943 files changed

+6039
-6629
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

943 files changed

+6039
-6629
lines changed

.github/codecov.yml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,67 @@
11
codecov:
22
branch: develop
3-
max_report_age: '12h'
3+
max_report_age: "12h"
44
component_management:
5-
default_rules: # default rules that will be inherited by all components
5+
default_rules: # default rules that will be inherited by all components
66
statuses:
77
- type: project # in this case every component that doens't have a status defined will have a project type one
88
threshold: 0 # Shouldn't remove coverage
99
individual_components:
10-
- component_id: codegen-sdk-python # this is an identifier that should not be changed
11-
name: codegen-sdk-python # this is a display name, and can be changed freely
10+
- component_id: graph-sitter-python # this is an identifier that should not be changed
11+
name: graph-sitter-python # this is a display name, and can be changed freely
1212
paths:
13-
- src/codegen/sdk/python/**
13+
- src/graph_sitter/python/**
1414
statuses:
1515
- type: project # in this case every component that doens't have a status defined will have a project type one
1616
threshold: 0 # Shouldn't remove coverage
1717
- type: patch
1818
target: 50 # Language specific featues must be 100% covered
1919
flags:
2020
- unit-tests
21-
- component_id: codegen-sdk-typescript
22-
name: codegen-sdk-typescript
21+
- component_id: graph-sitter-typescript
22+
name: graph-sitter-typescript
2323
paths:
24-
- src/codegen/sdk/typescript/**
24+
- src/graph_sitter/typescript/**
2525
statuses:
2626
- type: project # in this case every component that doens't have a status defined will have a project type one
2727
threshold: 0 # Shouldn't remove coverage
2828
- type: patch
2929
target: 50 # Language specific featues must be 100% covered
3030
flags:
3131
- unit-tests
32-
- component_id: codegen-sdk-core
33-
name: codegen-sdk-core
32+
- component_id: graph-sitter-core
33+
name: graph-sitter-core
3434
paths:
35-
- src/codegen/sdk/**
35+
- src/graph_sitter/**
3636
flags:
3737
- unit-tests
3838

3939
flag_management:
4040
default_rules:
4141
carryforward: true
42-
carryforward_mode: 'labels'
42+
carryforward_mode: "labels"
4343
statuses:
4444
- type: project
4545
individual_flags:
4646
- name: unit-tests
4747
carryforward: true
48-
carryforward_mode: 'labels'
48+
carryforward_mode: "labels"
4949
statuses:
50-
- type: 'project'
51-
- type: 'patch'
50+
- type: "project"
51+
- type: "patch"
5252
- name: codemod-tests
5353
carryforward: true
54-
carryforward_mode: 'labels'
54+
carryforward_mode: "labels"
5555
- name: integration-tests
5656
carryforward: true
57-
carryforward_mode: 'labels'
57+
carryforward_mode: "labels"
5858
comment:
5959
layout: "condensed_header, condensed_files"
6060
hide_project_coverage: true
6161
cli:
6262
plugins:
6363
pycoverage:
64-
report_type: 'json'
64+
report_type: "json"
6565
include_contexts: true
6666
runners:
6767
pytest:

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ alembic_versions_backup
5656
**/.virtual_documents
5757
/.nvmrc
5858
**/build/test-results/test/TEST*.xml
59-
src/codegen/sdk/__init__.py
59+
src/graph_sitter/__init__.py
6060
src/**/*.html
6161
.ccache/
6262
uv-*.tar.gz

codegen-examples/examples/ai_impact_analysis/run.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
from codegen.extensions.attribution.cli import run
77
from codegen.git.repo_operator.repo_operator import RepoOperator
88
from codegen.git.schemas.repo_config import RepoConfig
9-
from codegen.sdk.codebase.config import ProjectConfig
10-
from codegen.shared.enums.programming_language import ProgrammingLanguage
9+
from graph_sitter.codebase.config import ProjectConfig
10+
from graph_sitter.shared.enums.programming_language import ProgrammingLanguage
1111

1212
if __name__ == "__main__":
1313
try:

codegen-examples/examples/cyclomatic_complexity/run.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import codegen
22
from codegen import Codebase
3-
from codegen.sdk.core.statements.for_loop_statement import ForLoopStatement
4-
from codegen.sdk.core.statements.if_block_statement import IfBlockStatement
5-
from codegen.sdk.core.statements.try_catch_statement import TryCatchStatement
6-
from codegen.sdk.core.statements.while_statement import WhileStatement
3+
from graph_sitter.core.statements.for_loop_statement import ForLoopStatement
4+
from graph_sitter.core.statements.if_block_statement import IfBlockStatement
5+
from graph_sitter.core.statements.try_catch_statement import TryCatchStatement
6+
from graph_sitter.core.statements.while_statement import WhileStatement
77

88

99
@codegen.function("cyclomatic-complexity")

codegen-examples/examples/document_functions/run.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import codegen
22
from codegen import Codebase
3-
from codegen.sdk.core.external_module import ExternalModule
4-
from codegen.sdk.core.import_resolution import Import
5-
from codegen.sdk.core.symbol import Symbol
3+
from graph_sitter.core.external_module import ExternalModule
4+
from graph_sitter.core.import_resolution import Import
5+
from graph_sitter.core.symbol import Symbol
66

77

88
def hop_through_imports(imp: Import) -> Symbol | ExternalModule:

codegen-examples/examples/generate_training_data/run.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
import codegen
44
from codegen import Codebase
5-
from codegen.sdk.core.external_module import ExternalModule
6-
from codegen.sdk.core.import_resolution import Import
7-
from codegen.sdk.core.symbol import Symbol
5+
from graph_sitter.core.external_module import ExternalModule
6+
from graph_sitter.core.import_resolution import Import
7+
from graph_sitter.core.symbol import Symbol
88

99

1010
def hop_through_imports(imp: Import) -> Symbol | ExternalModule:

codegen-examples/examples/promises_to_async_await/convert_promises_twilio_repository.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
"outputs": [],
2222
"source": [
2323
"from codegen import Codebase\n",
24-
"from codegen.sdk.enums import ProgrammingLanguage\n",
25-
"from codegen.sdk.core.statements.statement import StatementType"
24+
"from graph_sitter.enums import ProgrammingLanguage\n",
25+
"from graph_sitter.core.statements.statement import StatementType"
2626
]
2727
},
2828
{

codegen-examples/examples/promises_to_async_await/run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import codegen
22
from codegen import Codebase
3-
from codegen.sdk.core.statements.statement import StatementType
3+
from graph_sitter.core.statements.statement import StatementType
44

55

66
@codegen.function("promises-to-async-await")

codegen-examples/examples/reexport_management/run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import codegen
22
from codegen import Codebase
3-
from codegen.sdk.typescript.file import TSImport
3+
from graph_sitter.typescript.file import TSImport
44

55
processed_imports = set()
66

codegen-examples/examples/remove_default_exports/run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import codegen
22
from codegen import Codebase
3-
from codegen.sdk.typescript.file import TSFile
3+
from graph_sitter.typescript.file import TSFile
44

55

66
@codegen.function("remove-default-exports")

0 commit comments

Comments
 (0)