Skip to content

Commit f4cae20

Browse files
committed
Sync with upstream
2 parents 4d28957 + 96a9391 commit f4cae20

File tree

3,221 files changed

+3370338
-2020580
lines changed

Some content is hidden

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

3,221 files changed

+3370338
-2020580
lines changed
File renamed without changes.

.github/workflows/ci.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
common-check:
11+
name: Check the common code
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- run: make common-check
16+
17+
common-test:
18+
name: Test the common code
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
- run: make common-test
23+
24+
api-check:
25+
name: Check the generated APIs
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v4
29+
- uses: Swatinem/rust-cache@v2
30+
- run: |
31+
make gen-all-api
32+
make cargo-api ARGS=check
33+
make cargo-api ARGS='check --no-default-features'
34+
env:
35+
CI: true
36+
37+
api-test:
38+
name: Test the generated APIs
39+
runs-on: ubuntu-latest
40+
steps:
41+
- uses: actions/checkout@v4
42+
- uses: Swatinem/rust-cache@v2
43+
- run: |
44+
make gen-all-api
45+
make cargo-api ARGS=test
46+
env:
47+
CI: true
48+
49+
api-document:
50+
name: Document the generated APIs
51+
runs-on: ubuntu-latest
52+
steps:
53+
- uses: actions/checkout@v4
54+
- uses: Swatinem/rust-cache@v2
55+
- run: |
56+
make gen-all-api
57+
make cargo-api ARGS=doc
58+
make docs-all
59+
env:
60+
CI: true
61+
RUSTDOCFLAGS: -A warnings
62+
63+
cli-check:
64+
name: Check the generated CLIs
65+
runs-on: ubuntu-latest
66+
steps:
67+
- uses: actions/checkout@v4
68+
- uses: Swatinem/rust-cache@v2
69+
- run: |
70+
make gen-all-api
71+
make gen-all-cli
72+
make cargo-cli ARGS=check
73+
make cargo-cli ARGS='check --no-default-features'
74+
env:
75+
CI: true

.github/workflows/rust.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

.gitignore

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1+
**/Cargo.lock
2+
**/build_html/
3+
**/target/
4+
*.go
5+
.*.deps
16
.DS_Store
2-
/.vscode/
3-
/.idea/
47
.timestamp
5-
gen/doc
6-
*.go
7-
**/target/
8+
/.idea/
9+
/.vscode/
810
gen/**/docs/
9-
**/build_html/
10-
.*.deps
11-
**/Cargo.lock
11+
gen/doc
1212

1313
# Python: Makefile lead dirs
1414
.pyenv-*
@@ -18,43 +18,43 @@ gen/**/docs/
1818
*.sublime-workspace
1919

2020
# Python: Byte-compiled / optimized / DLL files
21-
__pycache__/
22-
*.py[cod]
2321
*$py.class
22+
*.py[cod]
23+
__pycache__/
2424

2525
# Python: Distribution / packaging
26+
*.egg
27+
*.egg-info/
2628
.Python
29+
.eggs/
30+
.installed.cfg
31+
MANIFEST
2732
build/
2833
develop-eggs/
2934
dist/
3035
downloads/
3136
eggs/
32-
.eggs/
3337
parts/
3438
sdist/
3539
var/
3640
wheels/
37-
*.egg-info/
38-
.installed.cfg
39-
*.egg
40-
MANIFEST
4141

4242
# Python: Installer logs
43-
pip-log.txt
4443
pip-delete-this-directory.txt
44+
pip-log.txt
4545

4646
# Python: Unit test / coverage reports
47-
htmlcov/
48-
.tox/
49-
.nox/
47+
*.cover
48+
.cache
5049
.coverage
5150
.coverage.*
52-
.cache
53-
nosetests.xml
54-
coverage.xml
55-
*.cover
5651
.hypothesis/
52+
.nox/
5753
.pytest_cache/
54+
.tox/
55+
coverage.xml
56+
htmlcov/
57+
nosetests.xml
5858

5959
# Python: pyenv
6060
.python-version

