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

Fix samples CI runs under Python 3.9 / 3.10. #477

Closed
tseaver opened this issue Dec 8, 2021 · 1 comment · Fixed by #478
Closed

Fix samples CI runs under Python 3.9 / 3.10. #477

tseaver opened this issue Dec 8, 2021 · 1 comment · Fixed by #478
Assignees
Labels
api: bigtable Issues related to the googleapis/python-bigtable API. samples Issues that are directly related to samples. type: process A process-related concern. May include testing, release, or the like.

Comments

@tseaver
Copy link
Contributor

tseaver commented Dec 8, 2021

From PR #476, see 3.9 and 3.10 samples run failures.

The generated noxfile.py files in samples/ don't have those sessions. I believe the correct fix is to add noxfile_config.py to each sample directory, overriding the generated set of Python versions to run.

@tseaver tseaver added type: process A process-related concern. May include testing, release, or the like. samples Issues that are directly related to samples. labels Dec 8, 2021
@tseaver tseaver self-assigned this Dec 8, 2021
@product-auto-label product-auto-label bot added the api: bigtable Issues related to the googleapis/python-bigtable API. label Dec 8, 2021
tseaver added a commit that referenced this issue Dec 8, 2021
Refresh each sample's noxfile via:

----------------------------- %< -----------------------------
$ for noxfile in samples/*/noxfile.py; do
    echo "Refreshing $noxfile";
    wget -O $noxfile https://github.com/GoogleCloudPlatform/python-docs-samples/raw/main/noxfile-template.py
    echo "Blackening samples for $noxfile"
    nox -f $noxfile -s blacken
done
----------------------------- %< -----------------------------

Closes #477.
@tseaver
Copy link
Contributor Author

tseaver commented Dec 8, 2021

The better fix appears to be to refresh each sample's noxfile.py from the (canonical version](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/main/noxfile-template.py).

tseaver added a commit that referenced this issue Dec 8, 2021
Refresh each sample's noxfile via:

----------------------------- %< -----------------------------
$ for noxfile in samples/*/noxfile.py; do
    echo "Refreshing $noxfile";
    wget -O $noxfile https://github.com/GoogleCloudPlatform/python-docs-samples/raw/main/noxfile-template.py
    echo "Blackening samples for $noxfile"
    nox -f $noxfile -s blacken
done
----------------------------- %< -----------------------------

Closes #477.
parthea added a commit that referenced this issue Jan 12, 2022
* ci: run samples under Python 3.9 / 3.10

Refresh each sample's noxfile via:

----------------------------- %< -----------------------------
$ for noxfile in samples/*/noxfile.py; do
    echo "Refreshing $noxfile";
    wget -O $noxfile https://github.com/GoogleCloudPlatform/python-docs-samples/raw/main/noxfile-template.py
    echo "Blackening samples for $noxfile"
    nox -f $noxfile -s blacken
done
----------------------------- %< -----------------------------

Closes #477.

* fix: disable install-from-sorce for beam sample

Per #203.

* fix: skip beam sample for Python 3.10

Beam-related wheels are not yet available.

* fix: also refresh noxfiles for 'samples/snippets'

* ci: don't enforce type hints on old samples

* resolve issue where samples templates are not updated

* 🦉 Updates from OwlBot

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* resolve mypy error Name __path__ already defined

* add workaroud from PR #203

Co-authored-by: Anthonios Partheniou <partheniou@google.com>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigtable Issues related to the googleapis/python-bigtable API. samples Issues that are directly related to samples. type: process A process-related concern. May include testing, release, or the like.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant