plant99's Blog

weeklyCheckIn[7]

plant99
Published: 07/14/2019

What did I do this week?

As per last week's plan. I completed implementation of 'projects-list' part of the UI. The additional features were, 

  1. spawning top/side/table views on click of buttons
  2. write socket handlers for client, to implement file-save, and file-load
  3. an 'auto-save' feature which can be activated by admin/creator of a project. This helps to reflect changes on everyone's local version as they happen, instantly. In a non-autosave mode, everyone works on a local desktop on the project. (Post GSoC, we are planning to improve it for situations where some collaborators can be in autosave mode, while some not.)

What's coming up next?

The next part is to write unit tests for the functions developed in the past 1.5 weeks. After this, I have to get them reviewed in a pull request along with the 'autosave synchronization' feature.
With that concluded, I have planned to work on the 'project window' which would include 

  1. users' list
  2. chat
  3. change log

The project window would take about 6-7 days to get developed, including unit tests.

Did I get stuck anywhere?

Not for a very long time in a problem. But I came across small 'gotcha's like how Qt requires a child to be bound to at least one element in self.window as its parent. I had a hard time using super for parent constructors as well, because I didn't know how to in Python3.

Link to the PR reviewed this week: https://bitbucket.org/wxmetvis/mss/pull-requests/657/upto-ui-1-mscolab-dashboard/diff

View Blog Post

weeklyCheckIn[6]

plant99
Published: 07/08/2019

What did I do this week?

This week started with filing a PR for integration tests and other refactoring. Then I assigned 1.5 days to design the software architecture for `msui` it's a big software and is a result of 7-8 results of development. I had to make sure my design doesn't break the policy of mss software, and is modular and pluggable. I have worked out a significant amount of design and basic implementation, you can find an active PR on this here.

What's coming up next?

For the next week, I'd still be working on working with mscolab landing window. The following things have to be done in the upcoming week.

  1. consistent opening of topview, sideview, tableview from projects listing
  2. modify 'file save' to handle call differently if mscolab is activated (it has to send the file content to remote)
  3. write socket connection handler for UI part

Did I get stuck anywhere?

I sure faced some challenges while designing the architecture for mscolab's UI. I had to make decisions regarding functions, connectors' definition, available classes and how they can be extended to fit needs of mscolab. After implementing a basic prototype, I'm more confident about the design now.

View Blog Post

weeklyCheckIn[5]

plant99
Published: 06/30/2019

What did I do this week?

For the past week I was involved in two major tasks. They are:

  1. Introducing the 'Change' module, this is an addon, which helps keep track of 'diffs' of old and new version of ftml file, for analytics purpose. In future, post gsoc, this module is to be replaced by a VCS which would support advanced features like undo and redo.
  2. Writing integration tests for APIs on HTTP endpoints, and some other refactoring which removed all occurences of executing `python server.py` with a subprocess.exec. 

The 1st task was finished and reviewed fully, I've started a PR for second task earlier today.

What's coming up next?

Next up, I'll discuss the changes required in this PR with Reimar. Once merged, 50% of the work is done. angel
For the next part, I have to work on GUI for this server. The gui would be a part of existing msui. Before starting to write code, I'm planning to write a proper document concluding the architectural design of the new code, since it has to properly be integrated with msui.

Did I get stuck anywhere?

No, the week's work was mostly writing tests, so didn't get stuck. But I reached a conclusion with a feature request and put 'wontfix' status. This is an excerpt from our slack group.  image

 

View Blog Post

weeklyCheckIn[4]

plant99
Published: 06/24/2019

What did I do this week?

Last week, I've been working on building the File-based event handlers, on top of the existing socket layer. Specifically, I introduced a FileManager class, which handled I/O with PyFilesystem2 library. Some things which I learnt while my mentor reviewed the PR involving this work is, we have to make sure this application runs on all infrastructure. So you might want to avoid some programming techniques involving

  • bash commands' execution from code directly is wrong, this might fail for windows/iOS
  • while chosing a library to work on, make sure it's compatible with a broad range of environments

I learnt to avoid using 'os' while I can use 'fs', because the latter is more generic and 'os' based functions won't work when filesystems like DAV are used.

What's coming up next?

While I proposed to work on refactoring and integration tests this week. I've talked with my mentor and swapped this task with that of the next week i.e development of 'Change' related handlers. Changes are saved for each 'save' just like commit but with limited functionalities. Two major parts of this work are to

  • develop the models, and api for storing and fetching changes
  • store the change id in tags, for easy access. For example, an user changed a waypoint, this change id is stored inside waypoint.

Later, if we add version control to storage, the extra benefit we get is we can undo, redo changes.

Did I get stuck anywhere?

No, this week was fairly smooth. Though I stopped and learnt a bit more about decorators and their usage, when Reimar asked to refactor a bit where I authorized a request. There were a lot of scope for reuse for 2-3 lines repeated for all API end-points.

 

Link to this week's PR

View Blog Post

weeklyCheckIn[3]

plant99
Published: 06/17/2019

What did I do this week?

Last week, I've been working on integrating sockets, and build the 'chat' functionality on top of that. This involved, writing event handlers for chat events. The most interesting part was writing tests for this module, I've never written tests for real-time applications. Plus this application, has some additional complexity like permissions etc., which combinedly put a challenge to work on. I successfully got my code reviewed and merged, upto chat implementations. I also worked on integrating Sqlite as an alternative to MySQL database.

What's coming up next?

This week, I'm starting to work on File based handlers. To give a better idea, this project facilitates file synchronization across systems. In this part, I'm trying to tap change events and change the master database. Then I'd emit an event to all users that the file has been changed. To better handle this change, next to next week I'll work on the Change module(more on this on my proposal).

Did I get stuck anywhere?

During choosing library for implementing socket clients, to write tests, (Note that we'd use the same client to implement socket client for user interface) I got stuck for a day while trying to figure out the right one. The famous one 'python-socketio' had different distributions for client and server usage. It was hard to maintain the versions with 'flask-socketio' and 'python-socketio[client]' considering we were use conda-forge to install and distribute apps. For a while, I started writing tests with 'socketio-client' library. Me and my mentor, after a bit of discussion decided to use python-socketio.

View Blog Post