New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 779879 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

[Findit] Add dict-like and list-like objects to limit element type

Project Member Reported by chanli@chromium.org, Oct 31 2017

Issue description

To make it possible to have a dict/list of structured objects, we need to add dict-like and list-like objects to limit element type.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Nov 3 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/infra/+/82f19de9b5d17db2ef88c52331caf4c4115bb5c0

commit 82f19de9b5d17db2ef88c52331caf4c4115bb5c0
Author: Chan <chanli@chromium.org>
Date: Fri Nov 03 17:40:34 2017

[Findit] Add dict-like and list-like objects to limit element type

New classes have a class attribute for value's type and a dict/list to hold data.

These new classes are to allow a dict/list of StruturedObjects inside another StructuredObjects.

For demo of using them, see https://chromium-review.googlesource.com/c/infra/infra/+/748710/1


Bug:  779879 
Change-Id: I17f0e249c293144e1b11f62fc51cd8f0036014c0
Reviewed-on: https://chromium-review.googlesource.com/745247
Commit-Queue: Chan Li <chanli@chromium.org>
Reviewed-by: Sharu Jiang <katesonia@chromium.org>
Reviewed-by: Shuotao Gao <stgao@chromium.org>
Reviewed-by: Brandon Wylie <wylieb@chromium.org>
Reviewed-by: Roberto Carrillo <robertocn@chromium.org>

[modify] https://crrev.com/82f19de9b5d17db2ef88c52331caf4c4115bb5c0/appengine/findit/libs/structured_object.py
[modify] https://crrev.com/82f19de9b5d17db2ef88c52331caf4c4115bb5c0/appengine/findit/libs/test/structured_object_test.py

Project Member

Comment 2 by bugdroid1@chromium.org, Nov 3 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/infra/+/1881f4891b5f24d72ce9655e4559f96ff11ff4b6

commit 1881f4891b5f24d72ce9655e4559f96ff11ff4b6
Author: Chan <chanli@chromium.org>
Date: Fri Nov 03 21:12:17 2017

[Findit] Modify StructuredObject to use TypedDict and TypedList.

Modified ToDict and FromDict methods (renamed to ToSerializable and FromSerializable respectively to simplify code) to handle cases where attribute is of type TypedDict or TypedList.

Tests can be used as demos for using TypedDict and TypedList.

Bug:  779879 
Change-Id: I0b1533ec98f0893804d125a9dbc7f5926d70e1d0
Reviewed-on: https://chromium-review.googlesource.com/748710
Commit-Queue: Chan Li <chanli@chromium.org>
Reviewed-by: Shuotao Gao <stgao@chromium.org>
Reviewed-by: Sharu Jiang <katesonia@chromium.org>
Reviewed-by: Jeffrey Li <lijeffrey@chromium.org>

[modify] https://crrev.com/1881f4891b5f24d72ce9655e4559f96ff11ff4b6/appengine/findit/gae_libs/test/pipelines_test.py
[modify] https://crrev.com/1881f4891b5f24d72ce9655e4559f96ff11ff4b6/appengine/findit/libs/structured_object.py
[modify] https://crrev.com/1881f4891b5f24d72ce9655e4559f96ff11ff4b6/appengine/findit/gae_libs/pipelines.py
[modify] https://crrev.com/1881f4891b5f24d72ce9655e4559f96ff11ff4b6/appengine/findit/libs/test/structured_object_test.py

Comment 3 by chanli@chromium.org, Nov 17 2017

Status: Verified (was: Started)

Sign in to add a comment