Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.cache/
.idea/
.vscode/
.DS_Store
*.pyc
*.swp
*.patch
Expand Down
9 changes: 9 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,12 @@ Airports Data

To draw airspaces on the topview we use the services provided by openaip.net
Further Information: http://www.openaip.net/

Qt-json-view
------------

Author: Paul Schweizer (https://github.com/PaulSchweizer)
License: https://github.com/PaulSchweizer/qt-json-view/blob/master/LICENSE (MIT License)

Package for working with JSON files in PyQt5.
Obtained from Github (https://github.com/PaulSchweizer/qt-json-view), on 23/7/2021.
13 changes: 6 additions & 7 deletions mslib/mscolab/_tests/test_chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
from mslib.mscolab.conf import mscolab_settings
from mslib.mscolab.models import Message, MessageType
from mslib.msui.icons import icons
from mslib.msui.mscolab import MSSMscolabWindow
from mslib._tests.utils import mscolab_start_server
import mslib.msui.mss_pyui as mss_pyui


PORTS = list(range(9300, 9320))
Expand All @@ -52,17 +52,16 @@ def setup(self):
self.process, self.url, self.app, _, self.cm, self.fm = mscolab_start_server(PORTS)
QtTest.QTest.qWait(500)
self.application = QtWidgets.QApplication(sys.argv)
self.window = MSSMscolabWindow(data_dir=mscolab_settings.MSCOLAB_DATA_DIR,
mscolab_server_url=self.url)
self.window = mss_pyui.MSSMainWindow(mscolab_data_dir=mscolab_settings.MSCOLAB_DATA_DIR)
self.sockets = []

def teardown(self):
for socket in self.sockets:
socket.disconnect()
if self.window.version_window:
self.window.version_window.close()
if self.window.conn:
self.window.conn.disconnect()
if self.window.mscolab.version_window:
self.window.mscolab.version_window.close()
if self.window.mscolab.conn:
self.window.mscolab.conn.disconnect()
self.window.hide()
QtWidgets.QApplication.processEvents()
self.application.quit()
Expand Down
13 changes: 6 additions & 7 deletions mslib/mscolab/_tests/test_sockets.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@

from PyQt5 import QtWidgets, QtTest
from mslib.mscolab.conf import mscolab_settings
from mslib.msui.mscolab import MSSMscolabWindow
from mslib._tests.utils import mscolab_start_server
import mslib.msui.mss_pyui as mss_pyui


PORTS = list(range(9521, 9540))
Expand All @@ -51,17 +51,16 @@ def setup(self):
self.process, self.url, self.app, _, self.cm, self.fm = mscolab_start_server(PORTS)
QtTest.QTest.qWait(500)
self.application = QtWidgets.QApplication(sys.argv)
self.window = MSSMscolabWindow(data_dir=mscolab_settings.MSCOLAB_DATA_DIR,
mscolab_server_url=self.url)
self.window = mss_pyui.MSSMainWindow(mscolab_data_dir=mscolab_settings.MSCOLAB_DATA_DIR)
self.sockets = []

def teardown(self):
for socket in self.sockets:
socket.disconnect()
if self.window.version_window:
self.window.version_window.close()
if self.window.conn:
self.window.conn.disconnect()
if self.window.mscolab.version_window:
self.window.mscolab.version_window.close()
if self.window.mscolab.conn:
self.window.mscolab.conn.disconnect()
self.application.quit()
QtWidgets.QApplication.processEvents()
self.process.terminate()
Expand Down
180 changes: 0 additions & 180 deletions mslib/msui/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
mslib.msui
~~~~~~~~~~

This module provides the default configuration for the msui

This file is part of mss.

:copyright: Copyright 2008-2014 Deutsches Zentrum fuer Luft- und Raumfahrt e.V.
Expand All @@ -25,181 +23,3 @@
See the License for the specific language governing permissions and
limitations under the License.
"""

import os
import tempfile


class MissionSupportSystemDefaultConfig(object):
"""Central configuration for the Mission Support System User Interface
Application (mss).

This file is part of the Mission Support System User Interface (mss).

DESCRIPTION:
============

This file includes configuration settings central to the entire
Mission Support User Interface (mss). Among others, define
-- available map projections
-- vertical section interpolation options
-- the lists of predefined web service URLs
-- predefined waypoints for the table view
in this file.

Do not change any value for good reasons.
Your values can be set in your personal mss_settings.json file
"""
# Default for general filepicker. Pick "default", "qt", or "fs"
filepicker_default = "default"

# dir where mss output files are stored
data_dir = "~/mssdata"

# layout of different views, with immutable they can't resized
layout = {"topview": (963, 702),
"sideview": (913, 557),
"linearview": (913, 557),
"tableview": (1236, 424),
"immutable": False}

# Predefined map regions to be listed in the corresponding topview combobox
predefined_map_sections = {
"01 Europe (cyl)": {"CRS": "EPSG:4326",
"map": {"llcrnrlon": -15.0, "llcrnrlat": 35.0,
"urcrnrlon": 30.0, "urcrnrlat": 65.0}},
"02 Germany (cyl)": {"CRS": "EPSG:4326",
"map": {"llcrnrlon": 5.0, "llcrnrlat": 45.0,
"urcrnrlon": 15.0, "urcrnrlat": 57.0}},
"03 Global (cyl)": {"CRS": "EPSG:4326",
"map": {"llcrnrlon": -180.0, "llcrnrlat": -90.0,
"urcrnrlon": 180.0, "urcrnrlat": 90.0}},
"04 Northern Hemisphere (stereo)": {"CRS": "MSS:stere,0,90,90",
"map": {"llcrnrlon": -45.0, "llcrnrlat": 0.0,
"urcrnrlon": 135.0, "urcrnrlat": 0.0}}
}

# Side View.
# The following two parameters are passed to the WMS in the BBOX
# argument when a vertical cross section is requested.

# Number of interpolation points used to interpolate the flight track
# to a great circle.
num_interpolation_points = 201

# Number of x-axis labels in the side view.
num_labels = 10

# Web Map Service Client.
# Settings for the WMS client. Set the URLs of WMS servers that appear
# by default in the WMS control (for examples, see
# http://external.opengis.org/twiki_public/bin/view/MetOceanDWG/MetocWMS_Servers).
# Also set the location of the image file cache and its size.

# URLs of default WMS servers.
default_WMS = ["http://localhost:8081/",
]

default_VSEC_WMS = [
"http://localhost:8081/"
]

default_LSEC_WMS = [
"http://localhost:8081/"
]

# URLs of default mscolab servers
default_MSCOLAB = [
"http://localhost:8083",
]

# mail address to sign in
MSCOLAB_mailid = ""

# password to sign in
MSCOLAB_password = ""

# dictionary of MSC servers {"http://www.your-mscolab-server.de" : ("youruser", "yourpassword")]
MSC_login = {}

# timeout of Url request
WMS_request_timeout = 30

WMS_preload = []

# dictionary of WMS servers {"http://www.your-wms-server.de" : ("youruser", "yourpassword")]
WMS_login = {}

# WMS image cache settings:
wms_cache = os.path.join(tempfile.gettempdir(), "msui_wms_cache")

# Maximum size of the cache in bytes.
wms_cache_max_size_bytes = 20 * 1024 * 1024

# Maximum age of a cached file in seconds.
wms_cache_max_age_seconds = 5 * 86400

wms_prefetch = {
"validtime_fwd": 0,
"validtime_bck": 0,
"level_up": 0,
"level_down": 0
}

locations = {
"EDMO": (48.08, 11.28),
"Hannover": (52.37, 9.74),
"Hamburg": (53.55, 9.99),
"Juelich": (50.92, 6.36),
"Leipzig": (51.34, 12.37),
"Muenchen": (48.14, 11.57),
"Stuttgart": (48.78, 9.18),
"Wien": (48.20833, 16.373064),
"Zugspitze": (47.42, 10.98),
"Kiruna": (67.821, 20.336),
"Ny-Alesund": (78.928, 11.986),
"Zhukovsky": (55.6, 38.116),
"Paphos": (34.775, 32.425),
"Sharjah": (25.35, 55.65),
"Brindisi": (40.658, 17.947),
"Nagpur": (21.15, 79.083),
"Mumbai": (19.089, 72.868),
"Delhi": (28.566, 77.103),
}

# Main application: Template for new flight tracks
# Flight track template that is used when a new flight track is
# created. Specify a list of place names that can be found in the
# "locations" dictionary defined above.
new_flighttrack_template = ["Nagpur", "Delhi"]

# This configures the flight level for waypoints inserted by the
# flighttrack template
new_flighttrack_flightlevel = 0

# None is not wanted here
proxies = {}

# ToDo configurable later
# mscolab server
mscolab_server_url = "http://localhost:8083"
# ToDo refactor to rename this to data_dir/mss_data_dir
# mss dir
mss_dir = "~/mss"

# dictionary for export plugins, e.g. {"Text": ["txt", "mslib.plugins.io.text", "save_to_txt"] }
export_plugins = {}

# dictionary for import plugins, e.g. { "FliteStar": ["txt", "mslib.plugins.io.flitestar", "load_from_flitestar"] }
import_plugins = {}

# dictionary to make title, label and ticklabel sizes for topview and sideview configurable.
# You can put your default value here, whatever you want to give,it should be a number.
topview = {"plot_title_size": 10,
"axes_label_size": 10}

sideview = {"plot_title_size": 10,
"axes_label_size": 10}

linearview = {"plot_title_size": 10,
"axes_label_size": 10}
1 change: 1 addition & 0 deletions mslib/msui/_tests/test_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
from mslib._tests.constants import ROOT_DIR


@pytest.mark.skip("To be done for new UI")
class Test_Editor(object):
sample_file = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "..", "docs",
"samples", "config", "mss", "mss_settings.json.sample"))
Expand Down
Loading