Skip to content

Commit fd3a5a9

Browse files
author
tomcodegen
committed
Merge remote-tracking branch 'origin/develop' into tom-cg-10450-enable-unauthenticated-codemod-test-runs
2 parents 4490142 + c273318 commit fd3a5a9

File tree

1,129 files changed

+90702
-1588
lines changed

Some content is hidden

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

1,129 files changed

+90702
-1588
lines changed

.circleci/config.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,14 @@ commands:
7575
steps:
7676
- restore_cache:
7777
keys:
78-
- v1-verified-codemod-repos-{{ checksum "tests/verified_codemods/codemod_data/repo_commits.json" }}-{{.Environment.CIRCLE_NODE_INDEX}}-{{.Environment.CIRCLE_NODE_TOTAL}}
78+
- v1-verified-codemod-repos-{{ checksum "tests/integration/verified_codemods/codemod_data/repo_commits.json" }}-{{.Environment.CIRCLE_NODE_INDEX}}-{{.Environment.CIRCLE_NODE_TOTAL}}
7979
- run:
8080
command: |
8181
uv run --frozen gs codemod clone-repos --verified-codemod-repos --token ${CODEGEN_BOT_GHE_TOKEN}
8282
- save_cache:
8383
paths:
8484
- $GITHUB_WORKSPACE
85-
key: v1-verified-codemod-repos-{{ checksum "tests/verified_codemods/codemod_data/repo_commits.json" }}-{{.Environment.CIRCLE_NODE_INDEX}}-{{.Environment.CIRCLE_NODE_TOTAL}}
85+
key: v1-verified-codemod-repos-{{ checksum "tests/integration/verified_codemods/codemod_data/repo_commits.json" }}-{{.Environment.CIRCLE_NODE_INDEX}}-{{.Environment.CIRCLE_NODE_TOTAL}}
8686
build-wheels:
8787
parameters:
8888
base_packages:
@@ -237,7 +237,7 @@ jobs:
237237
- fetch-verified-codemods
238238
- cache-verified-codemod-repos
239239
- run_ats:
240-
default_tests: "tests/codemod/test_verified_codemods.py"
240+
default_tests: "tests/integration/codemod/test_verified_codemods.py"
241241
codecov_flags: "smart-tests-codemod"
242242
collect_args: --cli-api-key ${PROD_CLI_API_KEY} --token ${CODEGEN_BOT_GHE_TOKEN}
243243
ats_collect_args: --cli-api-key=${PROD_CLI_API_KEY},--token=${CODEGEN_BOT_GHE_TOKEN},
@@ -264,7 +264,7 @@ jobs:
264264
- clone-repos:
265265
extra_repos: false
266266
- run_ats:
267-
default_tests: "tests/codemod/test_codemods.py"
267+
default_tests: "tests/integration/codemod/test_codemods.py"
268268
codecov_flags: "smart-tests-codemod-oss"
269269
collect_args: --size=<<parameters.size>> --sync-graph=<<parameters.sync_graph>> --token ${CODEGEN_BOT_GHE_TOKEN}
270270
ats_collect_args: --size=<<parameters.size>>,--sync-graph=<<parameters.sync_graph>>,--token=${CODEGEN_BOT_GHE_TOKEN},
@@ -297,7 +297,7 @@ jobs:
297297
if [ "<<parameters.extra_repos>>" = "true" ]; then
298298
EXTRA_REPOS_ARG="--extra-repos=true"
299299
fi
300-
PYTEST_ARGS="${EXTRA_REPOS_ARG} --token ${CODEGEN_BOT_GHE_TOKEN} -o junit_suite_name=\"${CIRCLE_JOB}\" tests/codemod/test_parse.py"
300+
PYTEST_ARGS="${EXTRA_REPOS_ARG} --token ${CODEGEN_BOT_GHE_TOKEN} -o junit_suite_name=\"${CIRCLE_JOB}\" tests/integration/codemod/test_parse.py"
301301
echo "Running tests with args: $PYTEST_ARGS"
302302
TESTS_TO_RUN=$(PYTEST_ARGS=${PYTEST_ARGS} ./.circleci/collect.sh)
303303
echo $TESTS_TO_RUN | circleci tests run --command "ulimit -s unlimited; xargs uv run --frozen pytest -n auto ${PYTEST_ARGS}"

