Skip to content

Commit

Permalink
Merge pull request #1437 from Open-MSS/merge_develop_to_stable
Browse files Browse the repository at this point in the history
Merge develop to stable, preparing 6.1.0
  • Loading branch information
ReimarBauer authored May 2, 2022
2 parents baa5932 + 221073d commit 604cf72
Show file tree
Hide file tree
Showing 57 changed files with 1,136 additions and 357 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/python-flake8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,16 @@

name: flake8

on: [ push, pull_request ]
on:
push:
branches:
- develop
- stable
pull_request:
branches:
- develop
- stable

jobs:
lint:
runs-on: ubuntu-latest
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
name: Pytest MSS

on: [ push, pull_request ]
on:
push:
branches:
- develop
- stable
pull_request:
branches:
- develop
- stable

env:
PAT: ${{ secrets.PAT }}

Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/xdist_testing.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
name: Pytest MSS

on: [ push, pull_request ]
on:
push:
branches:
- develop
- stable
pull_request:
branches:
- develop
- stable

env:
PAT: ${{ secrets.PAT }}

Expand Down
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ in alphabetic order by first name
- Reimar Bauer <[email protected]>
- Sakshi Chopkar <[email protected]>
- Shivashis Padhi <[email protected]>
- Sreelakshmi Jayarajan <[email protected]>
- Tanish Grover <[email protected]>
- Thomas Breuer <[email protected]>
- Vaibhav Mehra <[email protected]>
11 changes: 11 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
Changelog
=========

Version 6.1.0
~~~~~~~~~~~~~

This release includes some small improvements of the usablity.
A few bug fixes, a new plugin for NAVAID waypoints is decribed and
mscolab gots few improvements for user creation.
Wind speed plots can now be created for altitudes > 25km.

All changes:
https://github.com/Open-MSS/MSS/milestone/70?closed=1


