Skip to content

Commit

Permalink
Merge branch 'develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
anshulagrawal2902 authored Jan 25, 2025
2 parents 9c1b265 + 50f6425 commit b2cdd87
Show file tree
Hide file tree
Showing 22 changed files with 210 additions and 78 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/testing-all-oses.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ jobs:
sed -e "s/.*://" > requirements.tmp.txt
cat requirements.d/development.txt >> requirements.tmp.txt
echo "pytest-randomly" >> requirements.tmp.txt
sed -e '/^$/d' -e '/^#.*$/d' requirements.tmp.txt > requirements.txt
sed -e '/^$/d' -e '/^#.*$/d' -e 's/\s*# \[not win\]$//' requirements.tmp.txt > requirements.txt
rm requirements.tmp.txt
cat requirements.txt
- name: Get current year and calendar week
id: year-and-week
run: echo "year-and-week=$(date +%Y-%V)" >> "$GITHUB_OUTPUT"
- uses: mamba-org/setup-micromamba@v1
- uses: mamba-org/setup-micromamba@v2
with:
environment-file: requirements.txt
environment-name: ci
Expand All @@ -44,8 +44,4 @@ jobs:
cache-environment-key: environment-${{ steps.year-and-week.outputs.year-and-week }}
- name: Run tests
timeout-minutes: 40
# The ignored files can somehow cause the test suite to timeout.
# I have no idea yet on why this happens and how to fix it.
# Even a module level skip is not enough, they need to be completely ignored.
# TODO: fix those tests and drop the ignores
run: micromamba run -n ci env QT_QPA_PLATFORM=offscreen pytest -v -n logical --durations=20 --cov=mslib tests
8 changes: 8 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
Changelog
=========

Version 9.3.0
~~~~~~~~~~~~~
Bug fix release and minor enhancements:
We removed unused modules from the mscolab saml2 setup.

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

Version 9.2.0
~~~~~~~~~~~~~

Expand Down
19 changes: 5 additions & 14 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
# Contributing

When contributing to this repository, please first discuss the change you wish to make via issue,
email, or any other method with the owners of this repository before making a change.
We'd love for your contribution to the Mission Support System (MSS) to help make it better!
We want contributing to MSS to be fun and educational for everyone.
All kind of contributions are welcome, including issue descriptions and new documents,
as well as updates and improvements and more.

Please note we have a code of conduct, please follow it in all your interactions with the project.

## Pull Request Process

1. Ensure any install or build dependencies are removed before the end of the layer when doing a
build.
2. Update the README.md with details of changes to the interface, this includes new environment
variables, exposed ports, useful file locations and container parameters.
3. Increase the version numbers in any examples files and the README.md to the new version that this
Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/).
4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you
do not have permission to do that, you may request the second reviewer to merge it for you.
Our **[contributing](https://open-mss.github.io/contributing/)** guidelines provide instructions on how to get involved.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,11 @@ in the same directory as this README file.
When using this software, please be so kind and acknowledge its use by
citing the above mentioned reference documentation in publications,
presentations, reports, etc. that you create. Thank you very much.

Acknowledgements
----------------

We are very grateful for your continuing support for MSS!

See our [Contributors page](https://mss.readthedocs.io/en/stable/authors.html) for a list of authors. See also our info on [funding](
https://mss.readthedocs.io/en/stable/funding.html).
23 changes: 21 additions & 2 deletions docs/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -533,8 +533,27 @@ Publish on Conda Forge
Google Summer of Code(TM)
-------------------------

MSS takes part in Google Summer of Code
as a sub-organization of Python Software Foundation(PSF).
MSS takes part in `Google Summer of Code <https://summerofcode.withgoogle.com/>`_
as a `sub-organization of Python Software Foundation (PSF) <https://python-gsoc.org/>`_.


GSoC'24 Projects
................

- `Aryan Gupta: (MSS) msui: Improve MSUI : GSoC 2024 <https://github.com/Open-MSS/MSS/wiki/Aryan-Gupta:-(MSS)-msui:-Improve-MSUI-:-GSOC2024>`_
- `Preetam Sundar Das: MISSION SUPPORT SYSTEM(MSS): GUI FOR AUTOMATED PLOTTING : GSOC 2024 <https://github.com/Open-MSS/MSS/wiki/Preetam-Sundar-Das:-MISSION-SUPPORT-SYSTEM(MSS):-GUI-FOR-AUTOMATED-PLOTTING-:-GSOC2024>`_
- `Rohit Prasad: Mission Support System: Improve multiple flightpath docking widget : GSOC 2024 <https://github.com/Open-MSS/MSS/wiki/Rohit-Prasad:-Mission-Support-System:-Improve-multiple-flightpath-docking-widget-:-GSOC2024>`_


GSoC'23 Projects
................

- `Shubh Gaur: Mission Support System(MSS) : UI-improvements : GSOC 2023 <https://github.com/Open-MSS/MSS/wiki/UI%E2%80%90improvements-GSOC-2023>`_

- `Nilupul Manodya: Mission Support System : Implement a SAML 2.0 service provider (SP) into mscolab : GSOC 2023 <https://github.com/Open-MSS/MSS/wiki/Implement-a-SAML-2.0-service-provider-(SP)-into-mscolab-:-GSOC-2023>`_




GSoC'22 Projects
................
Expand Down
112 changes: 112 additions & 0 deletions docs/funding.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
Funding and Support
===================

The Mission Support System (MSS) kindly acknowledges funding and support from the following sources:

Conda-Forge
-----------

.. figure:: https://conda-forge.org/img/logo.png
:alt: Logo conda-forge
:target: https://conda-forge.org/
:width: 300

.. raw:: html

<div style="height:20px;"></div>

We kindly acknowledge support by the open-source `conda-forge community <https://conda-forge.org/docs/>`_


Google Summer of Code
---------------------

.. figure:: https://libertem.github.io/images/GSoC-icon-192.png
:alt: Logo Google Summer of Code
:target: https://summerofcode.withgoogle.com/
:width: 300

.. raw:: html

<div style="height:20px;"></div>

We kindly acknowledge funding from `Google Summer of Code 2019, 2020, 2021, 2022, 2023 and 2024 <https://summerofcode.withgoogle.com/>`_ under the `umbrella of the Python Software Foundation <https://python-gsoc.org/>`_.



DFG, German Research Foundation – UN 311/3-1
--------------------------------------------

.. figure:: https://www.dfg.de/resource/image/196784/16x9/858/483/500dfa2178773cc68721440c14d86911/B385802C0C046A4BD6F0138CDC3478F0/logo-negativ-267.png
:alt: Logo DFG, German Research Foundation
:target: https://www.dfg.de/en
:width: 300

.. raw:: html

<div style="height:20px;"></div>

Atmospheric research with HALO is supported by the Priority Programme SPP 1294 of the Deutsche Forschungsgemeinschaft (DFG).
In 2021 we were funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) – UN 311/3-1.



COVERALLS
---------

.. figure:: https://s3.amazonaws.com/assets.coveralls.io/assets/coveralls_logo-blue_wshad.png
:alt: Logo Coveralls
:target: https://coveralls.io/
:width: 300

.. raw:: html

<div style="height:20px;"></div>

We kindly acknowledge support by the COVERALLS company for `open source projects <https://coveralls.io/sign-up>`_.



Dockerhub
---------

.. figure:: https://www.docker.com/wp-content/uploads/2023/08/logo-guide-logos-1.svg
:alt: Logo Dockerhub
:target: https://www.docker.com
:width: 300

.. raw:: html

<div style="height:20px;"></div>

We kindly acknowledge support by the docker company for adding our `application <https://hub.docker.com/u/openmss>`_ to the `Docker-Sponsored Open Source Program <https://www.docker.com/community/open-source/application/>`_.


GitHub
------

.. figure:: https://github.githubassets.com/assets/GitHub-Mark-ea2971cee799.png
:alt: Logo GitHub
:target: https://github.com/
:width: 300

.. raw:: html

<div style="height:20px;"></div>

We kindly acknowledge support by GitHub for `open-source projects <https://github.com/open-source>`_.



Forschungszentrum Jülich, `Stratosphere (ICE-4) <https://www.fz-juelich.de/en/ice/ice-4>`_
------------------------------------------------------------------------------------------

.. figure:: https://www.fz-juelich.de/en/ibg/ibg-1/images/research_groups/general/fz-juelich-logo/@@images/7ca073aa-be02-4577-a1f4-49cf2462a13e.jpeg
:target: https://www.fz-juelich.de/er-c/EN/Home/home_node.html
:width: 300

.. raw:: html

<div style="height:20px;"></div>

Forschungszentrum Jülich is supporting MSS with funding for personnel, access to its infrastructure and administrative support.
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Topics
authors
tutorial
gallery/index
funding


Indices and tables
Expand Down
6 changes: 4 additions & 2 deletions mslib/mscolab/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,5 +216,7 @@ def __init__(self, op_id, u_id, commit_hash, version_name=None, comment=None):
self.op_id = int(op_id)
self.u_id = int(u_id)
self.commit_hash = str(commit_hash)
self.version_name = str(version_name)
self.comment = str(comment)
if version_name is not None:
self.version_name = str(version_name)
if comment is not None:
self.comment = str(comment)
12 changes: 7 additions & 5 deletions mslib/msui/flighttrack.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@

import fs
import xml.dom.minidom
import xml.parsers.expat
import defusedxml.minidom
from defusedxml import DefusedXmlException

from PyQt5 import QtGui, QtCore, QtWidgets

Expand All @@ -56,7 +57,8 @@
from mslib.msui.performance_settings import DEFAULT_PERFORMANCE

from mslib.utils import writexml, LOGGER
xml.dom.minidom.Element.writexml = writexml
xml.dom.minidom.Element.writexml = writexml # nosec, we take care of writing correct XML

# Constants for identifying the table columns when the WaypointsTableModel is
# used with a QTableWidget.
LOCATION, LAT, LON, FLIGHTLEVEL, PRESSURE = list(range(5))
Expand Down Expand Up @@ -98,8 +100,8 @@ def seconds_to_string(seconds):

def load_from_xml_data(xml_content, name="Flight track"):
try:
doc = xml.dom.minidom.parseString(xml_content)
except xml.parsers.expat.ExpatError as ex:
doc = defusedxml.minidom.parseString(xml_content)
except DefusedXmlException as ex:
raise SyntaxError(str(ex))

ft_el = doc.getElementsByTagName("FlightTrack")[0]
Expand Down Expand Up @@ -632,7 +634,7 @@ def save_to_ftml(self, filename=None):
file_dir.close()

def get_xml_doc(self):
doc = xml.dom.minidom.Document()
doc = xml.dom.minidom.Document() # nosec, we take care of writing correct XML
ft_el = doc.createElement("FlightTrack")
ft_el.setAttribute("version", __version__)
doc.appendChild(ft_el)
Expand Down
7 changes: 6 additions & 1 deletion mslib/msui/kmloverlay_dockwidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -602,8 +602,13 @@ def merge_file(self):
for index in checked_files: # index is the indices of checked files
_dirname, _name = os.path.split(self.listWidget.item(index).text())
_fs = fs.open_fs(_dirname)
# Create a secure XML Parser
secure_parser = et.XMLParser(resolve_entities=False, no_network=True)
# resolve_entities False, prevents entity expansion
# no_network, prevents automatically loading remote documents
# https://gist.github.com/jack-om/f2c762f399e6ee652f05320921ece4c9
with _fs.open(_name, 'r') as kmlf:
tree = et.parse(kmlf) # parse kml file
tree = et.parse(kmlf, parser=secure_parser) # nosec, parse using the secured parser
root = tree.getroot() # get the root of the file
self.remove_ns(root) # removes <kml> and </kml>
element.append(copy.deepcopy(root[0]))
Expand Down
10 changes: 4 additions & 6 deletions mslib/msui/mpl_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ def __init__(self, identifier=None, CRS=None, BBOX_UNITS=None, OPERATION_NAME=No
# Print project name and CRS identifier into figure.
if not hasattr(self, "_info_text"):
self._info_text = self.ax.figure.text(0, 0, "")
self._infos = [None] * 4
self.update_info_text(name=self.operation_name, crs=self.crs)
self._infos = [None] * 3
self.update_info_text(crs=self.crs)

if self.appearance["draw_graticule"]:
pass
Expand All @@ -170,15 +170,13 @@ def __init__(self, identifier=None, CRS=None, BBOX_UNITS=None, OPERATION_NAME=No
self.airspaces = None
self.airspacetext = None

def update_info_text(self, openaip=None, ourairports=None, name=None, crs=None):
def update_info_text(self, openaip=None, ourairports=None, crs=None):
if openaip is not None:
self._infos[0] = openaip
if ourairports is not None:
self._infos[1] = ourairports
if name is not None:
self._infos[2] = name
if crs is not None:
self._infos[3] = crs
self._infos[2] = crs
self._info_text.set_text(
"\n".join([_i for _i in self._infos if _i])) # both None and ""

Expand Down
3 changes: 3 additions & 0 deletions mslib/msui/mpl_qtwidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ def __init__(self, fig=None, ax=None, settings_tag=None, settings=None):

def draw_metadata(self, title="", init_time=None, valid_time=None,
level=None, style=None):

if style:
title += f" ({style})"
if level:
Expand Down Expand Up @@ -733,7 +734,9 @@ def draw_legend(self, img):
raise NotImplementedError

def draw_image(self, xmls, colors=None, scales=None):
title = self.fig._suptitle.get_text()
self.clear_figure()
self.fig.suptitle(title, x=0.95, ha='right')
offset = 40
self.ax.patch.set_visible(False)

Expand Down
6 changes: 3 additions & 3 deletions mslib/msui/mscolab_version_history.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@

import requests
from urllib.parse import urljoin, urlencode
from PyQt5 import QtCore, QtWidgets, QtGui

from mslib.utils.verify_user_token import verify_user_token
from mslib.msui.flighttrack import WaypointsTableModel
from PyQt5 import QtCore, QtWidgets, QtGui
from mslib.msui.qt5 import ui_mscolab_version_history as ui
from mslib.utils.qt import show_popup
from mslib.utils.config import config_loader
Expand Down Expand Up @@ -71,7 +71,7 @@ def __init__(self, token, op_id, user, operation_name, conn, parent=None,
self.mscolab_server_url = mscolab_server_url

# Event handlers
self.refreshBtn.clicked.connect(self.handle_refresh)
self.conn.signal_reload.connect(self.handle_refresh)
self.checkoutBtn.clicked.connect(self.handle_undo)
self.nameVersionBtn.clicked.connect(self.handle_named_version)
self.deleteVersionNameBtn.clicked.connect(self.handle_delete_version_name)
Expand Down Expand Up @@ -134,7 +134,7 @@ def load_all_changes(self):
"op_id": self.op_id
}
named_version_only = False
if self.versionFilterCB.currentIndex() == 0:
if self.versionFilterCB.currentIndex() == 1:
named_version_only = True
query_string = urlencode({"named_version": named_version_only})
url_path = f'get_all_changes?{query_string}'
Expand Down
Loading

0 comments on commit b2cdd87

Please sign in to comment.