.gitattributes

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
**/expected_diff.txt filter=lfs diff=lfs merge=lfs -text
2-
tests/codemod/repos/extra/*.json filter=lfs diff=lfs merge=lfs -text
2+
tests/integration/codemod/repos/extra/*.json filter=lfs diff=lfs merge=lfs -text
33
**/expected_diff.patch filter=lfs diff=lfs merge=lfs -text
4-
tests/codemod/repos/repos.json filter=lfs diff=lfs merge=lfs -text
5-
tests/verified_codemods/** filter=lfs diff=lfs merge=lfs -text
4+
tests/integration/codemod/repos/repos.json filter=lfs diff=lfs merge=lfs -text
5+
tests/integration/verified_codemods/** filter=lfs diff=lfs merge=lfs -text
66
.github/disallowed-words.txt filter=lfs diff=lfs merge=lfs -text

.github/disallowed-words.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:ac0b7be00533f882fb174c498c27372fa78d3ec2d65c0e885475bf92b43b7303
3-
size 337
2+
oid sha256:c47fe11113256de71968b186bd459732c5f29547b9a57275f671502e9ebd8327
3+
size 328

.gitignore

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,6 @@ uv-*.tar.gz
6262
.venv
6363
graph-sitter-types/out/**
6464
graph-sitter-types/typings/**
65-
codegen-sdk/out/**
66-
codegen-sdk/typings/**
6765
coverage.json
68-
tests/verified_codemods/codemod_data/repo_commits.json
66+
tests/integration/verified_codemods/codemod_data/repo_commits.json
6967

70-
# =====[ Docs ]=====
71-
# These are auto-generated
72-
docs/api-reference/core/*
73-
docs/api-reference/python/*
74-
docs/api-reference/typescript/*

.pre-commit-config.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ repos:
1919
hooks:
2020
- id: biome-check
2121
additional_dependencies: ["@biomejs/[email protected]"]
22-
exclude: (src/codemods/eval)|(tests/unit/skills)|(tests/unit/output)|(tests/verified_codemods)|(docs/samples)
22+
exclude: (src/codemods/eval)|(tests/unit/codegen/sdk/skills)|(tests/unit/codegen/sdk/output)|(tests/integration/verified_codemods)|(docs/samples)
2323

2424
- repo: https://github.com/MarcoGorelli/cython-lint
2525
rev: v0.16.6
@@ -55,13 +55,13 @@ repos:
5555
hooks:
5656
- id: sync-pre-commit-deps
5757

58-
# - repo: https://github.com/codespell-project/codespell
59-
# rev: v2.2.4
60-
# hooks:
61-
# - id: codespell
62-
# additional_dependencies:
63-
# - tomli
64-
# files: "codegen-backend/docs/.*/.*.mdx"
58+
- repo: https://github.com/codespell-project/codespell
59+
rev: v2.2.4
60+
hooks:
61+
- id: codespell
62+
additional_dependencies:
63+
- tomli
64+
files: "docs/.*/.*.mdx"
6565

6666
- repo: https://github.com/fpgmaas/deptry.git
6767
rev: "0.22.0"
@@ -82,7 +82,7 @@ repos:
8282
hooks:
8383
- id: renovate-config-validator
8484
- repo: https://github.com/astral-sh/uv-pre-commit
85-
rev: "0.5.23"
85+
rev: "0.5.24"
8686
hooks:
8787
- id: uv-lock
8888
entry: bash -c "uv lock --frozen"

CLA.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414

1515
Subject to the terms and conditions of this CLA, You hereby grant to Codegen, Inc. and to recipients of software distributed by Codegen, Inc.:
1616

17-
- A perpetual, worldwide, non-exclusive, royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Your Contributions and such derivative works
18-
3. **Grant of Patent License**
17+
- A perpetual, worldwide, non-exclusive, royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Your Contributions and such derivative works.
18+
3. **Grant of Patent License**
1919

