Skip to content
This repository has been archived by the owner on Dec 17, 2023. It is now read-only.

Commit

Permalink
feat!: use microgenerator (#239)
Browse files Browse the repository at this point in the history
See UPGRADING.md for a list of changes.
  • Loading branch information
busunkim96 committed Dec 14, 2020
1 parent 92e6d43 commit 57c90a5
Show file tree
Hide file tree
Showing 373 changed files with 92,889 additions and 65,186 deletions.
16 changes: 6 additions & 10 deletions .coveragerc
Expand Up @@ -17,22 +17,18 @@
# Generated by synthtool. DO NOT EDIT!
[run]
branch = True
omit =
google/cloud/__init__.py

[report]
fail_under = 100
show_missing = True
omit = google/cloud/dialogflow/__init__.py
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
google/cloud/__init__.py
# Ignore pkg_resources exceptions.
# This is added at the module level as a safeguard for if someone
# generates the code and tries to run it without pip installing. This
# makes it virtually impossible to test properly.
except pkg_resources.DistributionNotFound
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Expand Up @@ -10,7 +10,7 @@ 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
- Search the issues already opened: https://github.com/googleapis/python-dialogflow/issues
- Search StackOverflow: https://stackoverflow.com/questions/tagged/google-cloud-platform+python

If you are still having issues, please be sure to include as much information as possible:
Expand All @@ -20,7 +20,7 @@ If you are still having issues, please be sure to include as much information as
- OS type and version:
- Python version: `python --version`
- pip version: `pip --version`
- `dialogflow` version: `pip show dialogflow`
- `google-cloud-dialogflow` version: `pip show google-cloud-dialogflow`

#### Steps to reproduce

Expand Down
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
@@ -1,5 +1,5 @@
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
- [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/dialogflow-python-client-v2/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
- [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/python-dialogflow/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
- [ ] Ensure the tests and linter pass
- [ ] Code coverage does not decrease (if any source code was changed)
- [ ] Appropriate docs were updated (if necessary)
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/build.sh
Expand Up @@ -15,7 +15,7 @@

set -eo pipefail

cd github/dialogflow-python-client-v2
cd github/python-dialogflow

# Disable buffering, so that the logs stream through.
export PYTHONUNBUFFERED=1
Expand Down
4 changes: 2 additions & 2 deletions .kokoro/continuous/common.cfg
Expand Up @@ -14,7 +14,7 @@ gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
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"
build_file: "python-dialogflow/.kokoro/trampoline.sh"

# Configure the docker image for kokoro-trampoline.
env_vars: {
Expand All @@ -23,5 +23,5 @@ env_vars: {
}
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/dialogflow-python-client-v2/.kokoro/build.sh"
value: "github/python-dialogflow/.kokoro/build.sh"
}
4 changes: 2 additions & 2 deletions .kokoro/docs/common.cfg
Expand Up @@ -11,7 +11,7 @@ action {
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"

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

# Configure the docker image for kokoro-trampoline.
env_vars: {
Expand All @@ -20,7 +20,7 @@ env_vars: {
}
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/dialogflow-python-client-v2/.kokoro/publish-docs.sh"
value: "github/python-dialogflow/.kokoro/publish-docs.sh"
}

env_vars: {
Expand Down
4 changes: 2 additions & 2 deletions .kokoro/presubmit/common.cfg
Expand Up @@ -14,7 +14,7 @@ gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
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"
build_file: "python-dialogflow/.kokoro/trampoline.sh"

# Configure the docker image for kokoro-trampoline.
env_vars: {
Expand All @@ -23,5 +23,5 @@ env_vars: {
}
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/dialogflow-python-client-v2/.kokoro/build.sh"
value: "github/python-dialogflow/.kokoro/build.sh"
}
2 changes: 1 addition & 1 deletion .kokoro/release.sh
Expand Up @@ -27,6 +27,6 @@ export PYTHONUNBUFFERED=1

# Move into the package, build the distribution and upload.
TWINE_PASSWORD=$(cat "${KOKORO_KEYSTORE_DIR}/73713_google_cloud_pypi_password")
cd github/dialogflow-python-client-v2
cd github/python-dialogflow
python3 setup.py sdist bdist_wheel
twine upload --username gcloudpypi --password "${TWINE_PASSWORD}" dist/*
4 changes: 2 additions & 2 deletions .kokoro/release/common.cfg
Expand Up @@ -11,7 +11,7 @@ action {
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"
build_file: "python-dialogflow/.kokoro/trampoline.sh"

# Configure the docker image for kokoro-trampoline.
env_vars: {
Expand All @@ -20,7 +20,7 @@ env_vars: {
}
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/dialogflow-python-client-v2/.kokoro/release.sh"
value: "github/python-dialogflow/.kokoro/release.sh"
}

# Fetch PyPI password
Expand Down
4 changes: 2 additions & 2 deletions .kokoro/samples/lint/common.cfg
Expand Up @@ -15,7 +15,7 @@ env_vars: {

env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/dialogflow-python-client-v2/.kokoro/test-samples.sh"
value: "github/python-dialogflow/.kokoro/test-samples.sh"
}

# Configure the docker image for kokoro-trampoline.
Expand All @@ -31,4 +31,4 @@ gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples"
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"
build_file: "python-dialogflow/.kokoro/trampoline.sh"
4 changes: 2 additions & 2 deletions .kokoro/samples/python3.6/common.cfg
Expand Up @@ -21,7 +21,7 @@ env_vars: {

env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/dialogflow-python-client-v2/.kokoro/test-samples.sh"
value: "github/python-dialogflow/.kokoro/test-samples.sh"
}

# Configure the docker image for kokoro-trampoline.
Expand All @@ -37,4 +37,4 @@ gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples"
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"
build_file: "python-dialogflow/.kokoro/trampoline.sh"
4 changes: 2 additions & 2 deletions .kokoro/samples/python3.7/common.cfg
Expand Up @@ -21,7 +21,7 @@ env_vars: {

env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/dialogflow-python-client-v2/.kokoro/test-samples.sh"
value: "github/python-dialogflow/.kokoro/test-samples.sh"
}

# Configure the docker image for kokoro-trampoline.
Expand All @@ -37,4 +37,4 @@ gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples"
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"
build_file: "python-dialogflow/.kokoro/trampoline.sh"
4 changes: 2 additions & 2 deletions .kokoro/samples/python3.8/common.cfg
Expand Up @@ -21,7 +21,7 @@ env_vars: {

env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/dialogflow-python-client-v2/.kokoro/test-samples.sh"
value: "github/python-dialogflow/.kokoro/test-samples.sh"
}

# Configure the docker image for kokoro-trampoline.
Expand All @@ -37,4 +37,4 @@ gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples"
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"
build_file: "python-dialogflow/.kokoro/trampoline.sh"
2 changes: 1 addition & 1 deletion .kokoro/test-samples.sh
Expand Up @@ -20,7 +20,7 @@ set -eo pipefail
# Enables `**` to include files nested inside sub-folders
shopt -s globstar

cd github/dialogflow-python-client-v2
cd github/python-dialogflow

# Run periodic samples tests at latest release
if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"periodic"* ]]; then
Expand Down
17 changes: 17 additions & 0 deletions .pre-commit-config.yaml
@@ -0,0 +1,17 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.3.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- repo: https://github.com/psf/black
rev: 19.10b0
hooks:
- id: black
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.4
hooks:
- id: flake8
4 changes: 2 additions & 2 deletions .repo-metadata.json
Expand Up @@ -6,8 +6,8 @@
"issue_tracker": "https://issuetracker.google.com/savedsearches/5300385",
"release_level": "ga",
"language": "python",
"repo": "googleapis/dialogflow-python-client-v2",
"distribution_name": "dialogflow",
"repo": "googleapis/python-dialogflow",
"distribution_name": "google-cloud-dialogflow",
"api_id": "dialogflow.googleapis.com",
"requires_billing": true
}
36 changes: 23 additions & 13 deletions CONTRIBUTING.rst
Expand Up @@ -35,21 +35,21 @@ Using a Development Checkout
You'll have to create a development environment using a Git checkout:

- While logged into your GitHub account, navigate to the
``dialogflow-python-client-v2`` `repo`_ on GitHub.
``python-dialogflow`` `repo`_ on GitHub.

- Fork and clone the ``dialogflow-python-client-v2`` repository to your GitHub account by
- Fork and clone the ``python-dialogflow`` repository to your GitHub account by
clicking the "Fork" button.

- Clone your fork of ``dialogflow-python-client-v2`` from your GitHub account to your local
- Clone your fork of ``python-dialogflow`` from your GitHub account to your local
computer, substituting your account username and specifying the destination
as ``hack-on-dialogflow-python-client-v2``. E.g.::
as ``hack-on-python-dialogflow``. E.g.::

$ cd ${HOME}
$ git clone git@github.com:USERNAME/dialogflow-python-client-v2.git hack-on-dialogflow-python-client-v2
$ cd hack-on-dialogflow-python-client-v2
# Configure remotes such that you can pull changes from the googleapis/dialogflow-python-client-v2
$ git clone git@github.com:USERNAME/python-dialogflow.git hack-on-python-dialogflow
$ cd hack-on-python-dialogflow
# Configure remotes such that you can pull changes from the googleapis/python-dialogflow
# repository into your local repository.
$ git remote add upstream git@github.com:googleapis/dialogflow-python-client-v2.git
$ git remote add upstream git@github.com:googleapis/python-dialogflow.git
# fetch and merge changes from upstream into master
$ git fetch upstream
$ git merge upstream/master
Expand All @@ -60,7 +60,7 @@ repo, from which you can submit a pull request.
To work on the codebase and run the tests, we recommend using ``nox``,
but you can also use a ``virtualenv`` of your own creation.

.. _repo: https://github.com/googleapis/dialogflow-python-client-v2
.. _repo: https://github.com/googleapis/python-dialogflow

Using ``nox``
=============
Expand Down Expand Up @@ -107,10 +107,20 @@ Coding Style
export GOOGLE_CLOUD_TESTING_BRANCH="master"

By doing this, you are specifying the location of the most up-to-date
version of ``dialogflow-python-client-v2``. The the suggested remote name ``upstream``
version of ``python-dialogflow``. The the suggested remote name ``upstream``
should point to the official ``googleapis`` checkout and the
the branch should be the main branch on that remote (``master``).

- This repository contains configuration for the
`pre-commit <https://pre-commit.com/>`__ tool, which automates checking
our linters during a commit. If you have it installed on your ``$PATH``,
you can enable enforcing those checks via:

.. code-block:: bash
$ pre-commit install
pre-commit installed at .git/hooks/pre-commit
Exceptions to PEP8:

- Many unit tests use a helper method, ``_call_fut`` ("FUT" is short for
Expand Down Expand Up @@ -180,10 +190,10 @@ The `description on PyPI`_ for the project comes directly from the
``README``. Due to the reStructuredText (``rst``) parser used by
PyPI, relative links which will work on GitHub (e.g. ``CONTRIBUTING.rst``
instead of
``https://github.com/googleapis/dialogflow-python-client-v2/blob/master/CONTRIBUTING.rst``)
``https://github.com/googleapis/python-dialogflow/blob/master/CONTRIBUTING.rst``)
may cause problems creating links or rendering the description.

.. _description on PyPI: https://pypi.org/project/dialogflow
.. _description on PyPI: https://pypi.org/project/google-cloud-dialogflow


*************************
Expand All @@ -205,7 +215,7 @@ We support:

Supported versions can be found in our ``noxfile.py`` `config`_.

.. _config: https://github.com/googleapis/dialogflow-python-client-v2/blob/master/noxfile.py
.. _config: https://github.com/googleapis/python-dialogflow/blob/master/noxfile.py

Python 2.7 support is deprecated. All code changes should maintain Python 2.7 compatibility until January 1, 2020.

Expand Down

0 comments on commit 57c90a5

Please sign in to comment.