-
Notifications
You must be signed in to change notification settings - Fork 122
[Python] Add codegen #2507
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Python] Add codegen #2507
Conversation
20b87ec to
5891b08
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The file is called openapi.py, but it looks like this exclusively depends on the JSON schema.
Is that correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initially, it was implementing OpenAPI until we introduced JSON schema into CLI, let me rename it.
experimental/python/codegen/codegen/generated_dataclass_patch.py
Outdated
Show resolved
Hide resolved
5891b08 to
977df62
Compare
|
@pietern addressed your comments, please take a look again |
pietern
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please TAL at the comments.
| # | ||
| # We can't load all types because of errors while loading some of them. | ||
| LOADED_NAMESPACES = [ | ||
| "compute", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The compute namespace is for job clusters, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's for job clusters and pipeline cluster configuration
| # TODO block PR if this fails once diffs are fixed | ||
| # exit 1 | ||
| fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are the tests run on push?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a little bit of a problem, if codegen itself crashed CI job will pass now, let me fix it
|
An authorized user can trigger integration tests manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
|
@kanterov Is this ready? |
Changes
Add the code generator from the bundle schema to the Python code. Currently, it's only enabled for the "jobs" package.
There is a new GitHub action to verify that codegen is always up-to-date whenever we update bundle schema.
Depends on #2508
Tests