Skip to content

Commit f5697f0

Browse files
authored
[Internal] Move templates in the code generator (#809)
## Changes <!-- Summary of your changes that are easy to understand --> Move templates in the code generator. ## Tests <!-- How is this tested? Please see the checklist below and also describe any other relevant tests --> The generator is working correctly with the new configuration.
1 parent f2b858c commit f5697f0

File tree

7 files changed

+2
-796
lines changed

7 files changed

+2
-796
lines changed

.codegen.json

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,6 @@
11
{
2-
"formatter": "yapf -pri $FILENAMES && autoflake -i $FILENAMES && isort $FILENAMES",
2+
"mode": "py_v0",
33
"changelog_config": ".codegen/changelog_config.yml",
4-
"template_libraries": [
5-
".codegen/lib.tmpl"
6-
],
7-
"packages": {
8-
".codegen/service.py.tmpl": "databricks/sdk/service/{{.Name}}.py"
9-
},
10-
"batch": {
11-
".codegen/__init__.py.tmpl": "databricks/sdk/__init__.py",
12-
".codegen/error_mapping.py.tmpl": "databricks/sdk/errors/platform.py",
13-
".codegen/error_overrides.py.tmpl": "databricks/sdk/errors/overrides.py"
14-
},
15-
"samples": {
16-
".codegen/example.py.tmpl": "examples/{{if .IsAccount}}account{{else}}workspace{{end}}/{{.Service.SnakeName}}/{{.Method.SnakeName}}_{{.SnakeName}}.py"
17-
},
184
"version": {
195
"databricks/sdk/version.py": "__version__ = '$VERSION'"
206
},
@@ -28,6 +14,7 @@
2814
"pip install '.[dev]'"
2915
],
3016
"post_generate": [
17+
"make fmt",
3118
"pytest -m 'not integration' --cov=databricks --cov-report html tests",
3219
"pip install .",
3320
"python docs/gen-client-docs.py"

.codegen/__init__.py.tmpl

Lines changed: 0 additions & 194 deletions
This file was deleted.

.codegen/error_mapping.py.tmpl

Lines changed: 0 additions & 20 deletions
This file was deleted.

.codegen/error_overrides.py.tmpl

Lines changed: 0 additions & 20 deletions
This file was deleted.

.codegen/example.py.tmpl

Lines changed: 0 additions & 112 deletions
This file was deleted.

.codegen/lib.tmpl

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)