2020
Subject to the terms and conditions of this CLA, You hereby grant to Codegen, Inc. and to recipients of software distributed by Codegen, Inc. a perpetual, worldwide, non-exclusive, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer Your Contribution, where such license applies only to those patent claims licensable by You that are necessarily infringed by Your Contribution alone or by combination of Your Contribution with the Project to which You Submitted it.
2121

@@ -32,14 +32,19 @@
3232
6. **Limitation of Liability**
3333

3434
IN NO EVENT SHALL CODEGEN, INC. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE), ARISING IN ANY WAY OUT OF OR IN CONNECTION WITH THIS AGREEMENT, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35+
3536
7. **Subsequent Contributions and Updates**
3637

3738
You agree that all current and future Contributions to the Project Submitted by You shall be subject to the terms of this CLA. Codegen, Inc. may publish updates to this CLA from time to time; in such case, You may need to agree to new terms before any subsequent Contributions.
3839

39-
8. **Governing Law**
40+
8. **License Modification Rights**
41+
42+
You agree that Codegen, Inc. may change the license(s) applicable to the open source project(s) to which Your Contributions relate at Codegen, Inc.’s sole discretion, including without limitation by re-licensing the project(s) and Your Contributions under any other open source or “free” software license, or a commercial or proprietary license of Codegen, Inc.’s choosing.
43+
44+
9. **Governing Law**
4045

4146
This CLA shall be governed by and construed in accordance with the laws of the State of Delaware, without regard to its conflicts of laws provisions.
4247

43-
9. **Signature / Electronic Consent**
48+
10. **Signature / Electronic Consent**
4449

45-
By signing or otherwise indicating Your acceptance of this CLA, You acknowledge that You have read and agree to be bound by its terms. If You are signing on behalf of an entity, You represent and warrant that You have the authority to do so.
50+
By signing or otherwise indicating Your acceptance of this CLA, You acknowledge that You have read and agree to be bound by its terms. If You are signing on behalf of an entity, You represent and warrant that You have the authority to do so.

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ uv sync --dev
4545
uv run pytest tests/unit -n auto
4646

4747
# Codemod tests (tests larger programs)
48-
uv run pytest tests/codemod/test_codemods.py -n auto
48+
uv run pytest tests/integration/codemod/test_codemods.py -n auto
4949
```
5050

5151
## Pull Request Process

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
# Graph sitter
1+
# Codegen
22

33
[![Documentation](https://img.shields.io/badge/docs-docs.codegen.com-blue)](https://docs.codegen.com)
4-
[![Unit Tests](https://github.com/codegen-sh/codegen-sdk/actions/workflows/unit-tests.yml/badge.svg)](https://github.com/codegen-sh/codegen-sdk/actions/workflows/unit-tests.yml)
54

65
[Codegen](https://docs.codegen.com) is a python library for manipulating codebases.
76

@@ -42,7 +41,7 @@ We built Codegen backwards from real-world refactors performed on enterprise cod
4241

4342
- **Natural mental model**: Write transforms that read like your thought process - "move this function", "rename this variable", "add this parameter". No more wrestling with ASTs or manual import management.
4443

45-
- **Battle-tested on complex codebases**: Handle Python, TypeScript, and React codebases with millions of lines of code. Built and validated on refactors at companies like [Ramp](https://ramp.com).
44+
- **Battle-tested on complex codebases**: Handle Python, TypeScript, and React codebases with millions of lines of code.
4645

4746
- **Built for advanced intelligences**: As AI developers become more sophisticated, they need expressive yet precise tools to manipulate code. Codegen provides a programmatic interface that both humans and AI can use to express complex transformations through code itself.
4847

docs/README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
# Codegen Docs
22

3-
This unites docs from:
4-
- codegen-sdk (this repo)
5-
- codegen-cli
6-
73
## Development
84

95
From within the `docs/` subdirectory:

0 commit comments

Comments
 (0)