Version 6.0.6
~~~~~~~~~~~~~
Expand Down
5 changes: 4 additions & 1 deletion conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
limitations under the License.
"""

import importlib
import importlib.machinery
import os
import sys
Expand All @@ -37,9 +36,13 @@

import pytest
import fs
import shutil
from mslib.mswms.demodata import DataFiles
import mslib._tests.constants as constants

# make a copy for mscolab test, so that we read different pathes during parallel tests.
sample_path = os.path.join(os.path.dirname(__file__), "docs", "samples", "flight-tracks")
shutil.copy(os.path.join(sample_path, "example.ftml"), constants.ROOT_DIR)

def pytest_addoption(parser):
parser.addoption("--mss_settings", action="store")
Expand Down
1 change: 1 addition & 0 deletions docs/components.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Components
:maxdepth: 3

usage
plugins
mswms
mscolab
tutorials
Expand Down
4 changes: 2 additions & 2 deletions docs/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ Create an environment and install the whole mss package dependencies then remove

$ conda create -n mssdev mamba
$ conda activate mssdev
$ mamba install mss=$mss_version --only-deps
$ mamba install mss=$mss_version python --only-deps

You can also use conda to install mss, but mamba is a way faster.
Compare versions used in the meta.yaml between stable and develop branch and apply needed changes.
Expand Down Expand Up @@ -172,7 +172,7 @@ You can view the default configuration of mscolab in the file `mslib/mscolab/con
If you want to change any values of the configuration, please take a look at the "Configuring Your Mscolab Server"
section in :ref:`mscolab`

When using for the first time you need to initialise your database. Use the command :code:`python mslib/mscolab/mscolab db --init`
When using for the first time you need to initialise your database. Use the command :code:`python mslib/mscolab/mscolab.py db --init`
to initialise it. The default database is a sqlite3 database.
You can add some dummy data to your database by using the command :code:`python mslib/mscolab/mscolab.py db --seed`.
The content of the dummy data can be found in the file `mslib/mscolab/seed.py`.
Expand Down
4 changes: 2 additions & 2 deletions docs/mscolab.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ Protecting Login
~~~~~~~~~~~~~~~~
The login to the MSColab server can be protected by an additional auth method.

**mss_mscolab_auth.py**

.. literalinclude:: samples/config/mscolab/mss_mscolab_auth.py.sample

Make a copy of the above file, rename it to mss_mscolab_auth.py, make the necessary changes in the file and add it to your $PYTHONPATH.

Steps to Run MSColab Server
~~~~~~~~~~~~~~~~~~~~~~~~~~~
- The MSColab server comes included in the MSS python package.
Expand Down
4 changes: 3 additions & 1 deletion docs/mswms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ For more information on WMS, see http://www.opengeospatial.org/standards/wms
WMS Server Deployment
=====================

.. _deployment:

Once installation and configuration are complete, you can start the
Web Map Service application (provided you have forecast data to visualise).
The file "mswms" is an executable Python script starting up a Flask HTTP server
Expand Down Expand Up @@ -449,4 +451,4 @@ Detailed server configuration *mss_wms_settings.py* for this demodata

For setting authentication see *mss_wms_auth.py*

.. literalinclude:: samples/config/wms/mss_wms_auth.py.sample
.. literalinclude:: samples/config/wms/mss_wms_auth.py.sample
61 changes: 61 additions & 0 deletions docs/plugins.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
MSUI plugins
============

.. _msuiplugins:


Flight track import/export
~~~~~~~~~~~~~~~~~~~~~~~~~~

As the planned flight track has to be quickly communicated to different parties having different
desired file formats, MSS supports a simple plugin system for exporting planned flights and
importing changed files back in addition to the main FTML format. These filters may be accessed
from the File menu of the Main Window.

MSS currently offers several import/export filters in the mslib.plugins.io module, which may serve
as an example for the definition of own plugins. Take care that added plugins use different file extensions.
They are listed below. The CSV plugin is enabled by default.
Enabling the experimental FliteStar text import plugin would require those lines in
the UI settings file:

.. code:: text
"import_plugins": {
"FliteStar": ["fls", "mslib.plugins.io.flitestar", "load_from_flitestar"]
},
The dictionary entry defines the name of the filter in the File menu. The list specifies in this
order the extension, the python module implementing the function, and finally the function name.
The module may be placed in any location of the PYTHONPATH or into the configuration directory
path.

An exemplary test file format that can be ex- and imported may be activated by:

.. code:: text
"import_plugins": {
"Text": ["txt", "mslib.plugins.io.text", "load_from_txt"]
},
"export_plugins": {
"Text": ["txt", "mslib.plugins.io.text", "save_to_txt"]
},
The given plugins demonstrate, how additional plugins may be implemented. Please be advised that several
attributes of the waypoints are automatically computed by MSS (for example all time and performance data)
and will be overwritten after reading back the file.

**Available Export Formats:**

.. code:: text
"export_plugins": {
"Text": ["txt", "mslib.plugins.io.text", "save_to_txt"],
"KML": ["kml", "mslib.plugins.io.kml", "save_to_kml"],
"GPX": ["gpx", "mslib.plugins.io.gpx", "save_to_gpx"]
},
User contributed Plugins:
-------------------------

.. include:: samples/plugins/navaid.rst
14 changes: 8 additions & 6 deletions docs/samples/automation/retriever.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import mslib
import mslib.utils
from mslib.utils import thermolib
from mslib.utils.config import config_loader, read_config_file
from mslib.utils.units import units
import mslib.msui
import mslib.msui.mpl_map
Expand Down Expand Up @@ -129,16 +130,16 @@ def main():
sys.exit()

mslib.utils.setup_logging(args)

config = mslib.utils.config_loader()
read_config_file(path=mslib.msui.constants.MSS_SETTINGS)
config = config_loader()
num_interpolation_points = config["num_interpolation_points"]
num_labels = config["num_labels"]
tick_index_step = num_interpolation_points // num_labels

fig = plt.figure()
for flight, section, vertical, filename, init_time, time in \
config["automated_plotting"]["flights"]:
params = mslib.utils.get_projection_params(
params = mslib.utils.coordinate.get_projection_params(
config["predefined_map_sections"][section]["CRS"].lower())
params["basemap"].update(config["predefined_map_sections"][section]["map"])
wps = load_from_ftml(filename)
Expand Down Expand Up @@ -188,8 +189,9 @@ def main():

# prepare vsec plots
path = [(wp[0], wp[1], datetime.datetime.now()) for wp in wps]
lats, lons, _ = mslib.utils.path_points(
path, numpoints=num_interpolation_points + 1, connection="greatcircle")
lats, lons = mslib.utils.coordinate.path_points(
[_x[0] for _x in path],
[_x[1] for _x in path], numpoints=num_interpolation_points + 1, connection="greatcircle")
intermediate_indexes = []
ipoint = 0
for i, (lat, lon) in enumerate(zip(lats, lons)):
Expand All @@ -207,7 +209,7 @@ def main():
ax.set_yscale("log")
p_bot, p_top = [float(x) * 100 for x in vertical.split(",")]
bbox = ",".join(str(x) for x in (num_interpolation_points, p_bot / 100, num_labels, p_top / 100))
ax.grid(b=True)
ax.grid(visible=True)
ax.patch.set_facecolor("None")
pres_maj = mslib.msui.mpl_qtwidget.MplSideViewCanvas._pres_maj
pres_min = mslib.msui.mpl_qtwidget.MplSideViewCanvas._pres_min
Expand Down
2 changes: 1 addition & 1 deletion docs/samples/config/mscolab/mss_mscolab_auth.py.sample
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
class mss_mscolab_auth(object):
password = "please use the methods to save only the encrypted value"
allowed_users = [("user", hashlib.md5(password.encode('utf-8')).hexdigest())),]
allowed_users = [("user", hashlib.md5(password.encode('utf-8')).hexdigest())]
3 changes: 3 additions & 0 deletions docs/samples/config/mss/empty_mss_settings.json.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{

}
2 changes: 0 additions & 2 deletions docs/samples/config/mss/mss_settings.json.sample
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@
"filepicker_default": "default",

"import_plugins": {
"CSV": ["csv", "mslib.plugins.io.csv", "load_from_csv"],
"FliteStar": ["fls", "mslib.plugins.io.flitestar", "load_from_flitestar"],
"Text": ["txt", "mslib.plugins.io.text", "load_from_txt"]
},

"export_plugins": {
"CSV": ["csv", "mslib.plugins.io.csv", "save_to_csv"],
"Text": ["txt", "mslib.plugins.io.text", "save_to_txt"],
"KML": ["kml", "mslib.plugins.io.kml", "save_to_kml"],
"GPX": ["gpx", "mslib.plugins.io.gpx", "save_to_gpx"]
Expand Down
Loading

0 comments on commit 604cf72

Please sign in to comment.