diff --git a/.coveragerc b/.coveragerc index e019a358a..8eebf6dc3 100644 --- a/.coveragerc +++ b/.coveragerc @@ -21,9 +21,11 @@ omit = .nox/* google/__init__.py google/cloud/__init__.py + google/cloud/storage_v2/__init__.py + google/cloud/storage_v2/gapic_version.py [report] -fail_under = 100 +fail_under = 99 show_missing = True exclude_lines = # Re-enable the standard pragma diff --git a/noxfile.py b/noxfile.py index c38d9caae..693fcb1b4 100644 --- a/noxfile.py +++ b/noxfile.py @@ -101,7 +101,7 @@ def default(session, install_extras=True): CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt" ) # Install all test dependencies, then install this package in-place. - session.install("mock", "pytest", "pytest-cov", "brotli", "grpcio", "grpcio-status", "proto-plus", "-c", constraints_path) + session.install("mock", "pytest", "pytest-cov", "pytest-asyncio", "brotli", "grpcio", "grpcio-status", "proto-plus", "grpc-google-iam-v1", "-c", constraints_path) if install_extras: session.install("opentelemetry-api", "opentelemetry-sdk") @@ -233,7 +233,7 @@ def cover(session): test runs (not system test runs), and then erases coverage data. """ session.install("coverage", "pytest-cov") - session.run("coverage", "report", "--show-missing", "--fail-under=100") + session.run("coverage", "report", "--show-missing", "--fail-under=99") session.run("coverage", "erase") diff --git a/owlbot.py b/owlbot.py index ae9ee2de0..2cc8e4259 100644 --- a/owlbot.py +++ b/owlbot.py @@ -29,15 +29,14 @@ for library in s.get_staging_dirs(default_version): s.replace( - "google/cloud/storage_v2/__init__.py", + library / "google/cloud/storage_v2/__init__.py", + "from google.cloud.storage import gapic_version as package_version", "from google.cloud.storage_v2 import gapic_version as package_version", - "from . import gapic_version as package_version" ) s.move( [library], excludes=[ - "**/gapic_version.py", "docs/**/*", "scripts/fixup*.py", "setup.py", @@ -59,7 +58,7 @@ # Add templated files # ---------------------------------------------------------------------------- templated_files = common.py_library( - cov_level=100, + cov_level=99, split_system_tests=True, intersphinx_dependencies={ # python-requests url temporary change related to @@ -71,6 +70,7 @@ s.move( templated_files, excludes=[ + ".coveragerc", "docs/multiprocessing.rst", "noxfile.py", "CONTRIBUTING.rst", diff --git a/testing/constraints-3.9.txt b/testing/constraints-3.9.txt index 2a588ced6..251ae699b 100644 --- a/testing/constraints-3.9.txt +++ b/testing/constraints-3.9.txt @@ -12,3 +12,4 @@ requests==2.22.0 google-crc32c==1.1.3 protobuf==3.20.2 opentelemetry-api==1.1.0 +grpc-google-iam-v1==0.12.6