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