http://codereview.appspot.com/1596041/diff/1/3 File schedule_editor.py (right): http://codereview.appspot.com/1596041/diff/1/3#newcode349 schedule_editor.py:349: return stopsinbounds Why do you move the for loop ...
13 years, 10 months ago
(2010-06-08 02:21:35 UTC)
#2
13 years, 10 months ago
(2010-06-08 02:48:50 UTC)
#3
updated
http://codereview.appspot.com/1596041/diff/1/3
File schedule_editor.py (right):
http://codereview.appspot.com/1596041/diff/1/3#newcode349
schedule_editor.py:349: return stopsinbounds
On 2010/06/08 02:21:36, weiliu wrote:
> Why do you move the for loop (line 340 ~ 348) out of transitfeed_editor.py and
> put them here?
it is for the thoughts that transitfeed_editor would be more data centric and
avoid specifying data format, and the schedule_editor would handle the data
format for the requests from user.
http://codereview.appspot.com/1596041/diff/1/2
File transitfeed_editor.py (right):
http://codereview.appspot.com/1596041/diff/1/2#newcode668
transitfeed_editor.py:668: " trips.route_id = '%s';" % rid)
On 2010/06/08 02:21:36, weiliu wrote:
> put trips.route_id = '%s';" % rid at the beginning of "where ..." so that the
> sql can be optimized.
Done.
On Tue, Jun 8, 2010 at 10:48 AM, <calidion@gmail.com> wrote: > updated > > > ...
13 years, 10 months ago
(2010-06-08 02:54:15 UTC)
#4
On Tue, Jun 8, 2010 at 10:48 AM, <calidion@gmail.com> wrote:
> updated
>
>
>
> http://codereview.appspot.com/1596041/diff/1/3
> File schedule_editor.py (right):
>
> http://codereview.appspot.com/1596041/diff/1/3#newcode349
> schedule_editor.py:349: return stopsinbounds
> On 2010/06/08 02:21:36, weiliu wrote:
>
>> Why do you move the for loop (line 340 ~ 348) out of
>>
> transitfeed_editor.py and
>
>> put them here?
>>
>
> it is for the thoughts that transitfeed_editor would be more data
> centric and avoid specifying data format, and the schedule_editor would
> handle the data format for the requests from user.
Is there any other case that you don't want to the same format as follows?
*342* 'id': stop[0], *343* 'name': stop[1], *344* 'lat': stop[2],
*345* 'lng':
stop[3], *346* 'parentStation': stop[4], *347* 'locationType': stop[5]
If yes, I think it reasonable to move it out of transitfeed_editor.
>
> http://codereview.appspot.com/1596041/diff/1/2
> File transitfeed_editor.py (right):
>
> http://codereview.appspot.com/1596041/diff/1/2#newcode668
> transitfeed_editor.py:668: " trips.route_id = '%s';" % rid)
> On 2010/06/08 02:21:36, weiliu wrote:
>
>> put trips.route_id = '%s';" % rid at the beginning of "where ..." so
>>
> that the
>
>> sql can be optimized.
>>
>
> Done.
>
>
> http://codereview.appspot.com/1596041/show
>
--
Best Regards,
Wei Liu
86-10-62503256(o)
2010/6/8 Wei Liu <weiliu@google.com> > > > On Tue, Jun 8, 2010 at 10:48 AM, ...
13 years, 10 months ago
(2010-06-08 03:01:50 UTC)
#5
2010/6/8 Wei Liu <weiliu@google.com>
>
>
> On Tue, Jun 8, 2010 at 10:48 AM, <calidion@gmail.com> wrote:
>
>> updated
>>
>>
>>
>> http://codereview.appspot.com/1596041/diff/1/3
>> File schedule_editor.py (right):
>>
>> http://codereview.appspot.com/1596041/diff/1/3#newcode349
>> schedule_editor.py:349: return stopsinbounds
>> On 2010/06/08 02:21:36, weiliu wrote:
>>
>>> Why do you move the for loop (line 340 ~ 348) out of
>>>
>> transitfeed_editor.py and
>>
>>> put them here?
>>>
>>
>> it is for the thoughts that transitfeed_editor would be more data
>> centric and avoid specifying data format, and the schedule_editor would
>> handle the data format for the requests from user.
>
>
> Is there any other case that you don't want to the same format as follows?
>
it may be good for us to change the format from json to XML or something
else.
like
<Stop>
<ID>stop[0]</ID>
<name>stop[1]</name>
....
</Stop>
>
> *342* 'id': stop[0], *343* 'name': stop[1], *344* 'lat': stop[2], *345
> * 'lng': stop[3], *346* 'parentStation': stop[4], *347* 'locationType':
> stop[5]
>
> If yes, I think it reasonable to move it out of transitfeed_editor.
>
>>
>> http://codereview.appspot.com/1596041/diff/1/2
>> File transitfeed_editor.py (right):
>>
>> http://codereview.appspot.com/1596041/diff/1/2#newcode668
>> transitfeed_editor.py:668: " trips.route_id = '%s';" % rid)
>> On 2010/06/08 02:21:36, weiliu wrote:
>>
>>> put trips.route_id = '%s';" % rid at the beginning of "where ..." so
>>>
>> that the
>>
>>> sql can be optimized.
>>>
>>
>> Done.
>>
>>
>> http://codereview.appspot.com/1596041/show
>>
>
>
>
> --
> Best Regards,
> Wei Liu
> 86-10-62503256(o)
>
LGTM On Tue, Jun 8, 2010 at 11:01 AM, <李白> wrote: > > > 2010/6/8 ...
13 years, 10 months ago
(2010-06-08 03:09:43 UTC)
#6
LGTM
On Tue, Jun 8, 2010 at 11:01 AM, <李白> wrote:
>
>
> 2010/6/8 Wei Liu <weiliu@google.com>
>
>
>>
>> On Tue, Jun 8, 2010 at 10:48 AM, <calidion@gmail.com> wrote:
>>
>>> updated
>>>
>>>
>>>
>>> http://codereview.appspot.com/1596041/diff/1/3
>>> File schedule_editor.py (right):
>>>
>>> http://codereview.appspot.com/1596041/diff/1/3#newcode349
>>> schedule_editor.py:349: return stopsinbounds
>>> On 2010/06/08 02:21:36, weiliu wrote:
>>>
>>>> Why do you move the for loop (line 340 ~ 348) out of
>>>>
>>> transitfeed_editor.py and
>>>
>>>> put them here?
>>>>
>>>
>>> it is for the thoughts that transitfeed_editor would be more data
>>> centric and avoid specifying data format, and the schedule_editor would
>>> handle the data format for the requests from user.
>>
>>
>> Is there any other case that you don't want to the same format as
>> follows?
>>
>
> it may be good for us to change the format from json to XML or something
> else.
> like
> <Stop>
> <ID>stop[0]</ID>
> <name>stop[1]</name>
> ....
> </Stop>
>
>
>>
>> *342* 'id': stop[0], *343* 'name': stop[1], *344* 'lat': stop[2], *
>> 345* 'lng': stop[3], *346* 'parentStation': stop[4], *347* 'locationType':
>> stop[5]
>>
>> If yes, I think it reasonable to move it out of transitfeed_editor.
>>
>>>
>>> http://codereview.appspot.com/1596041/diff/1/2
>>> File transitfeed_editor.py (right):
>>>
>>> http://codereview.appspot.com/1596041/diff/1/2#newcode668
>>> transitfeed_editor.py:668: " trips.route_id = '%s';" % rid)
>>> On 2010/06/08 02:21:36, weiliu wrote:
>>>
>>>> put trips.route_id = '%s';" % rid at the beginning of "where ..." so
>>>>
>>> that the
>>>
>>>> sql can be optimized.
>>>>
>>>
>>> Done.
>>>
>>>
>>> http://codereview.appspot.com/1596041/show
>>>
>>
>>
>>
>> --
>> Best Regards,
>> Wei Liu
>> 86-10-62503256(o)
>>
>
>
--
Best Regards,
Wei Liu
86-10-62503256(o)
updated to rev 89 2010/6/8 Wei Liu <weiliu@google.com> > LGTM > > > On Tue, ...
13 years, 10 months ago
(2010-06-08 04:33:08 UTC)
#7
updated to rev 89
2010/6/8 Wei Liu <weiliu@google.com>
> LGTM
>
>
> On Tue, Jun 8, 2010 at 11:01 AM, <李白> wrote:
>
>>
>>
>> 2010/6/8 Wei Liu <weiliu@google.com>
>>
>>
>>>
>>> On Tue, Jun 8, 2010 at 10:48 AM, <calidion@gmail.com> wrote:
>>>
>>>> updated
>>>>
>>>>
>>>>
>>>> http://codereview.appspot.com/1596041/diff/1/3
>>>> File schedule_editor.py (right):
>>>>
>>>> http://codereview.appspot.com/1596041/diff/1/3#newcode349
>>>> schedule_editor.py:349: return stopsinbounds
>>>> On 2010/06/08 02:21:36, weiliu wrote:
>>>>
>>>>> Why do you move the for loop (line 340 ~ 348) out of
>>>>>
>>>> transitfeed_editor.py and
>>>>
>>>>> put them here?
>>>>>
>>>>
>>>> it is for the thoughts that transitfeed_editor would be more data
>>>> centric and avoid specifying data format, and the schedule_editor would
>>>> handle the data format for the requests from user.
>>>
>>>
>>> Is there any other case that you don't want to the same format as
>>> follows?
>>>
>>
>> it may be good for us to change the format from json to XML or something
>> else.
>> like
>> <Stop>
>> <ID>stop[0]</ID>
>> <name>stop[1]</name>
>> ....
>> </Stop>
>>
>>
>>>
>>> *342* 'id': stop[0], *343* 'name': stop[1], *344* 'lat': stop[2], *
>>> 345* 'lng': stop[3], *346* 'parentStation': stop[4], *347* 'locationType':
>>> stop[5]
>>>
>>> If yes, I think it reasonable to move it out of transitfeed_editor.
>>>
>>>>
>>>> http://codereview.appspot.com/1596041/diff/1/2
>>>> File transitfeed_editor.py (right):
>>>>
>>>> http://codereview.appspot.com/1596041/diff/1/2#newcode668
>>>> transitfeed_editor.py:668: " trips.route_id = '%s';" % rid)
>>>> On 2010/06/08 02:21:36, weiliu wrote:
>>>>
>>>>> put trips.route_id = '%s';" % rid at the beginning of "where ..." so
>>>>>
>>>> that the
>>>>
>>>>> sql can be optimized.
>>>>>
>>>>
>>>> Done.
>>>>
>>>>
>>>> http://codereview.appspot.com/1596041/show
>>>>
>>>
>>>
>>>
>>> --
>>> Best Regards,
>>> Wei Liu
>>> 86-10-62503256(o)
>>>
>>
>>
>
>
> --
> Best Regards,
> Wei Liu
> 86-10-62503256(o)
>
Issue 1596041: Get trip info by route id from database
Created 13 years, 10 months ago by calidion
Modified 7 years, 4 months ago
Reviewers: lychen, xan_google.com, weiliu, leio.chen, baiming
Base URL: http://scheduleeditor.googlecode.com/svn/trunk/v2/
Comments: 4