ARYAN_GUPTA's Blog

Week 3 : Fixing Bugs and Multiple KML File UI

ARYAN_GUPTA
Published: 06/22/2020

Hello there!

I really liked working this week! The work was a bit relaxed , less stressful. I also learnt new things, and saw my code being "pushed to its limits". Read on!

What did you do this week?

I was supposed to start working on the UI for adding Multiple KML Files. The main aim of my project is to be able to display multiple KML Files on the screen simultaneously, using which users can derive important information from the maps! 

I spent my week fixing a major bug (mentioned below). I also drew up a better UI and worked on the frontend implementation. 

What is coming up next?

After Frontend, I will be dealing with the backend. It will be tough, as I'll have to deal with PyQt, and our implementation of the code. I have also created a working branch for writing tests for kmloverlaydockwidget.py file. These will take up major chunks of my time :))

Did you get stuck anywhere?

Like I said, 'supposed to'. I had made a rough draft of the UI, and was going to improve on it, when a mentor found a bug in my code while running a KML file. I saw the error and understood the issue at once. While I was working on migration, there were few snippets of code, which did not make much sense to me. And since my implementation was working without them, it felt best to 'let it be'.

My foolhardiness was accentuated by the fact that I was testing my code on 20 odd lines of KML, not taking into account every case. I was happy that my code was working, I did not check if my code was working perfectly i.e. for all cases.  My mentor supplied me with the kml file he had used and it was over 7000 lines! I realised the implications of the software on a larger scale for the first time! I sat down, and understood each line, made more changes, and finally, my code was able to run the kml file! I was ecstatic to see the plot on the map. It was beautiful!

Thankfully, my 2 PRs have been accepted, and I am working hard to finish my next WIP pull request :))

Hoping for good things for this week :)))
 

View Blog Post

Week 2 : Complete Migration to Fastkml

ARYAN_GUPTA
Published: 06/15/2020

Hello there!

The Second week was much tougher than the first. Its becoming tougher and more interesting day by day!

What did you do this week?

In Week #1, I had added Fastkml support to kml overlay. However, not all dependencies were working. I spent the week solving all the issues making sure that all KML data was being parsed and the right info was being displayed.

KML focuses on mainly 3 things :

  • Object (Document, Folder, Placemark)
  • Style
  • Geometry

and it was very tough to get them all working in sync. I ran through numerous KML Test samples to check the code, and made changes accordingly. 

What is coming up next?

Discussions with my mentors are very fruitful! After a long talk, we decided that the most suitable step next is to add the feature of "Displaying Multiple KML files" together. This is an important feature and I'm glad that its starting early, because it will take me some time to understand , and implement.This week, Ill work on the UI and working with PyQt  for the above implementation. I also have to write tests for kmloverlay file, and make the implementation more code-elegant.

Did you get stuck anywhere?

Yes! Currently, we use iterative and recursive functions to parse through KML files. However, Fastkml creates objects to call function for deriving specific information. This week's work involved a lot of documentation, experimentation, frustration , but due to consistent work and patience, I got the code working perfectly!

Hoping for good things for this week :)))

View Blog Post

Week 1 : Adding Fastkml Support

ARYAN_GUPTA
Published: 06/07/2020

Hello there! 

I have finished with my first week of coding, and it was quite intensive! This week was an icebreaker, started a bit rough, but now it feels much smoother.

What did you do this week? 

As proposed by the mentors, I had to shift the codebase from using lxml API for kml, and shift it to a much more convenient Fastkml. I have completed the major part of it i.e. the parsing, and I am working on the display portion. Also, I did a Bandit run on Fastkml, which threw up 6 Security Issues, and I was able to solve 4 of it. The other 2 require switching the whole fastkml library from lxml dependency to defusedxml, and required functions were not available in that library.

What is coming up next? 

My plan for the next two weeks involve adding External Map Images as well support for Screen / Photo Overlay. I will also be working on the new tests required due to the shift in libraries, and finishing up with the Fastkml Support.

Did you get stuck anywhere?

Yes. I had to deal with 3 libraries ( lxml, defusexml,fastkml), all inter dependent on each other, which was a sure hassle. Another roadblock was while using Fastkml instead of lxml in the codebase. The lxml API returns an object which can be used to call functions, while fastkml doesn't, which led to a total transformation of ```kmloverlay_dockwidget.py``` file. But, I was able to get through it, by giving the code enough time and thought.

Needless to say, I have learnt a lot, and looking forward to the next week!

View Blog Post

Week 0 : Checking in :))

ARYAN_GUPTA
Published: 06/01/2020

Hi there, I am Aryan Gupta and during GSoC'20, I will be contributing to Mission Support System under PSF. I'll be working on enhancing KML support in MSS!

What did you do this week? 

As the Community Bonding Period came to an end, my focus shifted from reading KML documentation, to going through relevant codebase and testing. As per discussions with my mentors, I realised that testing is quite an important part of the project, and I gave adequate time working on pytest, and improving the test coverage for MSS.

What is coming up next?

The coding period starts today! I have two tasks to accomplish this week : Adding FastKML Support & solving relevant issues caught by Bandit, and displaying the recently loaded KML files in the Browse Option.

Did you get stuck anywhere?

I was a bit intimidated by the new technologies that I got to know while researching. But I figured, that given enough time and focus, I'll be able to accomplish my project :)) 

Time to get back to coding!

View Blog Post