GSoC Proposal: (Migrations) Adapt schema editors to operate from model states instead of fake rendered models.

242 views
Skip to first unread message

Manav Agarwal

unread,
Apr 1, 2021, 5:39:46 PM4/1/21
to Django developers (Contributions to Django itself)
Hello everyone,
My name is Manav. I’m a Computer Science and Engineering junior at Dr. A.P.J. Abdul Kalam Technical University in India.
I started contributing to Django in October 2020 and have solved many issues on trac.
I read through the GSoC Idea List and the Migration topic stood out for me. I found the idea to adapt schema editors to operate from model states instead of fake rendered models really interesting.
I am working on this for the last 1 month and I have made myself familiar with the whole migrations framework codebase. I drafted a basic proposal in which I would be updating the complete solution after some discussion to make the solution more concrete, practical, and effective.
The problem with the Migration framework is briefly described in the proposal itself.
After understanding the problem I came up with a few solutions which are listed below:
  1. As Suggested by @MarkusH, A central registry to store all dependencies in django.apps.registry.Apps

    Or

  2. Designing a new metaclass for ModelState just like we have ModelBase for Model. As then we would be able to use Options with _meta in ModelState which will help in fetching the field details.
Personally, I found Migration Framework damn interesting. I would love to optimize the Migration framework. Just need some more points which I can add in my proposed solution to make it more concrete.
I request fellow developers to please help me with their respective suggestions, thoughts or feedback, so that I may develop a better and practical proposal.

Regards,
Manav Agarwal

Manav Agarwal

unread,
Apr 4, 2021, 11:11:32 PM4/4/21
to Django developers (Contributions to Django itself)
I have added the proposed solution in the proposal.
I request fellow developers to please help me with their respective suggestions, thoughts or feedback, so that I may develop a better and practical proposal.

Regards,
Manav Agarwal

Manav Agarwal

unread,
Apr 4, 2021, 11:12:09 PM4/4/21
to Django developers (Contributions to Django itself)

Carlton Gibson

unread,
Apr 6, 2021, 9:39:30 AM4/6/21
to django-d...@googlegroups.com
Hi Manav. 

Sorry for the late reply. 

Your proposal looks very good, and your previous contributions are noticed. 
You’ve obviously taken time to look at it in depth. 

I think just going over it this week as time allows to maximise clarity is worth it. That’s always time well spent. (Generally there are a lot of applications, so making yours stand out as focused and to the point both demonstrates your capacity and makes the reviewer’s job easier.) 

I hope that helps. 

Kind regards, Carlton 
--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/6bcbfb8d-f5a3-409c-b5f9-a5faa3f5151en%40googlegroups.com.

Manav Agarwal

unread,
Apr 7, 2021, 2:13:54 AM4/7/21
to django-d...@googlegroups.com
Thank You Carlton for the feedback.

As per your suggestion, I have increased the clarity of the proposal with some code and implementation. I will try to maximize the clarity as much as possible.

Till then, May you please suggest, that Shall I share my proposal as a draft at GSoC Portal.

Also, it would be great if you may suggest the possible improvement areas in the proposal, or does it seems fine?

Regards
Manav Agarwal



--
Regards
Manav Agarwal

https://www.linkedin.com/in/manav-agarwal-982553190/

"If your actions inspire others to dream more, learn more, do more and become more, you are a leader.”

Carlton Gibson

unread,
Apr 7, 2021, 9:39:46 AM4/7/21
to Django developers (Contributions to Django itself)
Hi Manav. 

You should definitely submit. Your proposal is quite detailed, so I'd need to sit down with it more fully than I have time to comment on this week. 
(But that's OK — even if your implementation idea needs revision, THAT you've considered it is important.) 

Having said that: 

* You have "testing & docs" tacked on at the end in your schedule. Identify the phases and include time to write the tests as you go. In phase 1, how will you know that your central registry is correctly tracking model relationships unless you write tests? (You won't...)

* Maybe you did this already but, review the points Simon Charette made in the thread on this topic last year: https://groups.google.com/g/django-developers/c/_ohBzsuomqw/m/cEI8eoK7BQAJ — There are large parts of a solution to this problem there. It would be good if on review your proposal uses Simon's suggestions. 

Please do use this week to make your proposal as good as you can and submit. (I can't see that I'll have capacity to review another draft, but equally you should have enough to go on now.) 

I wish you luck! 

Kind Regards,

Carlton


Manav Agarwal

unread,
Apr 7, 2021, 9:47:58 PM4/7/21
to django-d...@googlegroups.com
Hey Carlton.

I have submitted the proposal.
Also, Your suggestion of adding tests with the introduction of a new central registry seems great and I have implemented the same in phase 1.
Also, I already added all the points suggested by Simon Charette from the discussion(https://groups.google.com/g/django-developers/c/_ohBzsuomqw/m/cEI8eoK7BQAJ).
Last but not least, I will try to make my proposal more clear in the coming week till the deadline.
I understand that as the proposal is detailed you will have to sit down with it more fully but you don't have time for the same and It's totally fine.

Thank You for your suggestions that always help a lot.


Manav Agarwal

unread,
May 20, 2021, 1:39:26 PM5/20/21
to Django developers (Contributions to Django itself)
Hello everyone,
I am so very thankful to everyone who helped me out with my project idea and proposal. The proposal is accepted and I will give my best to accomplish as I have promised.

Carlton Gibson

unread,
May 21, 2021, 2:28:24 PM5/21/21
to django-d...@googlegroups.com
Hi Manav. Welcome aboard! 🙂
To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/8fc76e6c-7010-46f6-9f03-75433807a212n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages