Skip to content

Conversation

@andrewnester
Copy link
Contributor

Changes

Generated new Python types by running pushd experimental/python && make codegen

Why

This PR #2788 introduced new task types but Python types were not generated causing schema checks to fail.

genkit update-sdk
[ ! -f tagging.py ] || mv tagging.py internal/genkit/tagging.py
[ ! -f .github/workflows/next-changelog.yml ] || rm .github/workflows/next-changelog.yml
pushd experimental/python && make codegen
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why pushd vs cd?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we use popd anywhere, lets use cd here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nvm, I see this is what @kanterov recommends. Not sure why though.

@andrewnester andrewnester merged commit 9aff8c1 into main May 7, 2025
15 of 16 checks passed
@andrewnester andrewnester deleted the regenerate-py-types branch May 7, 2025 13:53
@kanterov
Copy link
Collaborator

kanterov commented May 7, 2025

@andrewnester where do we do git commit? code generation should run before that

"""
:meta private: [EXPERIMENTAL]
"""
""""""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kanterov Can you take a look at why this yields an empty doc block?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pietern it works as intended, class doesn't have experimental annotation and no description in JSON schema

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't empty docstrings be omitted from the output instead?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From what I remember missing class doc string breaks the parsing of field doc strings

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack, thanks for clarifying

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure it's still needed. I there was a problem with VSCode, but I have found that it's resolved now. Databricks SDK doesn't add empty doc strings, at least we should keep both consistent, I will create a PR to remove empty doc strings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants