Skip to content

Commit bc69299

Browse files
feat: [google-maps-fleetengine-delivery] A new field past_locations is added to message .maps.fleetengine.delivery.v1.DeliveryVehicle (#13564)
- [ ] Regenerate this pull request now. BEGIN_COMMIT_OVERRIDE feat: A new field `past_locations` is added to message `.maps.fleetengine.delivery.v1.DeliveryVehicle` docs: Updated documentation for field `task` in message `.maps.fleetengine.delivery.v1.CreateTaskRequest` to clarify certain fields can be optionally set. END_COMMIT_OVERRIDE PiperOrigin-RevId: 731478697 Source-Link: googleapis/googleapis@cdb9d3b Source-Link: googleapis/googleapis-gen@f22d67a Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLW1hcHMtZmxlZXRlbmdpbmUtZGVsaXZlcnkvLk93bEJvdC55YW1sIiwiaCI6ImYyMmQ2N2EyNGY1ZjdkNTZjM2QwODljYTc5NzI3YzNiYTRlYWIwNmYifQ== --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent ca3d83f commit bc69299

File tree

10 files changed

+118
-7
lines changed

10 files changed

+118
-7
lines changed

packages/google-maps-fleetengine-delivery/README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ In order to use this library, you first need to go through the following steps:
2626
1. `Select or create a Cloud Platform project.`_
2727
2. `Enable billing for your project.`_
2828
3. `Enable the Last Mile Fleet Solution Delivery API.`_
29-
4. `Setup Authentication.`_
29+
4. `Set up Authentication.`_
3030

3131
.. _Select or create a Cloud Platform project.: https://console.cloud.google.com/project
3232
.. _Enable billing for your project.: https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project
3333
.. _Enable the Last Mile Fleet Solution Delivery API.: https://developers.google.com/maps/documentation/transportation-logistics/mobility
34-
.. _Setup Authentication.: https://googleapis.dev/python/google-api-core/latest/auth.html
34+
.. _Set up Authentication.: https://googleapis.dev/python/google-api-core/latest/auth.html
3535

3636
Installation
3737
~~~~~~~~~~~~

packages/google-maps-fleetengine-delivery/google/maps/fleetengine_delivery/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "0.2.8" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-maps-fleetengine-delivery/google/maps/fleetengine_delivery_v1/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "0.2.8" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-maps-fleetengine-delivery/google/maps/fleetengine_delivery_v1/services/delivery_service/async_client.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -910,6 +910,12 @@ async def sample_create_task():
910910
tasks)
911911
- ``task_duration``
912912
913+
The following fields can be optionally set:
914+
915+
- ``target_time_window``
916+
- ``task_tracking_view_config``
917+
- ``attributes``
918+
913919
Note: The Task's ``name`` field is ignored. All other
914920
Task fields must not be set; otherwise, an error is
915921
returned.

packages/google-maps-fleetengine-delivery/google/maps/fleetengine_delivery_v1/services/delivery_service/client.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1345,6 +1345,12 @@ def sample_create_task():
13451345
tasks)
13461346
- ``task_duration``
13471347
1348+
The following fields can be optionally set:
1349+
1350+
- ``target_time_window``
1351+
- ``task_tracking_view_config``
1352+
- ``attributes``
1353+
13481354
Note: The Task's ``name`` field is ignored. All other
13491355
Task fields must not be set; otherwise, an error is
13501356
returned.

