Skip to content

Commit 8b02688

Browse files
committed
build: pkg:google-auth-library-python migration: adjust owlbot-related files
2 parents 0737369 + c1e338a commit 8b02688

File tree

364 files changed

+61885
-4
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

364 files changed

+61885
-4
lines changed

packages/google-auth/.coveragerc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[run]
2+
branch = True
3+
4+
[report]
5+
omit =
6+
*/samples/*
7+
*/conftest.py
8+
*/google-cloud-sdk/lib/*
9+
# NOTE: Temporarily disabling coverage for `_requests_base.py`.
10+
*/_requests_base.py
11+
exclude_lines =
12+
# Re-enable the standard pragma
13+
pragma: NO COVER
14+
# Ignore debug-only repr
15+
def __repr__
16+
# Don't complain if tests don't hit defensive assertion code:
17+
raise NotImplementedError

packages/google-auth/.flake8

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[flake8]
2+
ignore = E203, E266, E501, W503
3+
exclude =
4+
# Standard linting exemptions.
5+
__pycache__,
6+
.git,
7+
*.pyc,
8+
conf.py
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Code owners file.
2+
# This file controls who is tagged for review for any given pull request.
3+
#
4+
# For syntax help see:
5+
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax
6+
7+
# The @googleapis/googleapis-auth and @googleapis/python-core-client-libraries is the default owner for changes in this repo
8+
* @googleapis/googleapis-auth @googleapis/python-core-client-libraries
9+
google/auth/_default.py @googleapis/googleapis-auth @googleapis/aion-sdk @googleapis/python-core-client-libraries
10+
google/auth/aws.py @googleapis/googleapis-auth @googleapis/aion-sdk @googleapis/python-core-client-libraries
11+
google/auth/credentials.py @googleapis/googleapis-auth @googleapis/aion-sdk @googleapis/python-core-client-libraries
12+
google/auth/downscoped.py @googleapis/googleapis-auth @googleapis/aion-sdk @googleapis/python-core-client-libraries
13+
google/auth/external_account.py @googleapis/googleapis-auth @googleapis/aion-sdk @googleapis/python-core-client-libraries
14+
google/auth/external_account_authorized_user.py @googleapis/googleapis-auth @googleapis/aion-sdk @googleapis/python-core-client-libraries
15+
google/auth/identity_pool.py @googleapis/googleapis-auth @googleapis/aion-sdk @googleapis/python-core-client-libraries
16+
google/auth/pluggable.py @googleapis/googleapis-auth @googleapis/aion-sdk @googleapis/python-core-client-libraries
17+
google/auth/sts.py @googleapis/googleapis-auth @googleapis/aion-sdk @googleapis/python-core-client-libraries
18+
google/auth/impersonated_credentials.py @googleapis/googleapis-auth @googleapis/aion-sdk @googleapis/python-core-client-libraries
19+
tests/test__default.py @googleapis/googleapis-auth @googleapis/aion-sdk @googleapis/python-core-client-libraries
20+
tests/test_aws.py @googleapis/googleapis-auth @googleapis/aion-sdk @googleapis/python-core-client-libraries
21+
tests/test_credentials.py @googleapis/googleapis-auth @googleapis/aion-sdk @googleapis/python-core-client-libraries
22+
tests/test_downscoped.py @googleapis/googleapis-auth @googleapis/aion-sdk @googleapis/python-core-client-libraries
23+
tests/test_external_account.py @googleapis/googleapis-auth @googleapis/aion-sdk @googleapis/python-core-client-libraries
24+
tests/test_external_account_authorized_user.py @googleapis/googleapis-auth @googleapis/aion-sdk @googleapis/python-core-client-libraries
25+
tests/test_identity_pool.py @googleapis/googleapis-auth @googleapis/aion-sdk @googleapis/python-core-client-libraries
26+
tests/test_pluggable.py @googleapis/googleapis-auth @googleapis/aion-sdk @googleapis/python-core-client-libraries
27+
tests/test_sts.py @googleapis/googleapis-auth @googleapis/aion-sdk @googleapis/python-core-client-libraries
28+
tests/test_impersonated_credentials.py @googleapis/googleapis-auth @googleapis/aion-sdk @googleapis/python-core-client-libraries
29+
/samples/ @googleapis/googleapis-auth @googleapis/aion-sdk @googleapis/python-samples-owners @googleapis/python-core-client-libraries
30+
system_tests/secrets.tar.enc # Remove noise from test creds.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# How to Contribute
2+
3+
We'd love to accept your patches and contributions to this project. There are
4+
just a few small guidelines you need to follow.
5+
6+
## Contributor License Agreement
7+
8+
Contributions to this project must be accompanied by a Contributor License
9+
Agreement. You (or your employer) retain the copyright to your contribution;
10+
this simply gives us permission to use and redistribute your contributions as
11+
part of the project. Head over to <https://cla.developers.google.com/> to see
12+
your current agreements on file or to sign a new one.
13+
14+
You generally only need to submit a CLA once, so if you've already submitted one
15+
(even if it was for a different project), you probably don't need to do it
16+
again.
17+
18+
## Code reviews
19+
20+
All submissions, including submissions by project members, require review. We
21+
use GitHub pull requests for this purpose. Consult
22+
[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more
23+
information on using pull requests.
24+
25+
## Community Guidelines
26+
27+
This project follows [Google's Open Source Community
28+
Guidelines](https://opensource.google.com/conduct/).
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
5+
---
6+
7+
Thanks for stopping by to let us know something could be better!
8+
9+
**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response.
10+
11+
Please run down the following list and make sure you've tried the usual "quick fixes":
12+
13+
- Search the issues already opened: https://github.com/googleapis/google-auth-library-python/issues
14+
15+
If you are still having issues, please be sure to include as much information as possible:
16+
17+
#### Environment details
18+
19+
- OS:
20+
- Python version:
21+
- pip version:
22+
- `google-auth` version:
23+
24+
#### Steps to reproduce
25+
26+
1. ?
27+
2. ?
28+
29+
Making sure to follow these steps will guarantee the quickest resolution possible.
30+
31+
Thanks!
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this library
4+
5+
---
6+
7+
Thanks for stopping by to let us know something could be better!
8+
9+
**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response.
10+
11+
**Is your feature request related to a problem? Please describe.**
12+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
**Describe alternatives you've considered**
16+
A clear and concise description of any alternative solutions or features you've considered.
17+
**Additional context**
18+
Add any other context or screenshots about the feature request here.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
name: Support request
3+
about: If you have a support contract with Google, please create an issue in the Google Cloud Support console.
4+
5+
---
6+
7+
**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# https://github.com/googleapis/repo-automation-bots/tree/main/packages/sync-repo-settings
2+
# Rules for main branch protection
3+
branchProtectionRules:
4+
# Identifies the protection rule pattern. Name of the branch to be protected.
5+
# Defaults to `main`
6+
- pattern: main
7+
requiresCodeOwnerReviews: true
8+
requiresStrictStatusChecks: true
9+
requiredStatusCheckContexts:
10+
- 'cla/google'
11+
- 'OwlBot Post Processor'
12+
- 'Kokoro system-3.7'
13+
- 'Kokoro'
14+
- 'Samples - Python 3.7'
15+
- 'Samples - Python 3.8'
16+
- 'Samples - Python 3.9'
17+
- 'Samples - Python 3.10'
18+
- 'Samples - Python 3.11'
19+
- 'Samples - Python 3.12'
20+
permissionRules:
21+
- team: actools-python
22+
permission: admin
23+
- team: actools
24+
permission: admin
25+
- team: yoshi-python
26+
permission: push

packages/google-auth/.gitignore

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Build artifacts
2+
*.py[cod]
3+
__pycache__
4+
*.egg-info/
5+
build/
6+
dist/
7+
8+
# Documentation-related
9+
docs/_build
10+
11+
# Test files
12+
.nox/
13+
.tox/
14+
.cache/
15+
.pytest_cache/
16+
cert_path
17+
key_path
18+
19+
# Django test database
20+
db.sqlite3
21+
22+
# Coverage files
23+
.coverage
24+
coverage.xml
25+
*sponge_log.xml
26+
nosetests.xml
27+
htmlcov/
28+
29+
# Files with private / local data
30+
scripts/local_test_setup
31+
tests/data/key.json
32+
tests/data/key.p12
33+
tests/data/user-key.json
34+
system_tests/data/
35+
36+
# PyCharm configuration:
37+
.idea
38+
venv/
39+
40+
# Generated files
41+
pylintrc
42+
pylintrc.test
43+
pytype_output/
44+
45+
.python-version
46+
.DS_Store
47+
cert_path
48+
key_path
49+
env/
50+
.vscode/
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#!/bin/bash
2+
# Copyright 2018 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# https://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
set -eo pipefail
17+
18+
if [[ -z "${PROJECT_ROOT:-}" ]]; then
19+
PROJECT_ROOT="github/google-auth-library-python"
20+
fi
21+
22+
cd "${PROJECT_ROOT}"
23+
24+
# Disable buffering, so that the logs stream through.
25+
export PYTHONUNBUFFERED=1
26+
27+
# Remove old nox
28+
python3 -m pip uninstall --yes --quiet nox-automation
29+
30+
# Install nox
31+
python3 -m pip install nox==2024.10.9
32+
python3 -m nox --version
33+
34+
# Setup service account credentials.
35+
export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-account.json
36+
37+
# Setup project id.
38+
export PROJECT_ID=$(cat "${KOKORO_GFILE_DIR}/project-id.txt")
39+
40+
# Activate gcloud with service account credentials
41+
gcloud auth activate-service-account --key-file=$GOOGLE_APPLICATION_CREDENTIALS
42+
gcloud config set project ${PROJECT_ID}
43+
44+
# Decrypt system test secrets
45+
./scripts/decrypt-secrets.sh
46+
47+
# Run system tests which use a different noxfile
48+
python3 -m nox -f system_tests/noxfile.py

0 commit comments

Comments
 (0)