Skip to content
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

Include .pyi files in v4-proto-py build #521

Merged
merged 1 commit into from
Oct 6, 2023
Merged

Include .pyi files in v4-proto-py build #521

merged 1 commit into from
Oct 6, 2023

Conversation

jiajames
Copy link
Contributor

@jiajames jiajames commented Oct 6, 2023

Summary by CodeRabbit

  • Chore: Updated Makefile to handle additional protobuf-generated file patterns (*_pb2.pyi and *_pb2_grpc.pyi). This ensures correct import statements in these files.
  • New Feature: Modified v4-proto-py/MANIFEST.in to include all *.pyi files recursively, ensuring they are packaged during distribution.
  • New Feature: Adjusted v4-proto-py/setup.py to include package data during installation. This guarantees that all necessary files specified in the MANIFEST.in file are included when the package is installed.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 6, 2023

Walkthrough

This change set enhances the build process by updating import statements for protobuf-generated files and ensuring all necessary files are included during package installation. It modifies the Perl command in the makefile, updates the MANIFEST.in file, and adjusts the setup configuration.

Changes

File Summary
Makefile Modifies a Perl command to add two new file patterns ('_pb2.pyi' and '_pb2_grpc.pyi') for updating import statements in Python files.
v4-proto-py/MANIFEST.in Adds a line to include all *.pyi files recursively.
v4-proto-py/setup.py Adds include_package_data=True to ensure files specified in the MANIFEST.in file are included during package installation.

🐇💻

In the land of code, where the brackets lie,

Changes come forth, under the digital sky.

Import paths updated, with a swift Perl spell,

And package data included, oh so well!

Celebrate these changes, for they're not mere fluff,

They make our build process robust and tough! 🎉🥕


Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • Mention @coderabbitai in any review comment for bot assistance.
  • Note: Review comments are made on code diffs or files, not on the PR overview.

Pause Incremental Reviews

  • Insert @coderabbitai: ignore in the PR description to halt the bot's ongoing reviews. Remove the line to resume.
  • Additionally, enter @coderabbitai pause to halt the bot's ongoing reviews as any issue or review comment. To
    resume reviews, enter @coderabbitai resume as any issue or review comment.

@github-actions github-actions bot added the proto label Oct 6, 2023
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Commits Files that changed from the base of the PR and between f2182e8 and c24c37d.
Files selected for processing (3)
  • Makefile (1 hunks)
  • v4-proto-py/MANIFEST.in (1 hunks)
  • v4-proto-py/setup.py (1 hunks)
Files skipped from review due to trivial changes (2)
  • v4-proto-py/MANIFEST.in
  • v4-proto-py/setup.py
Additional comments (Suppressed): 1
Makefile (1)
  • 43-43: The Perl command has been updated to include two new file patterns ('_pb2.pyi' and '_pb2_grpc.pyi'). This ensures that these additional file types have their import statements correctly updated. Make sure that the regex pattern used in the Perl command is compatible with these new file types.

Copy link

@johnqh johnqh left a comment

Choose a reason for hiding this comment

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

Does this mean the pyi files were generated already, just not included in the package?

@jiajames
Copy link
Contributor Author

jiajames commented Oct 6, 2023

Yes thats correct

@jiajames jiajames merged commit 3f1cf01 into main Oct 6, 2023
9 checks passed
@jiajames jiajames deleted the jj/pyi-files branch October 6, 2023 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants