Skip to content

Commit

Permalink
Merge branch 'develop' into GSOC2021-HrithikKumarVerma
Browse files Browse the repository at this point in the history
  • Loading branch information
ReimarBauer committed Aug 6, 2021
2 parents 9170617 + 492482f commit 7fd3765
Show file tree
Hide file tree
Showing 97 changed files with 3,542 additions and 1,626 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,12 @@ jobs:
run: |
source /opt/conda/bin/activate mssenv \
&& cd $GITHUB_WORKSPACE \
&& pytest --cov=mslib mslib
&& pytest -v --durations=20 --cov=mslib mslib \
|| (for i in {1..5} \
; do pytest mslib -v --durations=0 --last-failed --lfnf=none \
&& break \
; done)
- name: coveralls
if: ${{ always() && github.event_name == 'push' && github.ref == 'refs/heads/develop' }}
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/xdist_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,8 @@ jobs:
run: |
source /opt/conda/bin/activate mssenv \
&& cd $GITHUB_WORKSPACE \
&& pytest -n 6 --dist loadscope --max-worker-restart 0 mslib
&& pytest -v -n 6 --dist loadscope --max-worker-restart 0 mslib \
|| (for i in {1..5} \
; do pytest -v -n 6 --dist loadscope --max-worker-restart 0 mslib --last-failed --lfnf=none \
&& break \
; done)
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,8 @@ mslib/mswms/mss_wms_settings.py
mslib/mswms/mss_wms_auth.py
mslib/mscolab/colabdata/
docs/_build
docs/gallery/plots
docs/gallery/code
docs/gallery/plots.html
build/
mss.egg-info/
2 changes: 2 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
conda:
file: docs/environment.yml
3 changes: 3 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ in alphabetic order by first name

- Andreas Hilboll <[email protected]>
- Anveshan Lal <[email protected]>
- Aravind Murali <[email protected]>
- Christian Rolf <[email protected]>
- Debajyoti Dasgupta <[email protected]>
- Hrithik Kumar Verma <[email protected]>
- Isabell Krisch <[email protected]>
- Jatin Jain <[email protected]>
- Jens-Uwe Grooß <[email protected]>
- Jörn Ungermann <[email protected]>
- Marc Rautenhaus <[email protected]>
Expand Down
43 changes: 43 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,49 @@
Changelog
=========

Version 5.0.0
~~~~~~~~~~~~~

This release brings many improvements to the WMS Server along with new features for the UI.
On demand a WMS server can show what kind of view graphics are provided.
Optional the source for creating the graphics can be published over the web service too.
By this any existing server shows examples how to create graphics. Have a look on
our documentation on https://mss.readthedocs.io/en/stable/gallery/index.html for this feature.

The linear styles got improved to work also on .ml files

We refactored some of our oldest code in thermolib and moved to the famous metpy module.
A new docking widget for topview was introduced for integrating airbase data by openaip.net and ourairports.com

Newer versions than 5.0.0 can now use the built-in update feature on command line or by the UI.

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

Version 4.0.4
~~~~~~~~~~~~~

Bug fix release

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

Version 4.0.3
~~~~~~~~~~~~~

Bug fix release

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

Version 4.0.2
~~~~~~~~~~~~~

Bug fix release

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

Version 4.0.1
~~~~~~~~~~~~~

Expand Down
42 changes: 8 additions & 34 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -106,40 +106,14 @@ Author: Jakub Steiner [email protected]
License: https://github.com/freedesktop/tango-icon-library/blob/master/COPYING.PublicDomain
Further Information: http://tango.freedesktop.org

Airports Data
-------------

To draw airports on the topview we use the services provided by ourairports
Further Information: https://ourairports.com/about.html#overview

Airports Data
-------------



































To draw airspaces on the topview we use the services provided by openaip.net
Further Information: http://www.openaip.net/
29 changes: 29 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
import importlib.machinery
import os
import sys
import mock
import warnings
from PyQt5 import QtWidgets
# Disable pyc files
sys.dont_write_bytecode = True

Expand Down Expand Up @@ -152,6 +155,32 @@ class mscolab_settings(object):
sys.path.insert(0, parent_path)


