← Blog

A guide to start contributing to MSS

Mission Support System is a flight planning software which a researcher can use to analyze predicted atmospheric data, and plan a flight-path with 3D waypoints. It provides a suite which can be used by atmospheric research scientists to plan a research flight. It has two essential components

  • msui

    It’s the core UI module of mss software, this shows atmospheric data on a 2D map. A researcher has to analyze the data and mark the waypoints ( a set of points which the research aircraft has to pass through to collect experimental data ).

  • wms/mswms

    WMS stands for Web Map Server, which essentially serves maps given origin coordinates and other geographic parameters. A sample wms server can be setup with ‘mswms’, and some demo data which can be setup easily as per instructions here. In a single sentence, mswms serves the data to be displayed by msui.

More details on this after making sure mss is installed properly.

Installation

A descriptive guide is given here. But to summarize following are the steps you need to do in your local environment. Note: This installation is not for general users, and only for developers of mss.

Prerequisite for installation

Procedure

  • Follow steps given here
  • It is advisable to uninstall mss from your conda development environment.
  • Make sure to add paths of mss and demodata to $PYTHONPATH.
  • Make sure installation is complete by running python -m pytest on any branch, stable preferrably.

Running mss

As discussed earlier, there are two major components of mss. msui can be run by executing the following command.

$ python mslib/msui/mss_pyui.py

in project root directory, and mswms can be run by executing the following command.

$ python mslib/mswms/mswms.py

in project root directory. Before running mswms, make sure that demodata is setup and available in $PYTHONPATH.

First issue

After setting up the project, introduce yourself to the community on #mss-dev, and PR a patch for a simple issue listed here. You can ask any of the active contributors to assign an issue, if you have trouble finding a good issue. Only after you complete this step, read the rest of the blog

Exploring mss’ codebase

In the root directory, there are some configuration and settings files which we won’t go through in this post, along with docs/ which contains Sphynx based documentation of mss. The directory of our interest is mslib as it contains code for all functionalities of mss. Inside msui, /ui and /qt5 are used to define layouts and UX functionalities.

Note: _tests in each directory has tests for code in the same directory, throughout the codebase. utils.py in each directory has utility functions required in the same directory or a subdirectory. Some important files in /mslib:

  • thermolib.py has utility functions required to calculate and convert atmospheric data.

Some important files in /mslib/msui/:

  • mss_pyui.py instantiates major elements of msui, like main_window, topview, sideview, tableview, and binds their display function to click actions.
  • constants.py has some constants defined, to be used by msui.
  • flighttrack.py defines important classes related to Waypoints and their class representation, and related operations in mss.
  • mpl_map.py defines classes related to map, and canvas utilities to draw something to the map and set event handlers on action.
  • mpl_pathinteractor.py defines the event handlers for map related events and other flightpath related variables.
  • mpl_qtwidget.py connects map related functions and event handlers, basically a wrapper for mpl_map and mpl_pathinteractor.
  • wms_control.py connects msui to a WMS, and makes all API calls under the hood.

Some important files in /mslib/mswms/:

  • mswms.py the webserver of mswms.
  • wms.py is the mswms app which instantiates several major other components like plot_driver, get_capabilities functions etc.
  • demodata.py is a file which lets you create dummy data for usage of mswms.
  • dataaccess.py is a file used to handle Data I/O to and from storage.

To understand the infrastructure better, it’s advised to go through the _tests directories once even a little familiar with the codebase. They are not all the files, but the list will grow as I explore more parts of MSS software.

But, here’s a small technique to get to target code in a relatively quick fashion when in need. Running msui/mswms in debug mode often produces log, some of them are function names, or custom strings used as debug-text. If the source of the debug log isn’t clear from the log, running a grep -nr "debug_string" . in the root directory of mss outputs a list of places where same string is used. One can go through them to find which function is responsible for the bug in the datapath.

Reviewed by: Reimar Bauer(Maintainer, MSS project)