Skip to content

chore: leverage .openapi-generator-ignore in python client generation#82

Merged
jackye1995 merged 1 commit into
lance-format:mainfrom
xerryd:py-gen
May 27, 2025
Merged

chore: leverage .openapi-generator-ignore in python client generation#82
jackye1995 merged 1 commit into
lance-format:mainfrom
xerryd:py-gen

Conversation

@xerryd

@xerryd xerryd commented May 25, 2025

Copy link
Copy Markdown
Contributor

This PR uses the .openapi-generator-ignore file for the Python client generation, instead of running manual rm commands afterwards. The OpenAPI generator for the Python client requires the ignore file to be in the output directory.

However, the generation metadata .openapi-generator/ is something that can't be skipped in the python client generation, but there are some open PRs to address this across all clients which seem to have been open for a while now. For example: OpenAPITools/openapi-generator#15770.

I see that the repo is also cleaning .openapi-generator-ignore files so feel free to close this if not needed.

Testing

make clean-python && make gen-python

@github-actions github-actions Bot added the python Python features label May 25, 2025
@github-actions

Copy link
Copy Markdown
Contributor

ACTION NEEDED
Lance follows the Conventional Commits specification for release automation.

The PR title and description are used as the merge commit message. Please update your PR title and description to match the specification.

For details on the error please inspect the "PR Title Check" action.

@xerryd xerryd changed the title use .openapi-generator-ignore in python client generation Leverage .openapi-generator-ignore in python client generation May 25, 2025
@yanghua yanghua changed the title Leverage .openapi-generator-ignore in python client generation chore: leverage .openapi-generator-ignore in python client generation May 26, 2025
@github-actions github-actions Bot added the chore Features related to test, build, style improvements label May 26, 2025
@yanghua

yanghua commented May 26, 2025

Copy link
Copy Markdown
Contributor

@bxlq, thanks for your contribution, let me verify your changes.

@yanghua yanghua left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@yanghua

yanghua commented May 26, 2025

Copy link
Copy Markdown
Contributor

cc @jackye1995

@jackye1995 jackye1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the fix! We should probably do the same for the other generated modules as well

@jackye1995

Copy link
Copy Markdown
Collaborator

Oh actually, I noticed one issue, when we do clean we remove the entire directory. That's why I put an external ignore file for the Apache client in Java. Can we do the same here?

@xerryd

xerryd commented May 27, 2025

Copy link
Copy Markdown
Contributor Author

The Python OpenAPI code generation template is stingy and requires the ignore files to be located in the output directory. However, right now the make clean only removes non-hidden files in the output directory so the new .openapi-generator-ignore doesn't actually get removed.

To delete everything, including hidden files, we would need to add rm -rf lance_namespace_urllib3_client/** lance_namespace_urllib3_client/.* to make clean

@jackye1995

Copy link
Copy Markdown
Collaborator

right now the make clean only removes non-hidden files in the output directory so the new .openapi-generator-ignore doesn't actually get removed.

great! In that case I think we can also do the same for the apache client folder, instead of making an external ignore file so it is consistent. Merging this!

@jackye1995 jackye1995 merged commit 7dfe5ac into lance-format:main May 27, 2025
6 of 8 checks passed
@xerryd xerryd deleted the py-gen branch May 27, 2025 05:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Features related to test, build, style improvements python Python features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants