Skip to content

Commit e7c85cb

Browse files
caroljung-cgcodegen-bot
andauthored
CG-10473: Generate function_imports on build (#143)
# Motivation Updates all codegen import lines used by codemod runs on cloud # Content <!-- Please include a summary of the change --> # Testing <!-- How was the change tested? --> # Please check the following before marking your PR as ready for review - [x] I have added tests for my changes - [x] I have updated the documentation or added new documentation as needed - [x] I have read and agree to the [Contributor License Agreement](../CLA.md) --------- Co-authored-by: codegen-bot <[email protected]>
1 parent a7dd810 commit e7c85cb

File tree

19 files changed

+29
-51
lines changed

19 files changed

+29
-51
lines changed

.circleci/ats.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,3 @@ if [ ! -s codecov_ats/tests_to_run.txt ]; then
3333
run_count=1
3434
echo "Added ${TESTS_TO_RUN} as fallback. New run count: $run_count"
3535
fi
36-

.circleci/config.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,3 @@ workflows:
528528
requires:
529529
- linux-wheels
530530
- osx-wheels
531-
532-
533-

.github/codecov.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,3 @@ cli:
7171
- "--verbose"
7272
- "-n=auto"
7373
python_path: ".venv/bin/python"
74-

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,4 @@ graph-sitter-types/typings/**
6565
coverage.json
6666
tests/integration/verified_codemods/codemod_data/repo_commits.json
6767
.codegen/*
68-
.benchmarks/*
68+
.benchmarks/*

.lfsconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[lfs]
2-
url = [email protected]:codegen-sh/graph-sitter-private.git
2+
url = [email protected]:codegen-sh/graph-sitter-private.git

.pre-commit-config.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ repos:
4343
exclude_types: [mdx, pyi]
4444
- id: check-yaml
4545
- id: end-of-file-fixer
46-
files: .*/expected_diff.patch
46+
exclude: (src/codemods/eval)|(tests/unit/skills/snapshots)|(tests/unit/codegen/sdk/output)|(tests/integration/verified_codemods)|(docs/)
4747
- id: check-merge-conflict
4848

4949
- repo: https://github.com/python-jsonschema/check-jsonschema
@@ -80,6 +80,13 @@ repos:
8080
entry: scripts/disallowed-words-check.sh
8181
language: script
8282
files: '' # Check all files
83+
- id: generate-runner-imports
84+
name: Generate Runner Imports
85+
entry: bash -c "uv run --frozen python -m codegen.gscli.main generate runner-imports src/codegen/shared/compilation/function_imports.py"
86+
language: system
87+
pass_filenames: false
88+
always_run: true
89+
8390
- repo: https://github.com/renovatebot/pre-commit-hooks
8491
rev: 39.120.4
8592
hooks:

CONTRIBUTING.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,3 @@ git push origin v0.YOUR_VERSION
6969
```
7070

7171
This will trigger a release job to build this new version.
72-

mypy.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,3 @@ exclude = (?x)(
4949
| tests/unit/skills/snapshots/*
5050
)
5151
plugins = pydantic.mypy
52-

pyproject.toml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -153,14 +153,7 @@ max-line-length = 200
153153

154154
[tool.ruff]
155155
line-length = 200
156-
exclude = [
157-
"app/codemod/compilation/function_imports.py", # generated import list to compile uesr code with
158-
'codegen_tests/**/expected*/**',
159-
'codegen_tests/**/original/**',
160-
'codegen_tests/projects/**/codebase/**',
161-
'docs/**',
162-
'scripts/Debugging/**',
163-
]
156+
exclude = ["src/codegen/shared/compilation/function_imports.py", 'docs/**']
164157

165158
lint.select = ["F", "E", "W", "I", "UP", "D", "RUF", "DTZ"]
166159
lint.ignore = [
@@ -192,9 +185,8 @@ lint.exclude = [
192185
] # disable just linting for notebooks (allow for formatting)
193186
lint.pydocstyle.convention = "google"
194187
[tool.ruff.lint.isort]
195-
known-first-party = ["app"]
196-
known-third-party = ["git"]
197-
#known-local-folder=[]
188+
known-first-party = ["codegen"]
189+
198190
[tool.coverage.run]
199191
branch = true
200192
plugins = ["Cython.Coverage"]

scripts/setup-lfs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
./scripts/install-deps.sh
33

44
git lfs install
5-
git lfs pull
5+
git lfs pull

0 commit comments

Comments
 (0)