Skip to content

Remove generated Python client from git tracking #1810

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

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

eric-maynard
Copy link
Contributor

After #1675, we now generate the Python client on-demand when it's needed by tests or the CLI. With this, we can safely remove the Python client from being tracked in the repo and add its files to .gitignore

Fixes #755

Copy link
Contributor

@HonahX HonahX left a comment

Choose a reason for hiding this comment

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

Overall LGTM! Just one comment about installation experience

@@ -30,14 +30,17 @@ for arg in "$@"; do
fi
done

# Check if the python client needs regeneration
if [ "$repair" == true ] || [ ! -f "${dir}/client/python/polaris/catalog/__init__.py" ]; then
./gradlew regeneratePythonClient
Copy link
Contributor

Choose a reason for hiding this comment

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

The generation will likely fails if user use MacOS, due to the .DS_Store file thing : (.

This is not our fault, but to ensure a smoother installation experiences, shall we consider cleaning the folder before regenerating here or add .DS_Store, poetry.lock to the EXCLUDE_PATHS/EXCLUDE_EXTENSION in the regenerate.sh?

@HonahX
Copy link
Contributor

HonahX commented Jun 6, 2025

We may also need to update the Spark Getting-Started example's Dockerfile to run the regenerate.sh

COPY --chown=jovyan client /home/jovyan/client
COPY --chown=jovyan regtests/requirements.txt /tmp
RUN pip install -r /tmp/requirements.txt && \
cd client/python && poetry lock && \
python3 -m poetry install && \
pip install -e .
. It currently use the client code in the main branch.

@eric-maynard
Copy link
Contributor Author

Good catch @HonahX, I tried adding it here:
db1ae5a

@eric-maynard eric-maynard requested a review from HonahX June 9, 2025 16:51
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.

Generated files in regtests/client/python/polaris
2 participants