Re: Customizable Serialization check-in

2012-08-24 Thread Russell Keith-Magee
Hi Piotr, Thank you so much for your efforts over the summer. I'd also like to apologise for my lack of communication; I certainly haven't been a model mentor over the course of the program. Although we may not have achieved all the goals we set out to achieve at the start of the program, I don'

Re: Customizable Serialization check-in

2012-08-24 Thread Tom Christie
Thanks Piotr, It's been interesting and helpful watching your progress on this project. I wouldn't worry too much about not quite meeting all the goals you'd hoped for - it's a deceptively difficult task. In particular it's really difficult trying to maintain full backwards comparability with

Re: Customizable Serialization check-in

2012-08-22 Thread Piotr Grabowski
Hi, Google Sumer of Code is almost ended. I was working on customizable serialization. This project was a lot harder than I expected, and sadly in my opinion I failed to do it right. I want to apologize for that and especially for my poor communication with this group and my mentor. I want to

Re: Customizable Serialization check-in

2012-08-06 Thread Piotr Grabowski
Hi, In the past 3 weeks, my project has changed a lot. First of all I changed output of first phase of serialization. Previously it was python native datatypes. At some point I added dictionary with metadata to it. Metadata was used in second phase of serialization. Now after first phase I re

Re: Customizable Serialization check-in

2012-07-12 Thread Piotr Grabowski
W dniu 11.07.2012 14:04, Russell Keith-Magee pisze: There is still problem with API and how to do some things but in my opinion it's going in right direction. Generally, I agree. I still have some concerns however; mostly around the things that you're putting onto the Meta class. related_serial

Re: Customizable Serialization check-in

2012-07-11 Thread Russell Keith-Magee
On Wed, Jul 11, 2012 at 8:18 AM, Piotr Grabowski wrote: > Hi, > > It is time to midterm evaluation of my participation in gsoc so I want to > summarize in this check-in what I have done in last month. > https://gist.github.com/3085250 - here is something that can be > "documentation". I wrote some

Re: Customizable Serialization check-in

2012-07-10 Thread Piotr Grabowski
Hi, It is time to midterm evaluation of my participation in gsoc so I want to summarize in this check-in what I have done in last month. https://gist.github.com/3085250 - here is something that can be "documentation". I wrote some examples of ModelSerializer usage and how it should work. https

Re: Customizable Serialization check-in

2012-06-28 Thread Piotr Grabowski
W dniu 26.06.2012 11:52, Tom Christie pisze: > It is the way I am doing deserialization - pass instance to subfields Seems fine. It's worth keeping in mind that there's two ways around of doing this. 1. Create an empty instance first, then populate it with the field values in turn. 2. Popul

Re: Customizable Serialization check-in

2012-06-26 Thread Tom Christie
> default deserialized_value don't returns anything. It sets the field value. Cool, that's exactly what I meant. > but declaring function only to say "do nothing" isn't good solution for me. Declaring a method to simply 'pass' seems fine to me if you want to override it to do nothing. > It

Re: Customizable Serialization check-in

2012-06-20 Thread Piotr Grabowski
W dniu 20.06.2012 13:50, Tom Christie pisze: >deserialized_value function with empty content Are you asking about how to be able to differentiate between a field that deserializes to `None`, and a field that doesn't deserialize a value at all? No :) I had this problem before and I managed to

Re: Customizable Serialization check-in

2012-06-20 Thread Tom Christie
> if I put list in input I want list in output, not generator I wouldn't worry about that. The input and output should be *comparable*, but it doesn't mean they should be *identical*. A couple of cases for example: *) You should be able to pass both lists and generator expressions to a given s

Re: Customizable Serialization check-in

2012-06-19 Thread Piotr Grabowski
Hi! This week I wrote simple serialization and deserialization for json format so it's possible now to encode objects from and to json: import django.core.serializers as s class Foo(object): def __init__(self): self.bar = [Bar(), Bar(), Bar()] self.x = "X" class Bar(obje

Re: Customizable Serialization check-in

2012-06-11 Thread Piotr Grabowski
Hi! This week I managed to write deserialization functions and tests. *Issues with deserialization* Working on deserialization give me a lot thoughts about previous concepts. I rewrite Field class so now Field can't be nested. Field can only have subfields if subfields are attributes: class C

Re: Customizable Serialization check-in

2012-06-04 Thread Piotr Grabowski
Hi, Sorry for being late with weekly update. Due to some issues with Meta and my wrong understanding of metaclasses that Russell pointed I spend time on enhance my knowledge about this. I rewrote also some part of code that I have written week before. This week I will do what I was suppose to

Re: Customizable Serialization check-in

2012-05-30 Thread Piotr Grabowski
W dniu 29.05.2012 02:28, Russell Keith-Magee pisze: Hi Piotr; Apologies for the delay in responding to your updated API. On Tue, May 22, 2012 at 6:59 AM, Piotr Grabowski wrote: I do some changes to my previous API: (https://gist.github.com/2597306<- change are included) * which fields of o

Re: Customizable Serialization check-in

2012-05-28 Thread Russell Keith-Magee
Hi Piotr; Apologies for the delay in responding to your updated API. On Tue, May 22, 2012 at 6:59 AM, Piotr Grabowski wrote: > I do some changes to my previous API: (https://gist.github.com/2597306 <- > change are included) > >  * which fields of object are default serialized. It's depend on > i

Re: Customizable Serialization check-in

2012-05-27 Thread Anssi Kääriäinen
On May 27, 7:37 pm, Piotr Grabowski wrote: > Hi, > > This week I started coding my project. It' available on branch > soc2012-serialization onhttps://github.com/grapo/django. > > I'm not very familiar with git so I'm not suer that I do it right: > * I forked django repo from github > * clone it to

Re: Customizable Serialization check-in

2012-05-27 Thread Piotr Grabowski
Hi, This week I started coding my project. It' available on branch soc2012-serialization on https://github.com/grapo/django. I'm not very familiar with git so I'm not suer that I do it right: * I forked django repo from github * clone it to my computer * create new branch soc2012 * work in thi

Re: Customizable Serialization check-in

2012-05-21 Thread Piotr Grabowski
I do some changes to my previous API: (https://gist.github.com/2597306 <- change are included) * which fields of object are default serialized. It's depend on include_default_field but opposite to Tom Christie solution it's default value is True so all fields (eventually specified in Meta.mod

Re: Customizable Serialization check-in

2012-05-20 Thread Piotr Grabowski
Hi, During this week I was focused on my exams. Now I have more time for serialization project. Sadly API isn't finished yet. 21 May in gsoc calendar is time for start coding. Tomorrow I will send updates to API proposal and I will present idea of algorithm (maybe list of steps will be better

Re: Customizable Serialization check-in

2012-05-12 Thread Piotr Grabowski
Hi, This week I think about internal API for Serializer. I want that developers can eventually use it for better customization of their solutions. Next week I must learn for my exams so I suppose I will not do much with serialization project. I will try to resolve some issues about my API t

Re: Customizable Serialization check-in

2012-05-07 Thread Piotr Grabowski
W dniu 07.05.2012 20:13, Tom Christie pisze: Hey Piotr, Here's a few comments... You have 'fields' and 'exclude' option, but it feels like it's missing an 'include' option - How would you represent serializing all the fields on a model instance (without replicating them), and additionally in

Re: Customizable Serialization check-in

2012-05-07 Thread Piotr Grabowski
W dniu 06.05.2012 10:45, Russell Keith-Magee pisze: - I'm not sure I follow how class_name would be used in practice. The act of deserialization is to take a block of data, and process it to populate an object. In the simplest case, you could provide an empty instance (or factory) that is the

Re: Customizable Serialization check-in

2012-05-07 Thread Tom Christie
Hey Piotr, Here's a few comments... You have 'fields' and 'exclude' option, but it feels like it's missing an 'include' option - How would you represent serializing all the fields on a model instance (without replicating them), and additionally including one other field? I see that you could

Re: Customizable Serialization check-in

2012-05-06 Thread Russell Keith-Magee
On Sat, May 5, 2012 at 4:08 AM, Piotr Grabowski wrote: > Hi, > > During this week I have a lot of work so I didn't manage to present my > revised proposal in Monday like i said. Sorry. I have it now: > https://gist.github.com/2597306 Hi Piotr, At a high level, I think you're headed in the right

Re: Customizable Serialization check-in

2012-05-04 Thread Piotr Grabowski
Hi, During this week I have a lot of work so I didn't manage to present my revised proposal in Monday like i said. Sorry. I have it now: https://gist.github.com/2597306 Next week I hope there will be some discussion about my proposal. I will also think how it should be done under the hood. Th

Re: Customizable Serialization check-in

2012-04-27 Thread Piotr Grabowski
W dniu 27.04.2012 12:39, Tom Christie pisze: Hey Piotr, > I quickly skimmed the proposal and I noticed speed/performance wasn't mentioned. I believe performance is important in serialization and especially in deserialization. Right. Also worth considering is making sure the API can deal with

Re: Customizable Serialization check-in

2012-04-27 Thread Tom Christie
Hey Piotr, Thanks for the quick response. > However sharing ideas and discuss how the API should look and work it will be very desirable. That'd be great, yup. I've got a couple of comments and questions about bits of the API, but I'll wait until you've had a chance to post your proposal t

Re: Customizable Serialization check-in

2012-04-27 Thread Anssi Kääriäinen
On Apr 27, 12:11 pm, Piotr Grabowski wrote: > I didn't think about performance a lot. There will be regressions. > Now serialization is very simple: Iterate over fields, transform it into > string (or somethink serializable), serialize it with json|yaml|xml. > In my approach it is: transform (Mode

Re: Customizable Serialization check-in

2012-04-27 Thread Piotr Grabowski
W dniu 27.04.2012 10:36, Anssi Kääriäinen pisze: On Apr 27, 11:14 am, Piotr Grabowski wrote: Hi! I'm Piotr Grabowski, student from University of Wroclaw, Poland In this Google Summer of Code I will deal with problem of customizable serialization in Django. You can find my proposal here https

Re: Customizable Serialization check-in

2012-04-27 Thread Anssi Kääriäinen
On Apr 27, 11:14 am, Piotr Grabowski wrote: > Hi! > > I'm Piotr Grabowski, student from University of Wroclaw, Poland > In this Google Summer of Code I will  deal with problem of customizable > serialization in Django. > > You can find my proposal here https://gist.github.com/2319638 I quickly sk

[GSoC] Customizable Serialization check-in

2012-04-27 Thread Piotr Grabowski
Hi! I'm Piotr Grabowski, student from University of Wroclaw, Poland In this Google Summer of Code I will deal with problem of customizable serialization in Django. You can find my proposal here https://gist.github.com/2319638 It's obviously not a finished idea, it's need to be simplified for