Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Issue 29472555: Issue 4867 - Add global get_pages_metadata to template converters (Closed)

Created:
June 23, 2017, 9:51 a.m. by Jon Sonesen
Modified:
Aug. 10, 2017, 8:07 p.m.
Reviewers:
Vasily Kuznetsov
CC:
Sebastian Noack, juliandoucette
Visibility:
Public.

Description

Issue 4867 - Add global get_pages_metadata to template converters

Patch Set 1 : #

Total comments: 6

Patch Set 2 : refactor file metadata parsing, fix tests #

Total comments: 13

Patch Set 3 : fix interdependency, fix poor filter type checking #

Total comments: 12

Patch Set 4 : address naming, temp var assignment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+94 lines, -10 lines) Patch
M cms/converters.py View 1 2 3 3 chunks +54 lines, -8 lines 0 comments Download
M tests/expected_output/global View 1 chunk +1 line, -1 line 0 comments Download
A tests/expected_output/sitemap View 1 chunk +15 lines, -0 lines 0 comments Download
M tests/test_site/pages/global.tmpl View 1 chunk +0 lines, -1 line 0 comments Download
A tests/test_site/pages/sitemap.tmpl View 1 chunk +24 lines, -0 lines 0 comments Download

Messages

Total messages: 21
Jon Sonesen
https://codereview.adblockplus.org/29472555/diff/29472565/cms/converters.py File cms/converters.py (right): https://codereview.adblockplus.org/29472555/diff/29472565/cms/converters.py#newcode490 cms/converters.py:490: def parse_page_metadata(self, data, page): This code is essentially duplicating ...
June 23, 2017, 10:09 a.m. (2017-06-23 10:09:26 UTC) #1
Vasily Kuznetsov
See my comments below. Also, the ticket number in the title is wrong. https://codereview.adblockplus.org/29472555/diff/29472565/cms/converters.py File ...
June 23, 2017, 2:15 p.m. (2017-06-23 14:15:24 UTC) #2
Jon Sonesen
https://codereview.adblockplus.org/29472555/diff/29472565/cms/converters.py File cms/converters.py (right): https://codereview.adblockplus.org/29472555/diff/29472565/cms/converters.py#newcode490 cms/converters.py:490: def parse_page_metadata(self, data, page): On 2017/06/23 14:15:24, Vasily Kuznetsov ...
June 26, 2017, 7:22 a.m. (2017-06-26 07:22:43 UTC) #3
Vasily Kuznetsov
https://codereview.adblockplus.org/29472555/diff/29474555/cms/converters.py File cms/converters.py (right): https://codereview.adblockplus.org/29472555/diff/29474555/cms/converters.py#newcode145 cms/converters.py:145: for name, value, i in get_page_metadata(params['page'], data): This refactoring ...
June 27, 2017, 1:32 p.m. (2017-06-27 13:32:15 UTC) #4
Jon Sonesen
https://codereview.adblockplus.org/29472555/diff/29474555/cms/converters.py File cms/converters.py (right): https://codereview.adblockplus.org/29472555/diff/29474555/cms/converters.py#newcode145 cms/converters.py:145: for name, value, i in get_page_metadata(params['page'], data): On 2017/06/27 ...
June 28, 2017, 2:31 p.m. (2017-06-28 14:31:20 UTC) #5
Jon Sonesen
https://codereview.adblockplus.org/29472555/diff/29474555/cms/converters.py File cms/converters.py (right): https://codereview.adblockplus.org/29472555/diff/29474555/cms/converters.py#newcode145 cms/converters.py:145: for name, value, i in get_page_metadata(params['page'], data): On 2017/06/27 ...
July 3, 2017, 9:06 a.m. (2017-07-03 09:06:07 UTC) #6
Vasily Kuznetsov
Hey Jon, Looks almost good to me, the comments are basically just naming suggestions. Cheers, ...
July 3, 2017, 5:42 p.m. (2017-07-03 17:42:45 UTC) #7
juliandoucette
https://codereview.adblockplus.org/29472555/diff/29474555/cms/converters.py File cms/converters.py (right): https://codereview.adblockplus.org/29472555/diff/29474555/cms/converters.py#newcode502 cms/converters.py:502: if metadata.keys() == ['page']: On 2017/06/28 14:31:19, Jon Sonesen ...
July 3, 2017, 9:48 p.m. (2017-07-03 21:48:52 UTC) #8
juliandoucette
https://codereview.adblockplus.org/29472555/diff/29478561/cms/converters.py File cms/converters.py (right): https://codereview.adblockplus.org/29472555/diff/29478561/cms/converters.py#newcode119 cms/converters.py:119: def get_page_metadata(page, data): On 2017/07/03 17:42:44, Vasily Kuznetsov wrote: ...
July 3, 2017, 9:55 p.m. (2017-07-03 21:55:54 UTC) #9
Vasily Kuznetsov
https://codereview.adblockplus.org/29472555/diff/29474555/cms/converters.py File cms/converters.py (right): https://codereview.adblockplus.org/29472555/diff/29474555/cms/converters.py#newcode502 cms/converters.py:502: if metadata.keys() == ['page']: On 2017/07/03 21:48:51, juliandoucette wrote: ...
July 4, 2017, 7:43 a.m. (2017-07-04 07:43:49 UTC) #10
juliandoucette
Thank you for clarifying Vasily. My followups below :) https://codereview.adblockplus.org/29472555/diff/29474555/cms/converters.py File cms/converters.py (right): https://codereview.adblockplus.org/29472555/diff/29474555/cms/converters.py#newcode502 cms/converters.py:502: ...
July 4, 2017, 9:57 a.m. (2017-07-04 09:57:25 UTC) #11
Vasily Kuznetsov
Thanks for the clarifications, Julian. See my responses below. https://codereview.adblockplus.org/29472555/diff/29474555/cms/converters.py File cms/converters.py (right): https://codereview.adblockplus.org/29472555/diff/29474555/cms/converters.py#newcode502 cms/converters.py:502: ...
July 4, 2017, 10:23 a.m. (2017-07-04 10:23:34 UTC) #12
juliandoucette
Thanks again for clarifying. https://codereview.adblockplus.org/29472555/diff/29478561/cms/converters.py File cms/converters.py (right): https://codereview.adblockplus.org/29472555/diff/29478561/cms/converters.py#newcode119 cms/converters.py:119: def get_page_metadata(page, data): On 2017/07/04 ...
July 4, 2017, 10:42 a.m. (2017-07-04 10:42:56 UTC) #13
Jon Sonesen
On 2017/07/04 10:42:56, juliandoucette wrote: > Thanks again for clarifying. > > https://codereview.adblockplus.org/29472555/diff/29478561/cms/converters.py > File ...
July 4, 2017, 2:57 p.m. (2017-07-04 14:57:59 UTC) #14
Jon Sonesen
https://codereview.adblockplus.org/29472555/diff/29478561/cms/converters.py File cms/converters.py (right): https://codereview.adblockplus.org/29472555/diff/29478561/cms/converters.py#newcode149 cms/converters.py:149: page_data, cleaned_page = get_page_metadata(params['page'], data) On 2017/07/03 17:42:44, Vasily ...
July 4, 2017, 2:58 p.m. (2017-07-04 14:58:06 UTC) #15
Jon Sonesen
https://codereview.adblockplus.org/29472555/diff/29478561/cms/converters.py File cms/converters.py (right): https://codereview.adblockplus.org/29472555/diff/29478561/cms/converters.py#newcode120 cms/converters.py:120: """Generator which gets per page metadata and cleaned page ...
July 4, 2017, 3:02 p.m. (2017-07-04 15:02:39 UTC) #16
juliandoucette
Question: What is going to happen to acceptableads.com when this lands? (It already defines get_pages_metadata.)
July 6, 2017, 1:27 p.m. (2017-07-06 13:27:51 UTC) #17
Jon Sonesen
On 2017/07/06 13:27:51, juliandoucette wrote: > Question: What is going to happen to http://acceptableads.com when ...
July 6, 2017, 1:29 p.m. (2017-07-06 13:29:06 UTC) #18
Vasily Kuznetsov
LGTM
July 6, 2017, 2:37 p.m. (2017-07-06 14:37:14 UTC) #19
Jon Sonesen
On 2017/07/06 14:37:14, Vasily Kuznetsov wrote: > LGTM Julian, what do you think? Do you ...
July 6, 2017, 3:01 p.m. (2017-07-06 15:01:06 UTC) #20
juliandoucette
July 6, 2017, 5 p.m. (2017-07-06 17:00:51 UTC) #21
Fine by me.

Powered by Google App Engine
This is Rietveld