GSoC'23 Mid-term evaluation with Django Software Foundation

Introduction

Welcome back to my blog! I am thrilled to share the exciting progress of my journey with Google Summer of Code (GSoC) 2023 in collaboration with the Django Software Foundation (DSF). GSoC is an incredible opportunity for students to contribute to open-source projects, and I feel fortunate to be part of this prestigious program. The mid-term evaluation for a Hard project was from 10th July 2023 to 14th July 2023 and I have successfully passed it.

Django Software Foundation and GSoC:

The Django Software Foundation is a non-profit organization that supports the development of Django, a popular Python web framework. It empowers developers to build secure, scalable, and maintainable web applications. GSoC is an annual program that connects students with open-source projects, allowing them to gain real-world experience while contributing to the software community.

My Project

For this year's GSoC, I was selected to work on the feature to allow moving a model between apps. With the implementation of this feature, anyone can easily move a model from one app to another app without any data loss and minimal downtime in production. I created a draft PR for my proposal but there were some modifications suggested by my mentor to make the process of moving the model more faster and efficient. As per the new approach we have to specify the old db table name for the moved model so that it is not rebuilt at the database level while moving a model. The basic idea was to perform all the operations on state only without bothering the database.

Mid-Term Progress

As I reached the mid-term evaluation milestone, I'm excited to report the significant strides we've made so far:

  1. Auto-detecting moved model: I created a new method in autodetector.py file which will auto-detect the moved model and generate the migrations automatically for moving the model.

  2. Making AlterField no-op: When a model is moved, there might be some AlterField operations for the FKs referencing a moved model. These operations might not be required to be performed on the database(still working on this).

  3. Writing tests: I wrote tests for the migration that were created automatically when a model is moved and one test for actually moving a model.

Challenges Faced

Working on an open-source project within a limited timeframe is exhilarating but challenging. Some of the hurdles I encountered include:

  1. Compatibility: Ensuring my changes do not adversely affect existing projects and are compatible with different Django versions demanded careful attention and rigorous testing.

  2. Auto-detecting mechanism: Adding code to the autodetection was a bit tricky part. Generating correct dependencies was also a challenge, I had to study the code of the auto-detector to understand the dependency system.

Community and Mentors

One of the most enriching aspects of this journey has been the vibrant and welcoming DSF community. My mentors have been instrumental in guiding me, providing valuable insights, and resolving queries promptly. Their support has been invaluable, making the learning process more enjoyable and productive.

Looking Ahead

As I progress towards the final evaluation, my focus remains more on testing this feature with as many use cases as possible and documenting it. I tested my initial approach with 5 different test cases in a Django project but since the changed approach was very similar I did not test the new changes thoroughly which I shouldn't have done. I will be working more on the feedback given by my mentors and make this program successful by completing my project.

Conclusion

Participating in GSoC '23 with the Django Software Foundation has been a transformative experience. I am grateful for the chance to contribute to this widely used open-source project and be part of a vibrant and supportive community. The journey so far has strengthened my technical skills, teamwork abilities, and passion for open-source development. I am excited to see what the future holds and am committed to continuing my journey with Django even after GSoC concludes.

Thank you for joining me on this adventure, and stay tuned for more updates as I approach the final evaluation of GSoC '23!