@pytest.fixture(autouse=True)
def close_open_windows():
"""
Closes all windows after every test
"""
# Mock every MessageBox widget in the test suite to avoid unwanted freezes on unhandled error popups etc.
with mock.patch("PyQt5.QtWidgets.QMessageBox.question") as q, \
mock.patch("PyQt5.QtWidgets.QMessageBox.information") as i, \
mock.patch("PyQt5.QtWidgets.QMessageBox.critical") as c, \
mock.patch("PyQt5.QtWidgets.QMessageBox.warning") as w:
yield
if any(box.call_count > 0 for box in [q, i, c, w]):
summary = "\n".join([f"PyQt5.QtWidgets.QMessageBox.{box()._extract_mock_name()}: {box.mock_calls[:-1]}"
for box in [q, i, c, w] if box.call_count > 0])
warnings.warn(f"An unhandled message box popped up during your test!\n{summary}")


# Try to close all remaining widgets after each test
for qobject in set(QtWidgets.QApplication.topLevelWindows() + QtWidgets.QApplication.topLevelWidgets()):
try:
qobject.destroy()
# Some objects deny permission, pass in that case
except RuntimeError:
pass


@pytest.fixture(scope="session", autouse=True)
def configure_testsetup(request):
if Display is not None:
Expand Down
2 changes: 1 addition & 1 deletion docs/components.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ Components
deployment
mscolab
demodata
kml_guide


65 changes: 65 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,57 @@
# All configuration values have a default; values that are commented out
# serve to show the default.
import os
import sys
import logging
import setuptools
import subprocess
from string import Template

if os.getenv("PROJ_LIB") is None or os.getenv("PROJ_LIB") == "PROJ_LIB":
conda_file_dir = setuptools.__file__
conda_dir = conda_file_dir.split('lib')[0]
proj_lib = os.path.join(os.path.join(conda_dir, 'share'), 'proj')
if "win" in sys.platform:
proj_lib = os.path.join(os.path.join(conda_dir, 'Library'), 'share')
os.environ["PROJ_LIB"] = proj_lib
if not os.path.exists(proj_lib):
os.makedirs(proj_lib)
epsg_file = os.path.join(proj_lib, 'epsg')
if not os.path.exists(epsg_file):
with open(os.path.join(proj_lib, 'epsg'), 'w') as fid:
fid.write("# Placeholder for epsg data")

# Generate plot gallery
import fs
sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), ".."))
from mslib.mswms.demodata import DataFiles

root_fs = fs.open_fs("~/")
if not root_fs.exists("mss/testdata"):
root_fs.makedirs("mss/testdata")

examples = DataFiles(data_fs=fs.open_fs("~/mss/testdata"),
server_config_fs=fs.open_fs("~/mss"))
examples.create_server_config(detailed_information=True)
examples.create_data()

sys.path.insert(0, os.path.join(os.path.expanduser("~"), "mss"))

import mslib.mswms.wms
import mslib.mswms.gallery_builder

# Generate template plots
from docs.gallery.plot_examples import HS_template, VS_template
dataset = [next(iter(mslib.mswms.wms.mss_wms_settings.data))]
mslib.mswms.wms.mss_wms_settings.register_horizontal_layers = [(HS_template.HS_Template, dataset)]
mslib.mswms.wms.mss_wms_settings.register_vertical_layers = [(VS_template.VS_Template, dataset)]
mslib.mswms.wms.mss_wms_settings.register_linear_layers = []
mslib.mswms.wms.server.__init__()
mslib.mswms.wms.server.generate_gallery(sphinx=True, create=True, clear=True)
mslib.mswms.gallery_builder.plots = {"Top": [], "Side": [], "Linear": []}

# Generate all other plots
mslib.mswms.wms.server.generate_gallery(sphinx=True, generate_code=True, all_plots=True)

# readthedocs has no past.builtins
try:
Expand Down Expand Up @@ -69,6 +119,21 @@
# The full version, including alpha/beta/rc tags.
release = __version__

# Replace $variables in the .rst files if on a readthedocs worker
if "/home/docs/checkouts" in " ".join(sys.argv):
mss_search = subprocess.run(["conda", "search", "-c", "conda-forge", "mss"], stdout=subprocess.PIPE,
stderr=subprocess.STDOUT, encoding="utf8").stdout
# mss_search is inside a code block, reflect indentation
mss_search = (" " * 3).join([line for line in mss_search.splitlines(True) if line.startswith("mss ")][-2:])

for file in os.listdir():
if file.endswith(".rst"):
with open(file, "r") as rst:
content = Template(rst.read())
with open(file, "w") as rst:
rst.write(content.safe_substitute(mss_version=version[:-1] if version[-1] == "." else version,
mss_search=mss_search))

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
Expand Down
Loading

0 comments on commit 7fd3765

Please sign in to comment.