Пример #1
0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""This script is used to synthesize generated parts of this library."""

import os
import synthtool as s
import synthtool.gcp as gcp
import logging

logging.basicConfig(level=logging.DEBUG)

gapic = gcp.GAPICGenerator()
common = gcp.CommonTemplates()

library = gapic.php_library(
    service='automl',
    version='v1beta1',
    config_path='/google/cloud/automl/artman_automl_v1beta1.yaml',
    artman_output_name='google-cloud-automl-v1beta1')

# copy all src including partial veneer classes
s.move(library / 'src')

# copy proto files to src also
s.move(library / 'proto/src/Google/Cloud/AutoMl', 'src/')
s.move(library / 'tests/')

# copy GPBMetadata file to metadata
Пример #2
0
  "const version",
  "// tslint:disable deprecation\n\nconst version",
  1
)

os.rename("dev/.gitignore", ".gitignore")
os.rename("dev/.eslintignore", ".eslintignore")
os.rename("dev/.mocharc.js", ".mocharc.js")
os.rename("dev/.jsdoc.js", ".jsdoc.js")
os.rename("dev/.prettierrc.js", ".prettierrc.js")
os.unlink("dev/.eslintrc.json")

s.replace(".jsdoc.js", "protos", "build/protos", 1)

# Copy template files
common_templates = gcp.CommonTemplates()
templates = common_templates.node_library(
    source_location="build/src", test_project="node-gcloud-ci"
)

s.copy(templates, excludes=[".eslintrc.json", ".kokoro/**/*"])

# Remove auto-generated packaging tests
os.system('rm -rf dev/system-test/fixtures dev/system-test/install.ts')

node.install()
node.fix()
os.chdir("dev")
node.compile_protos()
os.chdir("protos")
os.unlink('protos.js')
Пример #3
0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""This script is used to synthesize generated parts of this library."""

import re
import textwrap

import synthtool as s
from synthtool import gcp

gapic = gcp.GAPICGenerator()
common = gcp.CommonTemplates()
version = "v1"

# ----------------------------------------------------------------------------
# Generate pubsub GAPIC layer
# ----------------------------------------------------------------------------
library = gapic.py_library(
    "pubsub",
    version,
    config_path="/google/pubsub/artman_pubsub.yaml",
    include_protos=True,
)
s.move(
    library,
    excludes=[
        "docs/**/*",
Пример #4
0
gapic = gcp.GAPICGenerator()

v1beta1_library = gapic.ruby_library(
    'scheduler',
    'v1beta1',
    config_path='artman_cloudscheduler_v1beta1.yaml',
    artman_output_name='google-cloud-ruby/google-cloud-cloudscheduler',
)

s.copy(v1beta1_library / 'lib/google/cloud/scheduler/v1beta1')
s.copy(v1beta1_library / 'lib/google/cloud/scheduler/v1beta1.rb')
s.copy(v1beta1_library / 'test/google/cloud/scheduler/v1beta1')

# Copy common templates
templates = gcp.CommonTemplates().ruby_library()
s.copy(templates)

v1_library = gapic.ruby_library(
    'scheduler',
    'v1',
    config_path='artman_cloudscheduler_v1.yaml',
    artman_output_name='google-cloud-ruby/google-cloud-cloudscheduler',
)

s.copy(v1_library / 'lib/google/cloud/scheduler/v1')
s.copy(v1_library / 'lib/google/cloud/scheduler/v1.rb')
s.copy(v1_library / 'lib/google/cloud/scheduler.rb')
s.copy(v1_library / 'test/google/cloud/scheduler/v1')
s.copy(v1_library / 'README.md')
s.copy(v1_library / 'LICENSE')
Пример #5
0
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""This script is used to synthesize generated parts of this library."""

import re
import textwrap

import synthtool as s
from synthtool import gcp
from synthtool.languages import python

gapic = gcp.GAPICBazel()
common = gcp.CommonTemplates()
version = "v1"

# ----------------------------------------------------------------------------
# Generate pubsub GAPIC layer
# ----------------------------------------------------------------------------
library = gapic.py_library(
    service="pubsub",
    version=version,
    bazel_target="//google/pubsub/v1:pubsub-v1-py",
    include_protos=True,
)
s.move(
    library,
    excludes=[
        "docs/**/*",