From 0d3e10e986446fa90fe0cb694c82a82eba4b08ee Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Thu, 30 May 2024 14:08:41 -0400 Subject: [PATCH] test: add prerelease tests (#222) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * test: add prerelease tests * pytest->unittest * fix system test build * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * add test dependency --------- Co-authored-by: Owl Bot --- google/api/annotations.proto | 2 +- google/api/auth.proto | 2 +- google/api/backend.proto | 2 +- google/api/billing.proto | 2 +- google/api/client.proto | 2 +- google/api/config_change.proto | 2 +- google/api/consumer.proto | 2 +- google/api/context.proto | 2 +- google/api/control.proto | 2 +- google/api/distribution.proto | 2 +- google/api/documentation.proto | 2 +- google/api/endpoint.proto | 2 +- google/api/error_reason.proto | 2 +- google/api/field_behavior.proto | 2 +- google/api/field_info.proto | 2 +- google/api/http.proto | 2 +- google/api/httpbody.proto | 2 +- google/api/label.proto | 2 +- google/api/launch_stage.proto | 2 +- google/api/log.proto | 2 +- google/api/logging.proto | 2 +- google/api/metric.proto | 2 +- google/api/monitored_resource.proto | 2 +- google/api/monitoring.proto | 2 +- google/api/policy.proto | 2 +- google/api/quota.proto | 2 +- google/api/resource.proto | 2 +- google/api/routing.proto | 2 +- google/api/service.proto | 2 +- google/api/source_info.proto | 2 +- google/api/system_parameter.proto | 2 +- google/api/usage.proto | 2 +- google/api/visibility.proto | 2 +- google/cloud/extended_operations.proto | 2 +- google/cloud/location/locations.proto | 2 +- google/gapic/metadata/gapic_metadata.proto | 7 +- google/logging/type/http_request.proto | 2 +- google/logging/type/log_severity.proto | 2 +- google/longrunning/operations.proto | 2 +- google/rpc/code.proto | 2 +- google/rpc/context/attribute_context.proto | 2 +- google/rpc/context/audit_context.proto | 2 +- google/rpc/error_details.proto | 2 +- google/rpc/http.proto | 2 +- google/rpc/status.proto | 2 +- google/type/calendar_period.proto | 2 +- google/type/color.proto | 2 +- google/type/date.proto | 2 +- google/type/datetime.proto | 2 +- google/type/dayofweek.proto | 2 +- google/type/decimal.proto | 2 +- google/type/expr.proto | 2 +- google/type/fraction.proto | 2 +- google/type/interval.proto | 2 +- google/type/latlng.proto | 2 +- google/type/localized_text.proto | 2 +- google/type/money.proto | 2 +- google/type/month.proto | 2 +- google/type/phone_number.proto | 2 +- google/type/postal_address.proto | 2 +- google/type/quaternion.proto | 2 +- google/type/timeofday.proto | 2 +- noxfile.py | 152 +++++++++++++-------- 63 files changed, 159 insertions(+), 122 deletions(-) diff --git a/google/api/annotations.proto b/google/api/annotations.proto index efdab3d..84c4816 100644 --- a/google/api/annotations.proto +++ b/google/api/annotations.proto @@ -1,4 +1,4 @@ -// Copyright 2015 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/api/auth.proto b/google/api/auth.proto index ca91bb1..19d5924 100644 --- a/google/api/auth.proto +++ b/google/api/auth.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/api/backend.proto b/google/api/backend.proto index 6ff6887..499737a 100644 --- a/google/api/backend.proto +++ b/google/api/backend.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/api/billing.proto b/google/api/billing.proto index 8b75452..234f518 100644 --- a/google/api/billing.proto +++ b/google/api/billing.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/api/client.proto b/google/api/client.proto index 0952e83..3a5f929 100644 --- a/google/api/client.proto +++ b/google/api/client.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/api/config_change.proto b/google/api/config_change.proto index 1dc8044..8bbe913 100644 --- a/google/api/config_change.proto +++ b/google/api/config_change.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/api/consumer.proto b/google/api/consumer.proto index b7e5df1..d63a2d7 100644 --- a/google/api/consumer.proto +++ b/google/api/consumer.proto @@ -1,4 +1,4 @@ -// Copyright 2016 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/api/context.proto b/google/api/context.proto index 1b16517..78f2813 100644 --- a/google/api/context.proto +++ b/google/api/context.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/api/control.proto b/google/api/control.proto index cbbce6f..a5b8243 100644 --- a/google/api/control.proto +++ b/google/api/control.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/api/distribution.proto b/google/api/distribution.proto index b0bc493..7e0d329 100644 --- a/google/api/distribution.proto +++ b/google/api/distribution.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/api/documentation.proto b/google/api/documentation.proto index 12936c7..1f2a63e 100644 --- a/google/api/documentation.proto +++ b/google/api/documentation.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/api/endpoint.proto b/google/api/endpoint.proto index 7f6dca7..2dc354b 100644 --- a/google/api/endpoint.proto +++ b/google/api/endpoint.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/api/error_reason.proto b/google/api/error_reason.proto index cf80669..a5a8ca5 100644 --- a/google/api/error_reason.proto +++ b/google/api/error_reason.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/api/field_behavior.proto b/google/api/field_behavior.proto index 21895bf..2865ba0 100644 --- a/google/api/field_behavior.proto +++ b/google/api/field_behavior.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/api/field_info.proto b/google/api/field_info.proto index e62d845..b2197b5 100644 --- a/google/api/field_info.proto +++ b/google/api/field_info.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/api/http.proto b/google/api/http.proto index 31d867a..afa00ae 100644 --- a/google/api/http.proto +++ b/google/api/http.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/api/httpbody.proto b/google/api/httpbody.proto index 7f1685e..920612d 100644 --- a/google/api/httpbody.proto +++ b/google/api/httpbody.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/api/label.proto b/google/api/label.proto index 698f6bd..3c5588b 100644 --- a/google/api/label.proto +++ b/google/api/label.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/api/launch_stage.proto b/google/api/launch_stage.proto index 9802de7..9863fc2 100644 --- a/google/api/launch_stage.proto +++ b/google/api/launch_stage.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/api/log.proto b/google/api/log.proto index 416c4f6..5a458e7 100644 --- a/google/api/log.proto +++ b/google/api/log.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/api/logging.proto b/google/api/logging.proto index 650786f..ccefb12 100644 --- a/google/api/logging.proto +++ b/google/api/logging.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/api/metric.proto b/google/api/metric.proto index 9bf043c..126f526 100644 --- a/google/api/metric.proto +++ b/google/api/metric.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/api/monitored_resource.proto b/google/api/monitored_resource.proto index 08bc39b..d7588dd 100644 --- a/google/api/monitored_resource.proto +++ b/google/api/monitored_resource.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/api/monitoring.proto b/google/api/monitoring.proto index 753703e..3bac622 100644 --- a/google/api/monitoring.proto +++ b/google/api/monitoring.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/api/policy.proto b/google/api/policy.proto index dd202bc..25b75f3 100644 --- a/google/api/policy.proto +++ b/google/api/policy.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/api/quota.proto b/google/api/quota.proto index 7ccc102..eb80cb6 100644 --- a/google/api/quota.proto +++ b/google/api/quota.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/api/resource.proto b/google/api/resource.proto index bf0cbec..f17520d 100644 --- a/google/api/resource.proto +++ b/google/api/resource.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/api/routing.proto b/google/api/routing.proto index b35289b..9c0cdc0 100644 --- a/google/api/routing.proto +++ b/google/api/routing.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/api/service.proto b/google/api/service.proto index 3de5b66..48e9ef0 100644 --- a/google/api/service.proto +++ b/google/api/service.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/api/source_info.proto b/google/api/source_info.proto index 51fe279..c9b1c9a 100644 --- a/google/api/source_info.proto +++ b/google/api/source_info.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/api/system_parameter.proto b/google/api/system_parameter.proto index 8d29057..4eb4f47 100644 --- a/google/api/system_parameter.proto +++ b/google/api/system_parameter.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/api/usage.proto b/google/api/usage.proto index b9384b4..5c6d6d8 100644 --- a/google/api/usage.proto +++ b/google/api/usage.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/api/visibility.proto b/google/api/visibility.proto index 8b1f946..bb378bf 100644 --- a/google/api/visibility.proto +++ b/google/api/visibility.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/cloud/extended_operations.proto b/google/cloud/extended_operations.proto index 1477d2d..2f86c37 100644 --- a/google/cloud/extended_operations.proto +++ b/google/cloud/extended_operations.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC. +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/cloud/location/locations.proto b/google/cloud/location/locations.proto index a91766c..12de2ae 100644 --- a/google/cloud/location/locations.proto +++ b/google/cloud/location/locations.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/gapic/metadata/gapic_metadata.proto b/google/gapic/metadata/gapic_metadata.proto index 16090ed..ef11917 100644 --- a/google/gapic/metadata/gapic_metadata.proto +++ b/google/gapic/metadata/gapic_metadata.proto @@ -25,8 +25,8 @@ option java_package = "com.google.gapic.metadata"; option php_namespace = "Google\\Gapic\\Metadata"; option ruby_package = "Google::Gapic::Metadata"; -// Metadata about a GAPIC library for a specific combination of API, version, and -// computer language. +// Metadata about a GAPIC library for a specific combination of API, version, +// and computer language. message GapicMetadata { // Schema version of this proto. Current value: 1.0 string schema = 1; @@ -74,7 +74,7 @@ message GapicMetadata { // than one library_client method for each RPC. RPCs with no // library_client methods need not be included. // - // The key name is the name of the RPC as defined and formated in + // The key name is the name of the RPC as defined and formatted in // the proto file. map rpcs = 2; } @@ -88,5 +88,4 @@ message GapicMetadata { // source code. repeated string methods = 1; } - } diff --git a/google/logging/type/http_request.proto b/google/logging/type/http_request.proto index 425a09d..fa2dd64 100644 --- a/google/logging/type/http_request.proto +++ b/google/logging/type/http_request.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/logging/type/log_severity.proto b/google/logging/type/log_severity.proto index 6740125..96ff874 100644 --- a/google/logging/type/log_severity.proto +++ b/google/logging/type/log_severity.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/longrunning/operations.proto b/google/longrunning/operations.proto index c8fda20..be8880b 100644 --- a/google/longrunning/operations.proto +++ b/google/longrunning/operations.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/rpc/code.proto b/google/rpc/code.proto index 7c810af..ba8f2bf 100644 --- a/google/rpc/code.proto +++ b/google/rpc/code.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/rpc/context/attribute_context.proto b/google/rpc/context/attribute_context.proto index ef9242e..d6871eb 100644 --- a/google/rpc/context/attribute_context.proto +++ b/google/rpc/context/attribute_context.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/rpc/context/audit_context.proto b/google/rpc/context/audit_context.proto index 7b8b705..74945cd 100644 --- a/google/rpc/context/audit_context.proto +++ b/google/rpc/context/audit_context.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/rpc/error_details.proto b/google/rpc/error_details.proto index c489e83..c06afd4 100644 --- a/google/rpc/error_details.proto +++ b/google/rpc/error_details.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/rpc/http.proto b/google/rpc/http.proto index 299a71f..11688ea 100644 --- a/google/rpc/http.proto +++ b/google/rpc/http.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/rpc/status.proto b/google/rpc/status.proto index 923e169..90b70dd 100644 --- a/google/rpc/status.proto +++ b/google/rpc/status.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/type/calendar_period.proto b/google/type/calendar_period.proto index 82f5690..25a8f64 100644 --- a/google/type/calendar_period.proto +++ b/google/type/calendar_period.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/type/color.proto b/google/type/color.proto index 5dc85a6..3e57c1f 100644 --- a/google/type/color.proto +++ b/google/type/color.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/type/date.proto b/google/type/date.proto index e4e730e..6370cd8 100644 --- a/google/type/date.proto +++ b/google/type/date.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/type/datetime.proto b/google/type/datetime.proto index cfed85d..a363a41 100644 --- a/google/type/datetime.proto +++ b/google/type/datetime.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/type/dayofweek.proto b/google/type/dayofweek.proto index 4c80c62..e16c194 100644 --- a/google/type/dayofweek.proto +++ b/google/type/dayofweek.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/type/decimal.proto b/google/type/decimal.proto index beb18a5..293d082 100644 --- a/google/type/decimal.proto +++ b/google/type/decimal.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/type/expr.proto b/google/type/expr.proto index af0778c..544e668 100644 --- a/google/type/expr.proto +++ b/google/type/expr.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/type/fraction.proto b/google/type/fraction.proto index 6c5ae6e..06f0723 100644 --- a/google/type/fraction.proto +++ b/google/type/fraction.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/type/interval.proto b/google/type/interval.proto index 9702324..fcf94c8 100644 --- a/google/type/interval.proto +++ b/google/type/interval.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/type/latlng.proto b/google/type/latlng.proto index 9231456..daeba48 100644 --- a/google/type/latlng.proto +++ b/google/type/latlng.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/type/localized_text.proto b/google/type/localized_text.proto index 5c6922b..82d083c 100644 --- a/google/type/localized_text.proto +++ b/google/type/localized_text.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/type/money.proto b/google/type/money.proto index 98d6494..c610943 100644 --- a/google/type/money.proto +++ b/google/type/money.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/type/month.proto b/google/type/month.proto index 99e7551..19982cb 100644 --- a/google/type/month.proto +++ b/google/type/month.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/type/phone_number.proto b/google/type/phone_number.proto index 7bbb7d8..370d162 100644 --- a/google/type/phone_number.proto +++ b/google/type/phone_number.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/type/postal_address.proto b/google/type/postal_address.proto index c57c7c3..7023a9b 100644 --- a/google/type/postal_address.proto +++ b/google/type/postal_address.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/type/quaternion.proto b/google/type/quaternion.proto index dfb822d..416de30 100644 --- a/google/type/quaternion.proto +++ b/google/type/quaternion.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/google/type/timeofday.proto b/google/type/timeofday.proto index 5cb48aa..3735745 100644 --- a/google/type/timeofday.proto +++ b/google/type/timeofday.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/noxfile.py b/noxfile.py index 97386de..66c398c 100644 --- a/noxfile.py +++ b/noxfile.py @@ -15,18 +15,22 @@ import os import pathlib from pathlib import Path +import re +import unittest import nox BLACK_VERSION = "black==22.3.0" -# NOTE: Pin the version of grpcio-tools to 1.48.2 for compatibility with -# Protobuf 3.19.5. Please ensure that the minimum required version of +# NOTE: Pin the version of grpcio-tools to 1.48.2 for compatibility with +# Protobuf 3.19.5. Please ensure that the minimum required version of # protobuf in setup.py is compatible with the pb2 files generated # by grpcio-tools before changing the pinned version below. GRPCIO_TOOLS_VERSION = "grpcio-tools==1.48.2" CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() +UNIT_TEST_PYTHON_VERSIONS = ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] + @nox.session(python="3.8") def blacken(session): @@ -47,28 +51,48 @@ def lint_setup_py(session): session.run("python", "setup.py", "check", "--strict") -def default(session, repository=None): +def unit(session, repository=None, package=None, prerelease=False): + """Run the unit test suite.""" # Install all test dependencies, then install this package in-place. session.install("asyncmock", "pytest-asyncio") # Pin mock due to https://github.com/googleapis/python-pubsub/issues/840 session.install("mock==5.0.0", "pytest", "pytest-cov") - session.install("-e", ".") - # Use the repository specific constraints path if it exists - constraints_path = str( - CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}-{repository}.txt" - ) + if package: + downstream_parent_dir = f"{CURRENT_DIRECTORY}/{repository}/packages/{package}" + else: + downstream_parent_dir = f"{CURRENT_DIRECTORY}/{repository}" + + install_command = ["-e", downstream_parent_dir] - # If there is no repository specific constraints path, use the default one. - if not Path(constraints_path).exists(): - constraints_path = str( - CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt" + if prerelease: + install_prerelease_dependencies( + session, + f"{downstream_parent_dir}/testing/constraints-{UNIT_TEST_PYTHON_VERSIONS[0]}.txt", + ) + # Use the `--no-deps` options to install googleapis-api-common-protos without dependencies + # since we are using pre-release versions of dependencies + install_command.extend(["--no-deps"]) + else: + # Install the pinned dependencies in constraints file + install_command.extend( + ["-c", f"{downstream_parent_dir}/testing/constraints-{session.python}.txt"] ) - # Install googleapis-api-common-protos # This *must* be the last install command to get the package from source. - session.install("-e", ".", "-c", constraints_path) + session.install(*install_command) + + # Print out package versions of dependencies + session.run( + "python", "-c", "import google.protobuf; print(google.protobuf.__version__)" + ) + session.run("python", "-c", "import grpc; print(grpc.__version__)") + session.run("python", "-c", "import google.auth; print(google.auth.__version__)") + + session.run( + "python", "-c", "import google.api_core; print(google.api_core.__version__)" + ) # Run py.test against the unit tests. session.run( @@ -85,12 +109,41 @@ def default(session, repository=None): ) -def unit(session, repository=None): - """Run the unit test suite.""" - default(session, repository) - - -def system(session, repository=None): +def install_prerelease_dependencies(session, constraints_path): + with open(constraints_path, encoding="utf-8") as constraints_file: + constraints_text = constraints_file.read() + # Ignore leading whitespace and comment lines. + constraints_deps = [ + match.group(1) + for match in re.finditer( + r"^\s*(\S+)(?===\S+)", constraints_text, flags=re.MULTILINE + ) + ] + session.install(*constraints_deps) + prerel_deps = [ + "protobuf", + "six", + "grpcio", + "grpcio-status", + "google-api-core", + "google-auth", + "proto-plus", + "google-cloud-testutils", + # dependencies of google-cloud-testutils" + "click", + ] + + for dep in prerel_deps: + session.install("--pre", "--no-deps", "--upgrade", dep) + + # Remaining dependencies + other_deps = [ + "requests", + ] + session.install(*other_deps) + + +def system(session): """Run the system test suite.""" system_test_path = os.path.join("tests", "system.py") system_test_folder_path = os.path.join("tests", "system") @@ -104,32 +157,6 @@ def system(session, repository=None): if not system_test_exists and not system_test_folder_exists: session.skip("System tests were not found") - # Use pre-release gRPC for system tests. - session.install("--pre", "grpcio") - - # Install all test dependencies, then install this package into the - # virtualenv's dist-packages. - # Pin mock due to https://github.com/googleapis/python-pubsub/issues/840 - session.install("mock==5.0.0", "pytest", "google-cloud-testutils") - - session.install("-e", ".") - - # Use the repository specific constraints path if it exists - constraints_path = str( - CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}-{repository}.txt" - ) - - # If there is no repository specific constraints path, use the default one. - if not Path(constraints_path).exists(): - constraints_path = str( - CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt" - ) - - - # Install googleapis-api-common-protos - # This *must* be the last install command to get the package from source. - session.install("-e", ".", "-c", constraints_path) - # Run py.test against the system tests. if system_test_exists: session.run("py.test", "--verbose", system_test_path, *session.posargs) @@ -137,16 +164,18 @@ def system(session, repository=None): session.run("py.test", "--verbose", system_test_folder_path, *session.posargs) -@nox.session(python=["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]) +@nox.session(python=UNIT_TEST_PYTHON_VERSIONS) @nox.parametrize( - "library", + "library, prerelease", [ - ("python-pubsub", None), - ("google-cloud-python", "google-cloud-speech"), + (("python-pubsub", None), False), + (("python-pubsub", None), True), + (("google-cloud-python", "google-cloud-speech"), False), + (("google-cloud-python", "google-cloud-speech"), True), ], ids=["pubsub", "speech"], ) -def test(session, library): +def test(session, library, prerelease): """Run tests from a downstream libraries. To verify that any changes we make here will not break downstream libraries, clone @@ -156,9 +185,11 @@ def test(session, library): They will need to be updated when the templates change. * Pub/Sub: GAPIC with handwritten layer. - * Text-to-Speech: Full GAPIC. * Speech: Full GAPIC, has long running operations. """ + if prerelease and session.python != UNIT_TEST_PYTHON_VERSIONS[-1]: + unittest.skip("Prerelease test is only run using the latest python runtime") + repository, package = library try: session.run("git", "-C", repository, "pull", external=True) @@ -173,18 +204,20 @@ def test(session, library): session.cd(repository) if package: - session.cd(f'packages/{package}') + session.cd(f"packages/{package}") - unit(session, repository) + unit(session, repository, package, prerelease) # system tests are run on 3.7 only if session.python == "3.7": if repository == "python-pubsub": + session.install("google-cloud-testutils") session.install("psutil") session.install("flaky") - system(session, repository) + system(session) + -@nox.session(python=["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]) +@nox.session(python=UNIT_TEST_PYTHON_VERSIONS) def tests_local(session): """Run tests in this local repo.""" # Install all test dependencies, then install this package in-place. @@ -251,7 +284,12 @@ def generate_protos(session): # Some files contain service definitions for which `_pb2_grpc.py` files must be generated. service_protos = ["google/longrunning/operations.proto"] session.run( - "python", "-m", "grpc_tools.protoc", "--proto_path=.", "--grpc_python_out=.", *service_protos + "python", + "-m", + "grpc_tools.protoc", + "--proto_path=.", + "--grpc_python_out=.", + *service_protos, ) # More LRO non-standard fixes: rename the file and fix the import statement