Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 0 additions & 1 deletion librarian.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ libraries:
issue_tracker_override: https://issuetracker.google.com/issues?q=componentid:190851%2B%20status:open
- name: gapic-generator
version: 1.30.14
skip_generate: true
python:
library_type: CORE
name_pretty_override: Google API Client Generator for Python
Expand Down
15 changes: 6 additions & 9 deletions packages/gapic-generator/.repo-metadata.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
{
"name": "gapic-generator",
"name_pretty": "Google API Client Generator for Python",
"client_documentation": "https://gapic-generator-python.readthedocs.io/en/stable/",
"product_documentation": "",
"distribution_name": "gapic-generator",
"issue_tracker": "https://github.com/googleapis/google-cloud-python/issues",
"release_level": "stable",
"language": "python",
"library_type": "CORE",
"repo": "googleapis/google-cloud-python",
"distribution_name": "gapic-generator",
"default_version": "",
"codeowner_team": "@googleapis/cloud-sdk-python-team"
}
"name": "gapic-generator",
"name_pretty": "Google API Client Generator for Python",
"release_level": "stable",
"repo": "googleapis/google-cloud-python"
}
1 change: 0 additions & 1 deletion packages/gapic-generator/gapic/cli/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import typing

import click

from google.protobuf.compiler import plugin_pb2

from gapic import generator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
import inflection
import libcst

from gapic.configurable_snippetgen import libcst_utils
from gapic.configurable_snippetgen import snippet_config_language_pb2
from gapic.configurable_snippetgen import libcst_utils, snippet_config_language_pb2
from gapic.schema import api


Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion packages/gapic-generator/gapic/generator/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,4 @@

from .generator import Generator


__all__ = ("Generator",)
24 changes: 13 additions & 11 deletions packages/gapic-generator/gapic/generator/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,31 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import jinja2
import yaml
import itertools
import re
import os
import pathlib
import re
import typing
from typing import Any, DefaultDict, Dict, Mapping, Optional, Tuple
from hashlib import sha256
from collections import OrderedDict, defaultdict
from hashlib import sha256
from typing import Any, DefaultDict, Dict, Mapping, Optional, Tuple

import jinja2
import yaml
from google.protobuf.compiler.plugin_pb2 import CodeGeneratorResponse

from gapic import utils
from gapic.generator import formatter
from gapic.samplegen import manifest, samplegen
from gapic.samplegen_utils import snippet_index, snippet_metadata_pb2
from gapic.samplegen_utils.types import DuplicateSample
from gapic.samplegen_utils.utils import (
coerce_response_name,
is_valid_sample_cfg,
render_format_string,
)
from gapic.samplegen_utils.types import DuplicateSample
from gapic.samplegen_utils import snippet_index, snippet_metadata_pb2
from gapic.samplegen import manifest, samplegen
from gapic.generator import formatter
from gapic.schema import api
from gapic import utils
from gapic.utils import Options
from google.protobuf.compiler.plugin_pb2 import CodeGeneratorResponse


class Generator:
Expand Down
3 changes: 1 addition & 2 deletions packages/gapic-generator/gapic/samplegen/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from gapic.samplegen import samplegen
from gapic.samplegen import manifest
from gapic.samplegen import manifest, samplegen

__all__ = (
"manifest",
Expand Down
21 changes: 10 additions & 11 deletions packages/gapic-generator/gapic/samplegen/samplegen.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,13 @@

import dataclasses
import itertools
import jinja2
import json
import keyword
import os
import re
import time
import yaml

from gapic import utils

from gapic.samplegen_utils import types, snippet_metadata_pb2 # type: ignore
from gapic.samplegen_utils.utils import is_valid_sample_cfg
from gapic.schema import api
from gapic.schema import wrappers

from collections import defaultdict, namedtuple, ChainMap as chainmap
from collections import ChainMap as chainmap
from collections import defaultdict, namedtuple
from typing import (
Any,
ChainMap,
Expand All @@ -43,10 +34,18 @@
Tuple,
)

import jinja2
import yaml

# There is no library stub file for this module, so ignore it.
from google.api import resource_pb2 # type: ignore
from google.protobuf import descriptor_pb2

from gapic import utils
from gapic.samplegen_utils import snippet_metadata_pb2, types # type: ignore
from gapic.samplegen_utils.utils import is_valid_sample_cfg
from gapic.schema import api, wrappers

# Outstanding issues:
# * In real sample configs, many variables are
# defined with an _implicit_ $resp variable.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@
# limitations under the License.

import re
from typing import Optional, Dict
from typing import Dict, Optional

from google.protobuf import json_format

from gapic.samplegen_utils import (
snippet_metadata_pb2, # type: ignore
types,
)
from gapic.schema import api, metadata
from gapic.samplegen_utils import snippet_metadata_pb2 # type: ignore
from gapic.samplegen_utils import types


CLIENT_INIT_RE = re.compile(r"^\s+# Create a client")
REQUEST_INIT_RE = re.compile(r"^\s+# Initialize request argument\(s\)")
Expand Down
Loading
Loading