On 11 February 2012 23:11, Rodolfo Gonzalez <rgonzale...@yahoo.com> wrote:
> Hi all,
>
> I was trying to figure out how to implement this [display locations] feature.
>
> To reduce the time of parsing gpx files I considered two options:
>
> 1 Create a new table in the database.
>
> 2 Change the gpx object so the parsing is stopped after getting the first
> point while maintaining the current functionality.

In my opinion GPX parsing should be used for file import only and we
should not be storing GPX files internally. I would go for something
along the lines of option 1 above - migrate all GPX data into the
database so it is queryable.

> I was also considering how to unit tests the new databases queries and the
> solution I found is to create a directory within pytrainer/test which
> contains a database with a known state so the tests could run on that.

There are two issues with this approach:
1. you should not commit binary files to version control
2. unit tests should not require I/O.

If you want to write automated tests for database queries you are
better off using an in-memory database and setting up the data
programatically.


> I don´t really know how to integrate all this with the GUI. My idea right
> now is to add a button on the week, month, year and totals tabs. This button
> would open a new window showing the locations on the map pretty much like
> the existing map tab.

I think the way the UI is structured currently it is very difficult to
find a sensible way to integrate this functionality so what you have
suggested is probably good enough for now.

> Finally is the issue of accessing the list of activities from a location is
> something I can´t figure out how to implement. Can you click on the map and
> get an event?

I have implemented a generic GTK widget which allows you to receive
events from an embedded web page. I plan on using this for the manual
route entry UI since the existing map integration is inadequate. See
https://github.com/ncjones/PyGtkWebWidget

 - Nathan

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Pytrainer-devel mailing list
Pytrainer-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pytrainer-devel

Reply via email to