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

Issue 29370597: Issue 4687 - Add Context Function get_pages_metadata to Test Site (Closed)

Created:
Jan. 2, 2017, 9:30 a.m. by Jon Sonesen
Modified:
June 23, 2017, 9:07 a.m.
Visibility:
Public.

Description

Issue 4867 - Add Context Function get_pages_metadata to Test Site Repository: hg.adblockplus.org/cms

Patch Set 1 #

Total comments: 8

Patch Set 2 : addresses read_page usage, updates return data to include page key value #

Total comments: 6

Patch Set 3 : remove per line page assignment fix argument and data access errors #

Total comments: 10

Patch Set 4 : #

Total comments: 6

Patch Set 5 : #

Total comments: 2

Patch Set 6 : #

Total comments: 7

Patch Set 7 : realized that later when we add json the filter syntax will have to change anyway. #

Total comments: 4

Patch Set 8 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+88 lines, -0 lines) Patch
A tests/expected_output/sitemap View 1 2 3 4 5 6 7 1 chunk +15 lines, -0 lines 0 comments Download
A tests/test_site/globals/get_pages_metadata.py View 1 2 3 4 5 6 7 1 chunk +49 lines, -0 lines 0 comments Download
A tests/test_site/pages/sitemap.tmpl View 1 2 3 4 5 6 7 1 chunk +24 lines, -0 lines 0 comments Download

Messages

