Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove the conda/mamba based updater. #2495

Merged
merged 14 commits into from
Sep 6, 2024
16 changes: 1 addition & 15 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -124,23 +124,9 @@ versions for dependencies. ::
(mssenv) $ msui


Update
------

Builtin Update
Update Methods
..............

Since version 5.0 we provide a feature for updating MSS by the UI or the command line
After you started the MSS UI it informs you after a while if there is a new update available.
From the command line you can trigger this update feature by ::

(mssenv) $ msui --update



Other Methods
.............

For updating an existing MSS installation to the current version, it is best to install
it into a new environment. If your current version is not far behind the new version
you could try the `mamba update mss` as described.
Expand Down
7 changes: 6 additions & 1 deletion mslib/mscolab/app/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"""

import os
import logging
import sqlalchemy

from flask_migrate import Migrate
Expand All @@ -34,7 +35,11 @@
from flask import Flask, url_for
from mslib.mscolab.conf import mscolab_settings
from flask_sqlalchemy import SQLAlchemy
from mslib.utils import prefix_route
from mslib.utils import prefix_route, release_info

message, update = release_info.check_for_new_release()
if update:
logging.warning(message)


DOCS_SERVER_PATH = os.path.dirname(os.path.abspath(mslib.__file__))
Expand Down
12 changes: 0 additions & 12 deletions mslib/mscolab/mscolab.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
from mslib.mscolab.server import APP
from mslib.mscolab.utils import create_files
from mslib.utils import setup_logging
from mslib.utils.qt import Worker, Updater


def handle_start(args):
Expand Down Expand Up @@ -358,7 +357,6 @@ def handle_sso_metadata_init(repo_exists):
def main():
parser = argparse.ArgumentParser()
parser.add_argument("-v", "--version", help="show version", action="store_true", default=False)
parser.add_argument("--update", help="Updates MSS to the newest version", action="store_true", default=False)

subparsers = parser.add_subparsers(help='Available actions', dest='action')

Expand Down Expand Up @@ -407,16 +405,6 @@ def main():
except git.exc.InvalidGitRepositoryError:
repo_exists = False

updater = Updater()
if args.update:
updater.on_update_available.connect(lambda old, new: updater.update_mss())
updater.on_log_update.connect(lambda s: print(s.replace("\n", "")))
updater.on_status_update.connect(lambda s: print(s.replace("\n", "")))
updater.run()
while Worker.workers:
list(Worker.workers)[0].wait()
sys.exit()

if args.action == "start":
handle_start(args)

Expand Down
12 changes: 0 additions & 12 deletions mslib/msui/msui.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
from mslib.msui import constants
from mslib.utils import setup_logging
from mslib.msui.icons import icons
from mslib.utils.qt import Worker, Updater
from mslib.utils.config import read_config_file
from PyQt5 import QtGui, QtCore, QtWidgets

Expand All @@ -62,7 +61,6 @@ def main(tutorial_mode=False):
parser.add_argument("--debug", help="show debugging log messages on console", action="store_true", default=False)
parser.add_argument("--logfile", help="Specify logfile location. Set to empty string to disable.", action="store",
default=os.path.join(constants.MSUI_CONFIG_PATH, "msui.log"))
parser.add_argument("--update", help="Updates MSS to the newest version", action="store_true", default=False)

args = parser.parse_args()

Expand All @@ -74,16 +72,6 @@ def main(tutorial_mode=False):
print("Version:", __version__)
sys.exit()

if args.update:
updater = Updater()
updater.on_update_available.connect(lambda old, new: updater.update_mss())
updater.on_log_update.connect(lambda s: print(s.replace("\n", "")))
updater.on_status_update.connect(lambda s: print(s.replace("\n", "")))
updater.run()
while Worker.workers:
list(Worker.workers)[0].wait()
sys.exit()

setup_logging(args)

logging.info("MSS Version: %s", __version__)
Expand Down
7 changes: 2 additions & 5 deletions mslib/msui/msui_mainwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@
from mslib.msui import flighttrack as ft
from mslib.msui import tableview, topview, sideview, linearview
from mslib.msui import constants, editor, mscolab
from mslib.msui.updater import UpdaterUI
from mslib.plugins.io.csv import load_from_csv, save_to_csv
from mslib.msui.icons import icons, python_powered
from mslib.utils.qt import get_open_filenames, get_save_filename, show_popup
from mslib.utils.config import read_config_file, config_loader
from mslib.utils import release_info
from PyQt5 import QtGui, QtCore, QtWidgets
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas

Expand Down Expand Up @@ -408,6 +408,7 @@ def __init__(self, parent=None):
super().__init__(parent)
self.setupUi(self)
self.lblVersion.setText(f"Version: {__version__}")
self.lblNewVersion.setText(f"{release_info.check_for_new_release()[0]}")
self.milestone_url = f'https://github.com/Open-MSS/MSS/issues?q=is%3Aclosed+milestone%3A{__version__[:-1]}'
self.lblChanges.setText(f'<a href="{self.milestone_url}">New Features and Changes</a>')
blub = QtGui.QPixmap(python_powered())
Expand Down Expand Up @@ -532,10 +533,6 @@ def __init__(self, mscolab_data_dir=None, tutorial_mode=False, *args):
self.mscolab.signal_render_new_permission.connect(
lambda op_id, path: self.signal_render_new_permission.emit(op_id, path))

# Don't start the updater during a test run of msui
if "pytest" not in sys.modules:
self.updater = UpdaterUI(self)
self.actionUpdater.triggered.connect(self.updater.show)
self.openOperationsGb.hide()

def bring_main_window_to_front(self):
Expand Down
47 changes: 26 additions & 21 deletions mslib/msui/qt5/ui_about_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

# Form implementation generated from reading ui file 'ui_about_dialog.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
# Created by: PyQt5 UI code generator 5.15.9
#
# WARNING! All changes made in this file will be lost!
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.


from PyQt5 import QtCore, QtGui, QtWidgets
Expand All @@ -13,7 +14,7 @@
class Ui_AboutMSUIDialog(object):
def setupUi(self, AboutMSUIDialog):
AboutMSUIDialog.setObjectName("AboutMSUIDialog")
AboutMSUIDialog.resize(1052, 600)
AboutMSUIDialog.resize(1052, 771)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
Expand Down Expand Up @@ -82,6 +83,9 @@ def setupUi(self, AboutMSUIDialog):
self.lblChanges.setObjectName("lblChanges")
self.horizontalLayout_2.addWidget(self.lblChanges)
self.verticalLayout_2.addLayout(self.horizontalLayout_2)
self.lblNewVersion = QtWidgets.QLabel(AboutMSUIDialog)
self.lblNewVersion.setObjectName("lblNewVersion")
self.verticalLayout_2.addWidget(self.lblNewVersion)
spacerItem2 = QtWidgets.QSpacerItem(20, 10, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred)
self.verticalLayout_2.addItem(spacerItem2)
self.lblLicense = QtWidgets.QLabel(AboutMSUIDialog)
Expand Down Expand Up @@ -109,7 +113,7 @@ def setupUi(self, AboutMSUIDialog):
self.verticalLayout.addLayout(self.verticalLayout_2)

self.retranslateUi(AboutMSUIDialog)
self.btOK.clicked.connect(AboutMSUIDialog.accept)
self.btOK.clicked.connect(AboutMSUIDialog.accept) # type: ignore
QtCore.QMetaObject.connectSlotsByName(AboutMSUIDialog)

def retranslateUi(self, AboutMSUIDialog):
Expand All @@ -120,25 +124,26 @@ def retranslateUi(self, AboutMSUIDialog):
self.textBrowser.setHtml(_translate("AboutMSUIDialog", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'Ubuntu\'; font-size:11pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'Sans Serif\';\">Please read the reference documentation:</span></p>\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:\'Sans Serif\';\"><br /></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'Sans Serif\';\">Bauer, R., Grooß, J.-U., Ungermann, J., Bär, M., Geldenhuys, M., and Hoffmann, L.: The Mission Support</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'Sans Serif\';\">System (MSS v7.0.4) and its use in planning for the SouthTRAC aircraft campaign, Geosci.</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'Sans Serif\';\">Model Dev., 15, 8983–8997, https://doi.org/10.5194/gmd-15-8983-2022, 2022.</span></p>\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:\'Sans Serif\';\"><br /></p>\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:\'Sans Serif\';\"><br /></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'Sans Serif\';\">Rautenhaus, M., Bauer, G., and Doernbrack, A.: A web service based tool to plan</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'Sans Serif\';\">atmospheric research flights, Geosci. Model Dev., 5,55-71, https://doi.org/10.5194/gmd-5-55-2012, 2012.</span></p>\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:\'Sans Serif\';\"><br /></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'Sans Serif\';\">and the paper\'s Supplement (which includes a tutorial) before using the application. The documents are available at:</span></p>\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:\'Sans Serif\';\"><br /></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'Sans Serif\';\"> * http://www.geosci-model-dev.net/5/55/2012/gmd-5-55-2012.pdf</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'Sans Serif\';\"> * http://www.geosci-model-dev.net/5/55/2012/gmd-5-55-2012-supplement.pdf</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'Sans Serif\';\"> </span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'Sans Serif\';\"> 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.</span></p></body></html>"))
"</style></head><body style=\" font-family:\'Sans Serif\'; font-size:9pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:11pt;\">Please read the reference documentation:</span></p>\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;\"><br /></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:11pt;\">Bauer, R., Grooß, J.-U., Ungermann, J., Bär, M., Geldenhuys, M., and Hoffmann, L.: The Mission Support</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:11pt;\">System (MSS v7.0.4) and its use in planning for the SouthTRAC aircraft campaign, Geosci.</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:11pt;\">Model Dev., 15, 8983–8997, https://doi.org/10.5194/gmd-15-8983-2022, 2022.</span></p>\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;\"><br /></p>\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;\"><br /></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:11pt;\">Rautenhaus, M., Bauer, G., and Doernbrack, A.: A web service based tool to plan</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:11pt;\">atmospheric research flights, Geosci. Model Dev., 5,55-71, https://doi.org/10.5194/gmd-5-55-2012, 2012.</span></p>\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;\"><br /></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:11pt;\">and the paper\'s Supplement (which includes a tutorial) before using the application. The documents are available at:</span></p>\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;\"><br /></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:11pt;\"> * http://www.geosci-model-dev.net/5/55/2012/gmd-5-55-2012.pdf</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:11pt;\"> * http://www.geosci-model-dev.net/5/55/2012/gmd-5-55-2012-supplement.pdf</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:11pt;\"> </span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:11pt;\"> 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.</span></p></body></html>"))
self.lblVersion.setText(_translate("AboutMSUIDialog", "Version: --VERSION--"))
self.lblChanges.setText(_translate("AboutMSUIDialog", "Changes: --CHANGES--"))
self.lblNewVersion.setText(_translate("AboutMSUIDialog", "Check for new Version: --NEW VERSION--"))
self.lblLicense.setText(_translate("AboutMSUIDialog", "License: Apache License Version 2.0"))
self.lblCopyright.setText(_translate("AboutMSUIDialog", "Copyright 2008-2014: Deutsches Zentrum fuer Luft- und Raumfahrt e.V.\n"
"Copyright 2011-2014: Marc Rautenhaus\n"
Expand Down
5 changes: 2 additions & 3 deletions mslib/msui/qt5/ui_mainwindow.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file 'mslib/msui/ui/ui_mainwindow.ui'
# Form implementation generated from reading ui file 'ui_mainwindow.ui'
#
# Created by: PyQt5 UI code generator 5.15.7
# Created by: PyQt5 UI code generator 5.15.9
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
Expand Down Expand Up @@ -253,7 +253,6 @@ def setupUi(self, MSUIMainWindow):
self.menuFile.addAction(self.actionQuit)
self.menuHelp.addAction(self.actionShortcuts)
self.menuHelp.addAction(self.actionMSColabHelp)
self.menuHelp.addAction(self.actionUpdater)
self.menuHelp.addAction(self.actionOnlineHelp)
self.menuHelp.addAction(self.actionAboutMSUI)
self.menuHelp.addAction(self.actionSearch)
Expand Down
65 changes: 0 additions & 65 deletions mslib/msui/qt5/ui_updater_dialog.py

This file was deleted.

Loading
Loading