.pre-commit-config.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
exclude: etc/api|gen/
2+
repos:
3+
- repo: https://github.com/pre-commit/pre-commit-hooks
4+
rev: v4.6.0
5+
hooks:
6+
- id: check-yaml
7+
# This seems to fail on CHANGELOG.md, which is generated and shouldn't be checked.
8+
# - id: trailing-whitespace
9+
- repo: https://github.com/psf/black
10+
rev: 24.8.0
11+
hooks:
12+
- id: black

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[workspace]
2-
2+
resolver = "2"
33
members = [
44
"google-apis-common",
55
"google-clis-common",
66
"src/rust/preproc"
77
]
8-
exclude = ["gen"]
8+
exclude = ["gen"]

LICENSE-APACHE

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,4 +199,3 @@
199199
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200200
See the License for the specific language governing permissions and
201201
limitations under the License.
202-

Makefile

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ PYTHON_BIN := $(VENV_DIR)/bin/python
1010
PYTHON := . $(VENV_DIR)/bin/activate; python
1111
PYTEST := $(PYTHON) -m pytest
1212

13-
MAKO_RENDER := etc/bin/mako-render
13+
MAKO_RENDER := etc/bin/mako-render.py
1414
API_VERSION_GEN := etc/bin/api_version_to_yaml.py
1515
SORT_JSON_FILE := etc/bin/sort_json_file.py
1616
TPL := $(PYTHON) $(MAKO_RENDER)
@@ -61,14 +61,14 @@ help:
6161
$(info help - print this help)
6262

6363
$(PREPROC): $(PREPROC_DIR)/src/main.rs
64-
cd "$(PREPROC_DIR)" && cargo build --release
64+
cd "$(PREPROC_DIR)" && cargo build --release
6565

6666
$(VENV_BIN):
67-
python3 -m pip install --user virtualenv==$(VENV_VERSION)
67+
python -m pip install --user virtualenv==$(VENV_VERSION)
6868
touch $@
6969

7070
$(PYTHON_BIN): $(VENV_BIN) requirements.txt
71-
python3 -m venv $(VENV_DIR)
71+
python -m venv $(VENV_DIR)
7272
$@ -m pip install -r requirements.txt
7373

7474
$(MAKO_RENDER): $(PYTHON_BIN) $(wildcard $(GEN_LIB_SRC)/*)
@@ -93,10 +93,21 @@ license: LICENSE.md
9393

9494
regen-apis: | clean-all-api clean-all-cli gen-all-api gen-all-cli license
9595

96-
test-gen: $(PYTHON_BIN)
97-
export PYTEST_DISABLE_PLUGIN_AUTOLOAD=1; $(PYTEST) src
96+
common-test: common-test-python common-test-rust
9897

99-
test: test-gen
98+
common-test-python: $(PYTHON_BIN)
99+
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 $(PYTEST) src
100+
101+
common-test-rust:
102+
cargo test
103+
104+
common-check: common-check-python common-check-rust
105+
106+
common-check-python: $(PYTHON_BIN)
107+
$(VENV_DIR)/bin/pre-commit run --all-files --show-diff-on-failure
108+
109+
common-check-rust:
110+
cargo clippy -- -D warnings
100111

101112
typecheck: $(PYTHON_BIN)
102113
$(PYTHON) -m pyright $(GEN_LIB_SRC)

apis.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4027,6 +4027,21 @@
40274027
"documentationLink": "https://developers.google.com/people/",
40284028
"preferred": true
40294029
},
4030+
{
4031+
"kind": "discovery#directoryItem",
4032+
"id": "places:v1",
4033+
"name": "places",
4034+
"version": "v1",
4035+
"title": "Places API (New)",
4036+
"description": "",
4037+
"discoveryRestUrl": "https://places.googleapis.com/$discovery/rest?version=v1",
4038+
"icons": {
4039+
"x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png",
4040+
"x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png"
4041+
},
4042+
"documentationLink": "https://mapsplatform.google.com/maps-products/#places-section",
4043+
"preferred": true
4044+
},
40304045
{
40314046
"kind": "discovery#directoryItem",
40324047
"id": "playcustomapp:v1",

etc/api/abusiveexperiencereport/v1/crates/6.0.0-api+20240610

Whitespace-only changes.

0 commit comments

Comments
 (0)