Total messages: 51
Jon Sonesen
Jan. 2, 2017, 9:30 a.m. (2017-01-02 09:30:22 UTC) #1
Jon Sonesen
Here is my implementation of the page metadata fetcher. I found that splitting the metadata ...
Jan. 2, 2017, 12:40 p.m. (2017-01-02 12:40:49 UTC) #2
Vasily Kuznetsov
Looks good and it looks like it works. However, should not we also add a ...
Jan. 10, 2017, 7:34 p.m. (2017-01-10 19:34:25 UTC) #3
Vasily Kuznetsov
I looked at the code a bit more and played with the output, see the ...
Jan. 11, 2017, 10:52 a.m. (2017-01-11 10:52:44 UTC) #4
Jon Sonesen
Thanks for taking the time to look closer at this. My apologies on the oversights, ...
Jan. 11, 2017, 5:37 p.m. (2017-01-11 17:37:04 UTC) #5
Jon Sonesen
On 2017/01/10 19:34:25, Vasily Kuznetsov wrote: > Looks good and it looks like it works. ...
Jan. 11, 2017, 6:41 p.m. (2017-01-11 18:41:27 UTC) #6
Vasily Kuznetsov
Hi Jon! Looking better now but there are a few more things to correct, see ...
Jan. 12, 2017, 10:37 a.m. (2017-01-12 10:37:47 UTC) #7
Sebastian Noack
Perhaps we should still add tests to CMS in order to guarantee the APIs used ...
Jan. 12, 2017, 11:42 a.m. (2017-01-12 11:42:11 UTC) #8
Jon Sonesen
Patch Set 2 I appear to have uploaded a bad patch. https://codereview.adblockplus.org/29370597/diff/29371576/tests/test_site/globals/get_pages_metadata.py File tests/test_site/globals/get_pages_metadata.py (right): ...
Jan. 19, 2017, 7:51 a.m. (2017-01-19 07:51:40 UTC) #9
Jon Sonesen
Addressed previous errors and added a default template as setting the template to empty on ...
Jan. 19, 2017, 9:14 a.m. (2017-01-19 09:14:39 UTC) #10
Vasily Kuznetsov
Hi Jon, Looks good. I noticed that we treat multiple filer values for the same ...
Jan. 20, 2017, 11:53 a.m. (2017-01-20 11:53:38 UTC) #11
Jon Sonesen
On 2017/01/20 11:53:38, Vasily Kuznetsov wrote: > Hi Jon, > > Looks good. I noticed ...
Jan. 23, 2017, 1:52 p.m. (2017-01-23 13:52:07 UTC) #12
juliandoucette
See response below. https://codereview.adblockplus.org/29370597/diff/29372661/tests/test_site/globals/get_pages_metadata.py File tests/test_site/globals/get_pages_metadata.py (right): https://codereview.adblockplus.org/29370597/diff/29372661/tests/test_site/globals/get_pages_metadata.py#newcode40 tests/test_site/globals/get_pages_metadata.py:40: if option not in metadata[filter_name]: On ...
Jan. 23, 2017, 4:59 p.m. (2017-01-23 16:59:31 UTC) #13
juliandoucette
Something came to mind. https://codereview.adblockplus.org/29370597/diff/29372661/tests/test_site/globals/get_pages_metadata.py File tests/test_site/globals/get_pages_metadata.py (right): https://codereview.adblockplus.org/29370597/diff/29372661/tests/test_site/globals/get_pages_metadata.py#newcode40 tests/test_site/globals/get_pages_metadata.py:40: if option not in metadata[filter_name]: ...
Jan. 24, 2017, 1:05 a.m. (2017-01-24 01:05:48 UTC) #14
juliandoucette
Corrections. I just realized that what I said before didn't make sense. https://codereview.adblockplus.org/29370597/diff/29372661/tests/test_site/globals/get_pages_metadata.py File tests/test_site/globals/get_pages_metadata.py ...
Jan. 24, 2017, 1:10 a.m. (2017-01-24 01:10:29 UTC) #15
Vasily Kuznetsov
Thanks for the answer, Julian. I think we got a bit out of sync here, ...
Jan. 24, 2017, 9:24 a.m. (2017-01-24 09:24:46 UTC) #16
juliandoucette
See response below. https://codereview.adblockplus.org/29370597/diff/29372661/tests/test_site/globals/get_pages_metadata.py File tests/test_site/globals/get_pages_metadata.py (right): https://codereview.adblockplus.org/29370597/diff/29372661/tests/test_site/globals/get_pages_metadata.py#newcode40 tests/test_site/globals/get_pages_metadata.py:40: if option not in metadata[filter_name]: On ...
Jan. 24, 2017, 7:32 p.m. (2017-01-24 19:32:56 UTC) #17
Vasily Kuznetsov
Thanks for the clarification, Julian. LGTM https://codereview.adblockplus.org/29370597/diff/29372661/tests/test_site/globals/get_pages_metadata.py File tests/test_site/globals/get_pages_metadata.py (right): https://codereview.adblockplus.org/29370597/diff/29372661/tests/test_site/globals/get_pages_metadata.py#newcode40 tests/test_site/globals/get_pages_metadata.py:40: if option not ...
Jan. 25, 2017, 11:18 a.m. (2017-01-25 11:18:19 UTC) #18
Jon Sonesen
On 2017/01/12 11:42:11, Sebastian Noack wrote: > Perhaps we should still add tests to CMS ...
Jan. 25, 2017, 12:07 p.m. (2017-01-25 12:07:25 UTC) #19
Vasily Kuznetsov
On 2017/01/25 12:07:25, Jon Sonesen wrote: > On 2017/01/12 11:42:11, Sebastian Noack wrote: > > ...
Jan. 25, 2017, 12:35 p.m. (2017-01-25 12:35:46 UTC) #20
juliandoucette
NOT LGTM https://codereview.adblockplus.org/29370597/diff/29372661/tests/test_site/globals/get_pages_metadata.py File tests/test_site/globals/get_pages_metadata.py (right): https://codereview.adblockplus.org/29370597/diff/29372661/tests/test_site/globals/get_pages_metadata.py#newcode28 tests/test_site/globals/get_pages_metadata.py:28: value = tuple(value.strip().split(',')) 1. It's annoying to ...
Feb. 27, 2017, 9:27 p.m. (2017-02-27 21:27:32 UTC) #21
Vasily Kuznetsov
https://codereview.adblockplus.org/29370597/diff/29372661/tests/test_site/globals/get_pages_metadata.py File tests/test_site/globals/get_pages_metadata.py (right): https://codereview.adblockplus.org/29370597/diff/29372661/tests/test_site/globals/get_pages_metadata.py#newcode28 tests/test_site/globals/get_pages_metadata.py:28: value = tuple(value.strip().split(',')) On 2017/02/27 21:27:31, juliandoucette wrote: > ...
Feb. 28, 2017, 11:24 a.m. (2017-02-28 11:24:10 UTC) #22
Jon Sonesen
Hey Julian, Thanks for pointing this out, I agree here it would be annoying to ...
Feb. 28, 2017, 11:59 a.m. (2017-02-28 11:59:18 UTC) #23
Vasily Kuznetsov
On 2017/02/28 11:59:18, Jon Sonesen wrote: > Hey Julian, > > Thanks for pointing this ...
March 1, 2017, 4:46 p.m. (2017-03-01 16:46:30 UTC) #24
juliandoucette
# On one hand String values by default and list values when string starts with ...
March 5, 2017, 9 p.m. (2017-03-05 21:00:29 UTC) #25
Jon Sonesen
On 2017/03/05 21:00:29, juliandoucette wrote: > # On one hand > > String values by ...
March 6, 2017, 10:16 a.m. (2017-03-06 10:16:18 UTC) #26
juliandoucette
> I like this idea, perhaps it could be an optional dir in the site ...
March 6, 2017, 6:22 p.m. (2017-03-06 18:22:17 UTC) #27
Jon Sonesen
On 2017/03/06 18:22:17, juliandoucette wrote: > > I like this idea, perhaps it could be ...
March 7, 2017, 10:29 a.m. (2017-03-07 10:29:38 UTC) #28
Vasily Kuznetsov
On 2017/03/07 10:29:38, Jon Sonesen wrote: > On 2017/03/06 18:22:17, juliandoucette wrote: > > > ...
March 7, 2017, 11:19 a.m. (2017-03-07 11:19:43 UTC) #29
juliandoucette
Let's go with option 2 for now, given that this is a global function and ...
March 7, 2017, 11:48 a.m. (2017-03-07 11:48:38 UTC) #30
Jon Sonesen
On 2017/03/07 11:48:38, juliandoucette wrote: > Let's go with option 2 for now, given that ...
March 7, 2017, 12:37 p.m. (2017-03-07 12:37:01 UTC) #31
juliandoucette
> Great, I will do this. One question, are tags with commas something you want? ...
March 7, 2017, 1:36 p.m. (2017-03-07 13:36:43 UTC) #32
Jon Sonesen
On 2017/03/07 13:36:43, juliandoucette wrote: > > Great, I will do this. One question, are ...
March 8, 2017, 4:17 p.m. (2017-03-08 16:17:27 UTC) #33
Vasily Kuznetsov
Hey Jon, I have a couple of nits about whitespace handling and being more careful ...
March 8, 2017, 5:07 p.m. (2017-03-08 17:07:42 UTC) #34
Jon Sonesen
Thanks for pointing out those things :) https://codereview.adblockplus.org/29370597/diff/29378682/tests/test_site/globals/get_pages_metadata.py File tests/test_site/globals/get_pages_metadata.py (right): https://codereview.adblockplus.org/29370597/diff/29378682/tests/test_site/globals/get_pages_metadata.py#newcode28 tests/test_site/globals/get_pages_metadata.py:28: value = ...
March 8, 2017, 5:47 p.m. (2017-03-08 17:47:17 UTC) #35
Vasily Kuznetsov
https://codereview.adblockplus.org/29370597/diff/29378942/tests/test_site/globals/get_pages_metadata.py File tests/test_site/globals/get_pages_metadata.py (right): https://codereview.adblockplus.org/29370597/diff/29378942/tests/test_site/globals/get_pages_metadata.py#newcode30 tests/test_site/globals/get_pages_metadata.py:30: value = value[1:-1].strip().split(',') It should be the other way ...
March 9, 2017, 9:46 a.m. (2017-03-09 09:46:13 UTC) #36
Jon Sonesen
On 2017/03/09 09:46:13, Vasily Kuznetsov wrote: > https://codereview.adblockplus.org/29370597/diff/29378942/tests/test_site/globals/get_pages_metadata.py > File tests/test_site/globals/get_pages_metadata.py (right): > > https://codereview.adblockplus.org/29370597/diff/29378942/tests/test_site/globals/get_pages_metadata.py#newcode30 ...
March 9, 2017, 9:53 a.m. (2017-03-09 09:53:29 UTC) #37
Jon Sonesen
https://codereview.adblockplus.org/29370597/diff/29378942/tests/test_site/globals/get_pages_metadata.py File tests/test_site/globals/get_pages_metadata.py (right): https://codereview.adblockplus.org/29370597/diff/29378942/tests/test_site/globals/get_pages_metadata.py#newcode30 tests/test_site/globals/get_pages_metadata.py:30: value = value[1:-1].strip().split(',') On 2017/03/09 09:46:13, Vasily Kuznetsov wrote: ...
March 10, 2017, 9:17 a.m. (2017-03-10 09:17:26 UTC) #38
Vasily Kuznetsov
Hey Jon, I see you changed the matching algoritm in `filter_metadata` -- good catch, I ...
March 10, 2017, 10:23 a.m. (2017-03-10 10:23:38 UTC) #39
Jon Sonesen
Thanks for catching these :) https://codereview.adblockplus.org/29370597/diff/29379591/tests/test_site/globals/get_pages_metadata.py File tests/test_site/globals/get_pages_metadata.py (right): https://codereview.adblockplus.org/29370597/diff/29379591/tests/test_site/globals/get_pages_metadata.py#newcode41 tests/test_site/globals/get_pages_metadata.py:41: for option in filter_value.split(','): ...
March 10, 2017, 11:01 a.m. (2017-03-10 11:01:32 UTC) #40
Jon Sonesen
Just realized we will have the change the filter syntax to json see coment https://codereview.adblockplus.org/29370597/diff/29379591/tests/test_site/globals/get_pages_metadata.py ...
March 10, 2017, 11:43 a.m. (2017-03-10 11:43:38 UTC) #41
Jon Sonesen
realized that later when we add json the filter syntax will have to change anyway.
March 10, 2017, 11:52 a.m. (2017-03-10 11:52:53 UTC) #42
Jon Sonesen
realized that later when we add json the filter syntax will have to change anyway.
March 10, 2017, 11:53 a.m. (2017-03-10 11:53:55 UTC) #43
Vasily Kuznetsov
Hey Jon, I like the change in the API towards accepting lists for filter values ...
March 15, 2017, 6:02 p.m. (2017-03-15 18:02:58 UTC) #44
Jon Sonesen
Hey Vasily, Thank you for catching those things, my bad for the oversight. I will ...
March 17, 2017, 7:53 a.m. (2017-03-17 07:53:34 UTC) #45
Vasily Kuznetsov
LGTM
March 17, 2017, 10:35 a.m. (2017-03-17 10:35:38 UTC) #46
juliandoucette
On 2017/03/17 10:35:38, Vasily Kuznetsov wrote: > LGTM What are our plans around integrating this ...
March 28, 2017, 4:56 p.m. (2017-03-28 16:56:42 UTC) #47
Vasily Kuznetsov
On 2017/03/28 16:56:42, juliandoucette wrote: > On 2017/03/17 10:35:38, Vasily Kuznetsov wrote: > > LGTM ...
March 28, 2017, 6:21 p.m. (2017-03-28 18:21:59 UTC) #48
juliandoucette
> I would say if you're happy with how it works and you would like ...
April 5, 2017, 11:49 a.m. (2017-04-05 11:49:35 UTC) #49
juliandoucette
I'm probably going to use this to complete #5043 on acceptableads.com. I think this warrants ...
June 16, 2017, 7:44 p.m. (2017-06-16 19:44:14 UTC) #50
Jon Sonesen
June 23, 2017, 9:07 a.m. (2017-06-23 09:07:26 UTC) #51
Message was sent while issue was closed.
On 2017/06/16 19:44:14, juliandoucette wrote:
> I'm probably going to use this to complete #5043 on http://acceptableads.com.
I think
> this warrants implementing this function in adblockplus/cms.

Sure, closing this review and opening another for the merge into a default
global

Powered by Google App Engine
This is Rietveld