Skip to content

Commit f151098

Browse files
authored
chore(migration): Migrate code from googleapis/python-cloud-common into packages/google-cloud-common (googleapis#11892)
See googleapis#10999. This PR should be merged with a merge-commit, not a squash-commit, in order to preserve the git history.
2 parents e0a1768 + 52845f4 commit f151098

60 files changed

Lines changed: 2833 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Copyright 2021 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
16+
deep-remove-regex:
17+
- /owl-bot-staging
18+
19+
deep-copy-regex:
20+
- source: /google/cloud/common/(.*-py)
21+
dest: /owl-bot-staging/google-cloud-common/$1
22+
23+
begin-after-commit-hash: 70f7f0525414fe4dfeb2fc2e81546b073f83a621
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[run]
2+
branch = True
3+
4+
[report]
5+
show_missing = True
6+
omit =
7+
google/cloud/common/__init__.py
8+
google/cloud/common/gapic_version.py
9+
exclude_lines =
10+
# Re-enable the standard pragma
11+
pragma: NO COVER
12+
# Ignore debug-only repr
13+
def __repr__
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# Copyright 2023 Google LLC
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
# Generated by synthtool. DO NOT EDIT!
18+
[flake8]
19+
ignore = E203, E231, E266, E501, W503
20+
exclude =
21+
# Exclude generated code.
22+
**/proto/**
23+
**/gapic/**
24+
**/services/**
25+
**/types/**
26+
*_pb2.py
27+
28+
# Standard linting exemptions.
29+
**/.nox/**
30+
__pycache__,
31+
.git,
32+
*.pyc,
33+
conf.py
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
*.py[cod]
2+
*.sw[op]
3+
4+
# C extensions
5+
*.so
6+
7+
# Packages
8+
*.egg
9+
*.egg-info
10+
dist
11+
build
12+
eggs
13+
.eggs
14+
parts
15+
bin
16+
var
17+
sdist
18+
develop-eggs
19+
.installed.cfg
20+
lib
21+
lib64
22+
__pycache__
23+
24+
# Installer logs
25+
pip-log.txt
26+
27+
# Unit test / coverage reports
28+
.coverage
29+
.nox
30+
.cache
31+
.pytest_cache
32+
33+
34+
# Mac
35+
.DS_Store
36+
37+
# JetBrains
38+
.idea
39+
40+
# VS Code
41+
.vscode
42+
43+
# emacs
44+
*~
45+
46+
# Built documentation
47+
docs/_build
48+
bigquery/docs/generated
49+
docs.metadata
50+
51+
# Virtual environment
52+
env/
53+
54+
# Test logs
55+
coverage.xml
56+
*sponge_log.xml
57+
58+
# System test environment variables.
59+
system_tests/local_test_setup
60+
61+
# Make sure a generated file isn't accidentally committed.
62+
pylintrc
63+
pylintrc.test
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Copyright 2023 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
15+
# See https://pre-commit.com for more information
16+
# See https://pre-commit.com/hooks.html for more hooks
17+
repos:
18+
- repo: https://github.com/pre-commit/pre-commit-hooks
19+
rev: v4.0.1
20+
hooks:
21+
- id: trailing-whitespace
22+
- id: end-of-file-fixer
23+
- id: check-yaml
24+
- repo: https://github.com/psf/black
25+
rev: 23.7.0
26+
hooks:
27+
- id: black
28+
- repo: https://github.com/pycqa/flake8
29+
rev: 6.1.0
30+
hooks:
31+
- id: flake8
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "1.2.0"
3+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "common",
3+
"name_pretty": "Google Cloud Common",
4+
"product_documentation" : "https://cloud.google.com",
5+
"client_documentation": "https://cloud.google.com/python/docs/reference/common/latest",
6+
"issue_tracker": "",
7+
"release_level": "stable",
8+
"language": "python",
9+
"library_type": "CORE",
10+
"repo": "googleapis/python-cloud-common",
11+
"distribution_name": "google-cloud-common",
12+
"default_version": "apiVersion",
13+
"codeowner_team": "",
14+
"api_description": "This package contains generated Python types for google.cloud.common"
15+
}
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# Changelog
2+
3+
## [1.2.0](https://github.com/googleapis/python-cloud-common/compare/v1.1.0...v1.2.0) (2023-01-10)
4+
5+
6+
### Features
7+
8+
* Add support for python 3.11 ([#100](https://github.com/googleapis/python-cloud-common/issues/100)) ([6ddb9f8](https://github.com/googleapis/python-cloud-common/commit/6ddb9f89dbebda57e491a0dcefdff22c0497cca3))
9+
10+
## [1.1.0](https://github.com/googleapis/python-cloud-common/compare/v1.0.6...v1.1.0) (2022-12-15)
11+
12+
13+
### Features
14+
15+
* Add support for `google.cloud.common.__version__` ([0d9d45f](https://github.com/googleapis/python-cloud-common/commit/0d9d45f96fa52e70d16ef9488b3548e5e7f8bb05))
16+
17+
18+
### Bug Fixes
19+
20+
* **deps:** Require google-api-core >=1.34.0, >=2.11.0 ([#97](https://github.com/googleapis/python-cloud-common/issues/97)) ([6464998](https://github.com/googleapis/python-cloud-common/commit/6464998254db8e37b866211700e168b6cd382766))
21+
22+
## [1.0.6](https://github.com/googleapis/python-cloud-common/compare/v1.0.5...v1.0.6) (2022-10-07)
23+
24+
25+
### Bug Fixes
26+
27+
* **deps:** Allow protobuf 3.19.5 ([#89](https://github.com/googleapis/python-cloud-common/issues/89)) ([4bb2dfb](https://github.com/googleapis/python-cloud-common/commit/4bb2dfbc93efaf63a771b996d1fb2dd648571089))
28+
29+
## [1.0.5](https://github.com/googleapis/python-cloud-common/compare/v1.0.4...v1.0.5) (2022-09-29)
30+
31+
32+
### Bug Fixes
33+
34+
* **deps:** Require protobuf >= 3.20.2 ([#87](https://github.com/googleapis/python-cloud-common/issues/87)) ([4430802](https://github.com/googleapis/python-cloud-common/commit/44308020a0db1c0cc4853c827426de7ee4c2ee4f))
35+
36+
## [1.0.4](https://github.com/googleapis/python-cloud-common/compare/v1.0.3...v1.0.4) (2022-08-11)
37+
38+
39+
### Bug Fixes
40+
41+
* **deps:** allow protobuf < 5.0.0 ([#73](https://github.com/googleapis/python-cloud-common/issues/73)) ([eb28a57](https://github.com/googleapis/python-cloud-common/commit/eb28a5768eaeae2aeeb8c295f146065981a1ebf4))
42+
* **deps:** require proto-plus >= 1.22.0 ([eb28a57](https://github.com/googleapis/python-cloud-common/commit/eb28a5768eaeae2aeeb8c295f146065981a1ebf4))
43+
44+
## [1.0.3](https://github.com/googleapis/python-cloud-common/compare/v1.0.2...v1.0.3) (2022-07-16)
45+
46+
47+
### Bug Fixes
48+
49+
* require python 3.7+ ([#67](https://github.com/googleapis/python-cloud-common/issues/67)) ([8f65b92](https://github.com/googleapis/python-cloud-common/commit/8f65b92e81f7c3e3341a6ccdadbb10cdeecdd872))
50+
51+
## [1.0.2](https://github.com/googleapis/python-cloud-common/compare/v1.0.1...v1.0.2) (2022-06-03)
52+
53+
54+
### Bug Fixes
55+
56+
* **deps:** drop dependency packaging ([170234d](https://github.com/googleapis/python-cloud-common/commit/170234db68e087ecbcd5ff22176635e397c11f9a))
57+
* **deps:** require protobuf <4.0.0dev ([#58](https://github.com/googleapis/python-cloud-common/issues/58)) ([170234d](https://github.com/googleapis/python-cloud-common/commit/170234db68e087ecbcd5ff22176635e397c11f9a))
58+
59+
## [1.0.1](https://github.com/googleapis/python-cloud-common/compare/v1.0.0...v1.0.1) (2022-03-05)
60+
61+
62+
### Bug Fixes
63+
64+
* **deps:** require google-api-core>=1.31.5, >=2.3.2 ([#38](https://github.com/googleapis/python-cloud-common/issues/38)) ([756847f](https://github.com/googleapis/python-cloud-common/commit/756847fc408db91a42738f2253a96f9132f886e8))
65+
66+
## [1.0.0](https://www.github.com/googleapis/python-cloud-common/compare/v0.2.0...v1.0.0) (2021-11-03)
67+
68+
69+
### Features
70+
71+
* bump release level to production/stable ([#4](https://www.github.com/googleapis/python-cloud-common/issues/4)) ([a83cb9d](https://www.github.com/googleapis/python-cloud-common/commit/a83cb9df15dbe381a7180abe26eea30e8ec3a281))
72+
73+
## [0.2.0](https://www.github.com/googleapis/python-cloud-common/compare/v0.1.0...v0.2.0) (2021-10-08)
74+
75+
76+
### Features
77+
78+
* add context manager support in client ([#8](https://www.github.com/googleapis/python-cloud-common/issues/8)) ([6bed942](https://www.github.com/googleapis/python-cloud-common/commit/6bed942cce256f2ae0624c09563b8833263cc46d))
79+
80+
## 0.1.0 (2021-10-01)
81+
82+
83+
### Features
84+
85+
* generate google.cloud.common ([61b5082](https://www.github.com/googleapis/python-cloud-common/commit/61b5082fcb5a48cc1006e01102f35ec9730e0f14))
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
<!-- # Generated by synthtool. DO NOT EDIT! !-->
2+
# Code of Conduct
3+
4+
## Our Pledge
5+
6+
In the interest of fostering an open and welcoming environment, we as
7+
contributors and maintainers pledge to making participation in our project and
8+
our community a harassment-free experience for everyone, regardless of age, body
9+
size, disability, ethnicity, gender identity and expression, level of
10+
experience, education, socio-economic status, nationality, personal appearance,
11+
race, religion, or sexual identity and orientation.
12+
13+
## Our Standards
14+
15+
Examples of behavior that contributes to creating a positive environment
16+
include:
17+
18+
* Using welcoming and inclusive language
19+
* Being respectful of differing viewpoints and experiences
20+
* Gracefully accepting constructive criticism
21+
* Focusing on what is best for the community
22+
* Showing empathy towards other community members
23+
24+
Examples of unacceptable behavior by participants include:
25+
26+
* The use of sexualized language or imagery and unwelcome sexual attention or
27+
advances
28+
* Trolling, insulting/derogatory comments, and personal or political attacks
29+
* Public or private harassment
30+
* Publishing others' private information, such as a physical or electronic
31+
address, without explicit permission
32+
* Other conduct which could reasonably be considered inappropriate in a
33+
professional setting
34+
35+
## Our Responsibilities
36+
37+
Project maintainers are responsible for clarifying the standards of acceptable
38+
behavior and are expected to take appropriate and fair corrective action in
39+
response to any instances of unacceptable behavior.
40+
41+
Project maintainers have the right and responsibility to remove, edit, or reject
42+
comments, commits, code, wiki edits, issues, and other contributions that are
43+
not aligned to this Code of Conduct, or to ban temporarily or permanently any
44+
contributor for other behaviors that they deem inappropriate, threatening,
45+
offensive, or harmful.
46+
47+
## Scope
48+
49+
This Code of Conduct applies both within project spaces and in public spaces
50+
when an individual is representing the project or its community. Examples of
51+
representing a project or community include using an official project e-mail
52+
address, posting via an official social media account, or acting as an appointed
53+
representative at an online or offline event. Representation of a project may be
54+
further defined and clarified by project maintainers.
55+
56+
This Code of Conduct also applies outside the project spaces when the Project
57+
Steward has a reasonable belief that an individual's behavior may have a
58+
negative impact on the project or its community.
59+
60+
## Conflict Resolution
61+
62+
We do not believe that all conflict is bad; healthy debate and disagreement
63+
often yield positive results. However, it is never okay to be disrespectful or
64+
to engage in behavior that violates the project’s code of conduct.
65+
66+
If you see someone violating the code of conduct, you are encouraged to address
67+
the behavior directly with those involved. Many issues can be resolved quickly
68+
and easily, and this gives people more control over the outcome of their
69+
dispute. If you are unable to resolve the matter for any reason, or if the
70+
behavior is threatening or harassing, report it. We are dedicated to providing
71+
an environment where participants feel welcome and safe.
72+
73+
74+
Reports should be directed to *googleapis-stewards@google.com*, the
75+
Project Steward(s) for *Google Cloud Client Libraries*. It is the Project Steward’s duty to
76+
receive and address reported violations of the code of conduct. They will then
77+
work with a committee consisting of representatives from the Open Source
78+
Programs Office and the Google Open Source Strategy team. If for any reason you
79+
are uncomfortable reaching out to the Project Steward, please email
80+
opensource@google.com.
81+
82+
We will investigate every complaint, but you may not receive a direct response.
83+
We will use our discretion in determining when and how to follow up on reported
84+
incidents, which may range from not taking action to permanent expulsion from
85+
the project and project-sponsored spaces. We will notify the accused of the
86+
report and provide them an opportunity to discuss it before any action is taken.
87+
The identity of the reporter will be omitted from the details of the report
88+
supplied to the accused. In potentially harmful situations, such as ongoing
89+
harassment or threats to anyone's safety, we may take action without notice.
90+
91+
## Attribution
92+
93+
This Code of Conduct is adapted from the Contributor Covenant, version 1.4,
94+
available at
95+
https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

0 commit comments

Comments
 (0)