googleapis / synthtool

Apache License 2.0
87 stars 82 forks source link

chore(python): update noxfile.py and .kokoro/requirements.txt #1974

Closed parthea closed 1 month ago

parthea commented 1 month ago

This PR contains changes to both .kokoro/requirements.txt and noxfile.py. The changes are combined into a single PR in order to reduce the number of PRs downstream as each commit to synthtool triggers a PR to be created in downstream repositories in the googleapis organization.

The changes to .kokoro/requirements.txt were created by deleting the requirements.txt file and running the following command pip-compile --allow-unsafe --generate-hashes requirements.in

The changes to noxfile.py were tested by following tests steps

  1. Build the post processor image

For the split repo, run docker build -f docker/owlbot/python/Dockerfile -t test_split_repo . For the mono repo, run docker build -f docker/owlbot/python_mono_repo/Dockerfile -t test_mono_repo .

  1. Run the post processor image. In the downstream repo, run the post processor image and nox sessions.

For example, in python-pubsub, run docker run --user $(id -u):$(id -g) --rm -v $(pwd):/repo -w /repo test_split_repo, then run nox sessions nox -s unit-3.9 and nox -s prerelease_deps

For example, in the monorepo google-cloud-python run mkdir -p owl-bot-staging/google-cloud-access-approval and docker run --user $(id -u):$(id -g) --rm -v $(pwd):/repo -w /repo test_mono_repo then run nox sessions nox -s unit-3.9 and nox -s prerelease_deps from the directory packages/google-cloud-access-approval

  1. Confirm that nox sessions pass and all protobuf implementations are tested including upb, python and cpp