[GSoC 2020] Django-Stubs Mypy plugin

Hello everyone!

First of all, I want to apologize for not contacting the community since results were announced. I had a lot of hard work at Uni, as my semester finishes by the end of June. I will do my best trying to combine both GSoC and Uni in the coming weeks. I also hope that Uni authorities will decide to postpone my exam session until September, so I will be completely free to code in July and August.

Second, as I mentioned in my proposal, I want to start with a good plan to stick with, so my work will be more effective in the following months. I’ve went through Mypy documentation, but I feel like I still need a lot more knowledge on Django-Stubs codebase. To choose something to begin with, I think we have to decide if I should focus on refactoring the plugin, basing on existing codebase, or I rather should start the whole thing from scratch. TBH I’m a little bit afraid of choosing the second option, as it seems to be impossible to finish spending only 30 hrs a week on this project.

Assuming I’ll get a green light to focus on refactoring and/or rewriting only some parts of code that require it, I would like to stick to the plan I presented in my proposal. The first step was:

Having a bright plan in mind, I will start by fixing Manager.from_queryset() and Queryset.from_manager() calls. Solving this will create a good foundation for further work, and will be a measurable milestone. Parallel to writing the code, I intend to write documentation and tests for created solutions. (…)

Mr. Sobolev sent me some resources on this one a few weeks ago, as there already exists PR #290 by Mr. Kurnikov, which seems to be a good start. I could start investigating the code, and later fetch the PR branch into my local repo and continue working on this (or to get proper permissions on the repo, so I could work on this directly). What do you think about this? If it’s a good idea, I’d love to get some more info about what has to be done so this PR would be ready to merge.

It would be great to get some feedback on my ideas, in particular I would like to know what are my mentors’ expectations for, let’s say, next two weeks. All suggestions and tips are welcome!

Let it be fun.

Regards,
Kacper

2 Likes

Hi Kacper,

I had a lot of hard work at Uni, as my semester finishes by the end of June

This is totally fine. Your education is very important, so, please, no rushing there :slight_smile:
(That’s a University Professor speaking in me right now)

It would be great to get some feedback on my ideas, in particular I would like to know what are my mentors’ expectations for, let’s say, next two weeks.

I would say that you can start when you are ready. This would be the most productive approach. Finish all your Uni-related tasks and then let’s start some serious work.
In the meantime, we can work on different small fixes, that do not require a lot of concentration.

To choose something to begin with, I think we have to decide if I should focus on refactoring the plugin, basing on existing codebase, or I rather should start the whole thing from scratch

I would totally go with the first option: refactoring. We have a lot of new features here: https://github.com/typeddjango/django-stubs/pull/366

So, fixing and merging this will be a very good start. But, this does require a lot of time and effort. Me and Maxim are going to assist you along the way. We can be in quick touch in Telegram. Maxim also has one, so we would be there together.

Thank you for your answer! I’ll start investigating PR #366 soon, and do some minor fixes in the meantime, just like you suggested :smiley:

Could you please contact me via telegram whenever you have a spare minute? I was trying to search you, but there are a few “Nikitas” out there :grin: My telegram nickname is same as my forum nick, “kszmigiel” :slight_smile: