Skip to content

Commit f438c10

Browse files
committed
Move codemod tests into tests/integration
1 parent bde35c9 commit f438c10

File tree

140 files changed

+18
-15
lines changed

Some content is hidden

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

140 files changed

+18
-15
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

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,5 @@ uv-*.tar.gz
6363
graph-sitter-types/out/**
6464
graph-sitter-types/typings/**
6565
coverage.json
66-
tests/verified_codemods/codemod_data/repo_commits.json
66+
tests/integration/verified_codemods/codemod_data/repo_commits.json
6767

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
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

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion

src/codegen/sdk/testing/models.py

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

1818
BASE_TMP_DIR = Path(os.getenv("GITHUB_WORKSPACE", tempfile.gettempdir()))
1919
BASE_PATH: Path = Path(__file__).parent.parent.parent.parent.parent
20-
TEST_DIR: Path = BASE_PATH / "tests" / "codemod"
20+
TEST_DIR: Path = BASE_PATH / "tests" / "integration" / "codemod"
2121
CODEMOD_PATH: Path = BASE_PATH / "src" / "codemods"
22-
VERIFIED_CODEMOD_DIR: Path = BASE_PATH / "tests" / "verified_codemods"
22+
VERIFIED_CODEMOD_DIR: Path = BASE_PATH / "tests" / "integration" / "verified_codemods"
2323
VERIFIED_CODEMOD_DATA_DIR: Path = VERIFIED_CODEMOD_DIR / "codemod_data"
2424
VERIFIED_CODEMOD_DIFFS: Path = VERIFIED_CODEMOD_DIR / "verified_codemod_diffs"
2525

src/codemods/README.md

Lines changed: 1 addition & 1 deletion

tests/README.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

tests/codemod/__init__.py

Whitespace-only changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

tests/shared/README.md

Lines changed: 4 additions & 0 deletions

0 commit comments

Comments
 (0)