Skip to content

Conversation

@Deependra-Patel
Copy link
Member

Also changed dependencies to be compatible with Dataproc s8s 3.0 runtime

@gemini-code-assist
Copy link

Summary of Changes

Hello @Deependra-Patel, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request prepares the project for its "1.0.0-rc" release by performing a significant upgrade to Spark 4.0 and ensuring full compatibility with the Dataproc s8s 3.0 runtime environment. This involves updating the supported Python version to 3.12 across the project, revising numerous dependency versions, and refining the PySpark installation requirements for better user experience and modularity.

Highlights

  • Spark 4.0 Upgrade: The project has been upgraded to support Spark 4.0, aligning with the latest Spark release and preparing for a release candidate.
  • Python 3.12 Adoption: The required Python version for the project, including documentation builds and development environments, has been updated to Python 3.12.
  • Dependency Updates: Several core dependencies, such as google-cloud-aiplatform, pandas, pyarrow, and tensorflow, have been updated to newer versions to ensure compatibility with Dataproc s8s 3.0 runtime.
  • Release Candidate Versioning: The project's version has been incremented to "1.0.0-rc", indicating preparation for an upcoming release candidate.
  • PySpark Installation Check: A runtime check has been introduced in the main init.py file to ensure PySpark is installed, providing helpful instructions if it's missing.
  • Optional PySpark Dependencies: pyspark and pyspark-client are now managed as optional dependencies (via 'spark' and 'spark-connect' extras) rather than core dependencies, offering more flexible installation.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request successfully upgrades the project to support Spark 4.0 by updating the Python version to 3.12 and refreshing key dependencies for compatibility with the Dataproc s8s 3.0 runtime. A significant and well-executed change is making pyspark an optional dependency, which enhances the library's flexibility. This is cleanly handled with a runtime check in __init__.py that provides clear installation instructions. The changes are consistent across all modified files. My review includes one suggestion for pyproject.toml to improve the clarity of a dependency version specification for better long-term maintainability.

"pyarrow>=16.1.0, <17.0.0",
"pyspark>=3.5.3, <4.0.0",
"pandas>=2.2.2, <3.0.0",
"pyarrow>=18.1, <20.0.0",

Choose a reason for hiding this comment

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

medium

For dependency versioning, it's a good practice to be explicit by including the full patch version. While 18.1 is a valid version specifier, using 18.1.0 is clearer and can prevent potential ambiguity with some package management tools. This small change improves the long-term maintainability and readability of the dependency list.

Suggested change
"pyarrow>=18.1, <20.0.0",
"pyarrow>=18.1.0, <20.0.0",

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.

1 participant