Skip to content

Commit

Permalink
build: use new nox, add kokoro, remove samples directory (#144)
Browse files Browse the repository at this point in the history
  • Loading branch information
busunkim96 authored Oct 11, 2019
1 parent 61fbc38 commit b1d7866
Show file tree
Hide file tree
Showing 71 changed files with 888 additions and 3,612 deletions.
186 changes: 0 additions & 186 deletions packages/google-cloud-dialogflow/.circleci/config.yml

This file was deleted.

Binary file not shown.
12 changes: 9 additions & 3 deletions packages/google-cloud-dialogflow/.coveragerc
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
# Generated by synthtool. DO NOT EDIT!
[run]
branch = True
omit =
*/proto/*

[report]
fail_under = 80
fail_under = 100
show_missing = True
exclude_lines =
# Re-enable the standard pragma
pragma: NO COVER
# Ignore debug-only repr
def __repr__
# Ignore abstract methods
raise NotImplementedError
omit =
*/gapic/*.py
*/proto/*.py
*/core/*.py
*/site-packages/*.py
9 changes: 8 additions & 1 deletion packages/google-cloud-dialogflow/.flake8
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
# Generated by synthtool. DO NOT EDIT!
[flake8]
ignore = E203, E266, E501, W503
exclude =
# Exclude generated code.
**/proto/**
**/gapic/**
*_pb2.py

# Standard linting exemptions.
__pycache__,
.nox
.git,
*.pyc,
conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,30 @@ Thanks for stopping by to let us know something could be better!
Please run down the following list and make sure you've tried the usual "quick fixes":

- Search the issues already opened: https://github.com/googleapis/dialogflow-python-client-v2/issues
- Check for answers on StackOverflow: http://stackoverflow.com/questions/

If you are still having issues, please be sure to include as much information as possible:

#### Environment details

- OS:
- Python version:
- pip version:
- `dialogflow` version:
1. OS type and version
2. Python version and virtual environment information: `python --version`
3. dialogflow version: `pip show dialogflow` or `pip freeze`

#### Steps to reproduce

1. ?
2. ?

#### Code example

```python
# example
```

#### Stack trace
```
# example
```

Making sure to follow these steps will guarantee the quickest resolution possible.

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
releaseType: python
40 changes: 40 additions & 0 deletions packages/google-cloud-dialogflow/.kokoro/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/bin/bash

# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.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.

set -eo pipefail

cd github/dialogflow-python-client-v2

# Disable buffering, so that the logs stream through.
export PYTHONUNBUFFERED=1

# Debug: show build environment
env | grep KOKORO

# Setup service account credentials.
export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-account.json

# Setup project id.
export PROJECT_ID=$(cat "${KOKORO_GFILE_DIR}/project-id.json")

# Remove old nox
python3.6 -m pip uninstall --yes --quiet nox-automation

# Install nox
python3.6 -m pip install --upgrade --quiet nox
python3.6 -m nox --version

python3.6 -m nox
27 changes: 27 additions & 0 deletions packages/google-cloud-dialogflow/.kokoro/continuous/common.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Build logs will be here
action {
define_artifacts {
regex: "**/*sponge_log.xml"
}
}

# Download trampoline resources.
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"

# Download resources for system tests (service account key, etc.)
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-python"

# Use the trampoline script to run in docker.
build_file: "dialogflow-python-client-v2/.kokoro/trampoline.sh"

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/python-multi"
}
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/dialogflow-python-client-v2/.kokoro/build.sh"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Format: //devtools/kokoro/config/proto/build.proto
48 changes: 48 additions & 0 deletions packages/google-cloud-dialogflow/.kokoro/docs/common.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Build logs will be here
action {
define_artifacts {
regex: "**/*sponge_log.xml"
}
}

# Download trampoline resources.
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"

# Use the trampoline script to run in docker.
build_file: "dialogflow-python-client-v2/.kokoro/trampoline.sh"

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/python-multi"
}
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/dialogflow-python-client-v2/.kokoro/publish-docs.sh"
}

env_vars: {
key: "STAGING_BUCKET"
value: "docs-staging"
}

# Fetch the token needed for reporting release status to GitHub
before_action {
fetch_keystore {
keystore_resource {
keystore_config_id: 73713
keyname: "yoshi-automation-github-key"
}
}
}

before_action {
fetch_keystore {
keystore_resource {
keystore_config_id: 73713
keyname: "docuploader_service_account"
}
}
}
1 change: 1 addition & 0 deletions packages/google-cloud-dialogflow/.kokoro/docs/docs.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Format: //devtools/kokoro/config/proto/build.proto
Loading

0 comments on commit b1d7866

Please sign in to comment.