gapic-generator-python icon indicating copy to clipboard operation
gapic-generator-python copied to clipboard

Add dependency `google-cloud-common` to templates

Open parthea opened this issue 2 years ago • 0 comments

Dependency google-cloud-common is needed in the generated client for google-cloud-filestore.

See the dependency in setup.py which was added manually. https://github.com/googleapis/python-filestore/blob/bf24f012b9296d2e744887d5bcf67185aa0ccbac/setup.py#L43

The dependency should be added to the templates here so that it doesn't need to be added manually or as part of post processing.

See the error below which appears if the dependency is not declared:

(py39) partheniou@partheniou-vm-3:~/git/google-cloud-python/packages/google-cloud-filestore$ nox -s unit-3.9
nox > Running session unit-3.9
nox > Creating virtual environment (virtualenv) using python3.9 in .nox/unit-3-9
nox > python -m pip install mock asyncmock pytest pytest-cov pytest-asyncio -c /usr/local/google/home/partheniou/git/google-cloud-python/packages/google-cloud-filestore/testing/constraints-3.9.txt
nox > python -m pip install -e . -c /usr/local/google/home/partheniou/git/google-cloud-python/packages/google-cloud-filestore/testing/constraints-3.9.txt
nox > py.test --quiet --junitxml=unit_3.9_sponge_log.xml --cov=google --cov=tests/unit --cov-append --cov-config=.coveragerc --cov-report= --cov-fail-under=0 tests/unit

===================================================================================================================================== ERRORS =====================================================================================================================================
_________________________________________________________________________________________________ ERROR collecting tests/unit/gapic/filestore_v1/test_cloud_filestore_manager.py _________________________________________________________________________________________________
ImportError while importing test module '/usr/local/google/home/partheniou/git/google-cloud-python/packages/google-cloud-filestore/tests/unit/gapic/filestore_v1/test_cloud_filestore_manager.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
../../../../.pyenv/versions/3.9.16/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/unit/gapic/filestore_v1/test_cloud_filestore_manager.py:44: in <module>
    from google.cloud.common.types import operation_metadata
E   ModuleNotFoundError: No module named 'google.cloud.common'

parthea avatar Oct 30 '23 19:10 parthea