Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Issue 10108005: Make json_schema_compiler remove 'nocompile' nodes from JSON at the JSON level (Closed)

Created:
8 years, 8 months ago by not at google - send to devlin
Modified:
8 years, 8 months ago
Reviewers:
Yoyo Zhou
CC:
chromium-reviews, pam+watch_chromium.org, benwells, koz (OOO until 15th September), battre
Visibility:
Public.

Description

Make json_schema_compiler remove 'nocompile' nodes from JSON at the JSON level rather than at the model level. This gives us automatic nocompile of all properties; previously not all were supported. TEST=tools/json_schema_compiler/json_schema_test.py, unit_tests --gtest_filter=JsonSchemaCompiler* Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=132514

Patch Set 1 #

Total comments: 4

Patch Set 2 : yoz #

Unified diffs Side-by-side diffs Delta from patch set Stats (+203 lines, -31 lines) Patch
M tools/json_schema_compiler/json_schema.py View 1 1 chunk +20 lines, -1 line 0 comments Download
A tools/json_schema_compiler/json_schema_test.py View 1 chunk +78 lines, -0 lines 0 comments Download
M tools/json_schema_compiler/model.py View 3 chunks +3 lines, -9 lines 0 comments Download
M tools/json_schema_compiler/model_test.py View 1 chunk +0 lines, -16 lines 0 comments Download
M tools/json_schema_compiler/previewserver.py View 1 chunk +1 line, -5 lines 0 comments Download
A tools/json_schema_compiler/test/json_schema_test.json View 1 chunk +101 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
not at google - send to devlin
8 years, 8 months ago (2012-04-16 22:44:06 UTC) #1
Yoyo Zhou
LGTM https://chromiumcodereview.appspot.com/10108005/diff/1/tools/json_schema_compiler/json_schema.py File tools/json_schema_compiler/json_schema.py (right): https://chromiumcodereview.appspot.com/10108005/diff/1/tools/json_schema_compiler/json_schema.py#newcode62 tools/json_schema_compiler/json_schema.py:62: for delete in toDelete: I'd call 'delete' 'key' ...
8 years, 8 months ago (2012-04-16 23:21:45 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kalman@chromium.org/10108005/2002
8 years, 8 months ago (2012-04-17 00:00:27 UTC) #3
commit-bot: I haz the power
Change committed as 132514
8 years, 8 months ago (2012-04-17 02:11:12 UTC) #4
not at google - send to devlin
8 years, 8 months ago (2012-04-17 04:05:44 UTC) #5
forgot to send out comments, thanks Yoyo.

http://codereview.chromium.org/10108005/diff/1/tools/json_schema_compiler/jso...
File tools/json_schema_compiler/json_schema.py (right):

http://codereview.chromium.org/10108005/diff/1/tools/json_schema_compiler/jso...
tools/json_schema_compiler/json_schema.py:62: for delete in toDelete:
On 2012/04/16 23:21:46, Yoyo Zhou wrote:
> I'd call 'delete' 'key' instead.

Done.

http://codereview.chromium.org/10108005/diff/1/tools/json_schema_compiler/jso...
tools/json_schema_compiler/json_schema.py:64: elif type(item) == list:
On 2012/04/16 23:21:46, Yoyo Zhou wrote:
> You could make this a list comprehension.
> item[:] = [DeleteNoCompileNodes(thing) for thing in item if not
> HasNocompile(thing)]

Done.

Powered by Google App Engine
This is Rietveld 408576698