packages/google-maps-fleetengine-delivery/google/maps/fleetengine_delivery_v1/types/delivery_api.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,12 @@ class CreateTaskRequest(proto.Message):
376376
- ``planned_location`` (optional for ``UNAVAILABLE`` tasks)
377377
- ``task_duration``
378378
379+
The following fields can be optionally set:
380+
381+
- ``target_time_window``
382+
- ``task_tracking_view_config``
383+
- ``attributes``
384+
379385
Note: The Task's ``name`` field is ignored. All other Task
380386
fields must not be set; otherwise, an error is returned.
381387
"""

packages/google-maps-fleetengine-delivery/google/maps/fleetengine_delivery_v1/types/delivery_vehicles.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,13 @@ class DeliveryVehicle(proto.Message):
5454
last_location (google.maps.fleetengine_delivery_v1.types.DeliveryVehicleLocation):
5555
The last reported location of the Delivery
5656
Vehicle.
57+
past_locations (MutableSequence[google.maps.fleetengine_delivery_v1.types.DeliveryVehicleLocation]):
58+
Input only. Locations where this Delivery Vehicle has been
59+
in the past that haven't yet been reported to Fleet Engine.
60+
This is used in ``UpdateDeliveryVehicleRequest`` to record
61+
locations which were previously unable to be sent to the
62+
server. Typically this happens when the Delivery Vehicle
63+
does not have internet connectivity.
5764
navigation_status (google.maps.fleetengine_delivery_v1.types.DeliveryVehicleNavigationStatus):
5865
The Delivery Vehicle's navigation status.
5966
current_route_segment (bytes):
@@ -185,6 +192,13 @@ class DeliveryVehicleType(proto.Enum):
185192
number=2,
186193
message=common.DeliveryVehicleLocation,
187194
)
195+
past_locations: MutableSequence[
196+
common.DeliveryVehicleLocation
197+
] = proto.RepeatedField(
198+
proto.MESSAGE,
199+
number=12,
200+
message=common.DeliveryVehicleLocation,
201+
)
188202
navigation_status: common.DeliveryVehicleNavigationStatus = proto.Field(
189203
proto.ENUM,
190204
number=3,

packages/google-maps-fleetengine-delivery/noxfile.py

Lines changed: 79 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,20 +382,29 @@ def docfx(session):
382382
["python", "upb", "cpp"],
383383
)
384384
def prerelease_deps(session, protobuf_implementation):
385-
"""Run all tests with prerelease versions of dependencies installed."""
385+
"""
386+
Run all tests with pre-release versions of dependencies installed
387+
rather than the standard non pre-release versions.
388+
Pre-releases versions can be installed using
389+
`pip install --pre <package>`.
390+
"""
386391

387392
if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"):
388393
session.skip("cpp implementation is not supported in python 3.11+")
389394

390395
# Install all dependencies
391-
session.install("-e", ".[all, tests, tracing]")
396+
session.install("-e", ".")
397+
392398
unit_deps_all = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_EXTERNAL_DEPENDENCIES
399+
# Install dependencies for the unit test environment
393400
session.install(*unit_deps_all)
401+
394402
system_deps_all = (
395403
SYSTEM_TEST_STANDARD_DEPENDENCIES
396404
+ SYSTEM_TEST_EXTERNAL_DEPENDENCIES
397405
+ SYSTEM_TEST_EXTRAS
398406
)
407+
# Install dependencies for the system test environment
399408
session.install(*system_deps_all)
400409

401410
# Because we test minimum dependency versions on the minimum Python
@@ -417,6 +426,7 @@ def prerelease_deps(session, protobuf_implementation):
417426
)
418427
]
419428

429+
# Install dependencies specified in `testing/constraints-X.txt`.
420430
session.install(*constraints_deps)
421431

422432
prerel_deps = [
@@ -458,3 +468,70 @@ def prerelease_deps(session, protobuf_implementation):
458468
"PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION": protobuf_implementation,
459469
},
460470
)
471+
472+
473+
@nox.session(python="3.13")
474+
@nox.parametrize(
475+
"protobuf_implementation",
476+
["python", "upb"],
477+
)
478+
def core_deps_from_source(session, protobuf_implementation):
479+
"""Run all tests with local versions of core dependencies installed,
480+
rather than pulling core dependencies from PyPI.
481+
"""
482+
483+
# Install all dependencies
484+
session.install(".")
485+
486+
# Install dependencies for the unit test environment
487+
unit_deps_all = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_EXTERNAL_DEPENDENCIES
488+
session.install(*unit_deps_all)
489+
490+
# Install dependencies for the system test environment
491+
system_deps_all = (
492+
SYSTEM_TEST_STANDARD_DEPENDENCIES
493+
+ SYSTEM_TEST_EXTERNAL_DEPENDENCIES
494+
+ SYSTEM_TEST_EXTRAS
495+
)
496+
session.install(*system_deps_all)
497+
498+
# Because we test minimum dependency versions on the minimum Python
499+
# version, the first version we test with in the unit tests sessions has a
500+
# constraints file containing all dependencies and extras that should be installed.
501+
with open(
502+
CURRENT_DIRECTORY
503+
/ "testing"
504+
/ f"constraints-{UNIT_TEST_PYTHON_VERSIONS[0]}.txt",
505+
encoding="utf-8",
506+
) as constraints_file:
507+
constraints_text = constraints_file.read()
508+
509+
# Ignore leading whitespace and comment lines.
510+
constraints_deps = [
511+
match.group(1)
512+
for match in re.finditer(
513+
r"^\s*(\S+)(?===\S+)", constraints_text, flags=re.MULTILINE
514+
)
515+
]
516+
517+
# Install dependencies specified in `testing/constraints-X.txt`.
518+
session.install(*constraints_deps)
519+
520+
core_dependencies_from_source = [
521+
"google-api-core @ git+https://github.com/googleapis/python-api-core.git",
522+
"google-auth @ git+https://github.com/googleapis/google-auth-library-python.git",
523+
f"{CURRENT_DIRECTORY}/../googleapis-common-protos",
524+
f"{CURRENT_DIRECTORY}/../grpc-google-iam-v1",
525+
"proto-plus @ git+https://github.com/googleapis/proto-plus-python.git",
526+
]
527+
528+
for dep in core_dependencies_from_source:
529+
session.install(dep, "--ignore-installed", "--no-deps")
530+
531+
session.run(
532+
"py.test",
533+
"tests/unit",
534+
env={
535+
"PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION": protobuf_implementation,
536+
},
537+
)

packages/google-maps-fleetengine-delivery/samples/generated_samples/snippet_metadata_maps.fleetengine.delivery.v1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-maps-fleetengine-delivery",
11-
"version": "0.2.8"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

packages/google-maps-fleetengine-delivery/tests/unit/gapic/fleetengine_delivery_v1/test_delivery_service.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7752,6 +7752,7 @@ def test_create_delivery_vehicle_rest_call_success(request_type):
77527752
"supplemental_location_accuracy": {},
77537753
"road_snapped": True,
77547754
},
7755+
"past_locations": {},
77557756
"navigation_status": 1,
77567757
"current_route_segment": b"current_route_segment_blob",
77577758
"current_route_segment_end_point": {},
@@ -8167,6 +8168,7 @@ def test_update_delivery_vehicle_rest_call_success(request_type):
81678168
"supplemental_location_accuracy": {},
81688169
"road_snapped": True,
81698170
},
8171+
"past_locations": {},
81708172
"navigation_status": 1,
81718173
"current_route_segment": b"current_route_segment_blob",
81728174
"current_route_segment_end_point": {},

0 commit comments

Comments
 (0)