Skip to content

Commit

Permalink
[Internal] Move templates in the code generator (#809)
Browse files Browse the repository at this point in the history
## 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.
  • Loading branch information
parthban-db authored Oct 31, 2024
1 parent f2b858c commit f5697f0
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 796 deletions.
17 changes: 2 additions & 15 deletions .codegen.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,6 @@
{
"formatter": "yapf -pri $FILENAMES && autoflake -i $FILENAMES && isort $FILENAMES",
"mode": "py_v0",
"changelog_config": ".codegen/changelog_config.yml",
"template_libraries": [
".codegen/lib.tmpl"
],
"packages": {
".codegen/service.py.tmpl": "databricks/sdk/service/{{.Name}}.py"
},
"batch": {
".codegen/__init__.py.tmpl": "databricks/sdk/__init__.py",
".codegen/error_mapping.py.tmpl": "databricks/sdk/errors/platform.py",
".codegen/error_overrides.py.tmpl": "databricks/sdk/errors/overrides.py"
},
"samples": {
".codegen/example.py.tmpl": "examples/{{if .IsAccount}}account{{else}}workspace{{end}}/{{.Service.SnakeName}}/{{.Method.SnakeName}}_{{.SnakeName}}.py"
},
"version": {
"databricks/sdk/version.py": "__version__ = '$VERSION'"
},
Expand All @@ -28,6 +14,7 @@
"pip install '.[dev]'"
],
"post_generate": [
"make fmt",
"pytest -m 'not integration' --cov=databricks --cov-report html tests",
"pip install .",
"python docs/gen-client-docs.py"
Expand Down
194 changes: 0 additions & 194 deletions .codegen/__init__.py.tmpl

This file was deleted.

20 changes: 0 additions & 20 deletions .codegen/error_mapping.py.tmpl

This file was deleted.

20 changes: 0 additions & 20 deletions .codegen/error_overrides.py.tmpl

This file was deleted.

112 changes: 0 additions & 112 deletions .codegen/example.py.tmpl

This file was deleted.

12 changes: 0 additions & 12 deletions .codegen/lib.tmpl

This file was deleted.

Loading

0 comments on commit f5697f0

Please sign in to comment.