-
Notifications
You must be signed in to change notification settings - Fork 84
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
GUI FOR AUTOMATED PLOTTING 2- update the GUI #2464
GUI FOR AUTOMATED PLOTTING 2- update the GUI #2464
Conversation
While the UI in the Multilayer selector can use direct the cached images from the defined dir in the configuration. For me it is tmp/msui_wms_cache the autoplot does on each load the capabilities. This needs usually only done once. This gives a delay. Please look if you can skip this "get capability" request. |
When storing such a configuration one has to add .json. There is suppot by qt for this https://doc.qt.io/qt-6/qfiledialog.html#defaultSuffix-prop reloading from file works too. :) Download Plots crashes
|
Restoring the level is not implemented? |
…get from closing after downloading the plots
e8c1f49
to
22aa853
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please can you undo your merge of develop into the PR?
This does not reflect the state of the work during GSOC
We have to do the following order, squash merge the PR to your Gsoc branch.
merge the gsoc branch to develop.
You can ignore the failing tests, because we know the reason.
a4d2e1a
to
cfffdbc
Compare
with temporary applying https://github.com/Open-MSS/MSS/pull/2537/files#diff-2ba1f11e715e19bf607aa39b8541650e9cc7062cea55288accced904af34d3ca 542 passed, 13 skipped, 32 warnings in 434.61s (0:07:14) |
@@ -51,7 +51,7 @@ | |||
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 PyQt5 import QtGui, QtCore, QtWidgets | |||
from PyQt5 import QtGui, QtCore, QtWidgets, QtTest | |||
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that is an interesting usecase, we have to lookup afterwards
@@ -83,6 +83,9 @@ class MSUILinearViewWindow(MSUIMplViewWindow, ui.Ui_LinearWindow): | |||
|
|||
refresh_signal_send = QtCore.pyqtSignal() | |||
refresh_signal_emit = QtCore.pyqtSignal() | |||
item_selected = QtCore.pyqtSignal(str, str, str, str) | |||
vtime_vals = QtCore.pyqtSignal([list]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs a review after the merge how the list evolves
@@ -0,0 +1,97 @@ | |||
GUI FOR AUTOMATED PLOTTING |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The filename needs to be lowercase later
from mslib.msui.qt5.ui_mss_autoplot import Ui_AutoplotDockWidget | ||
from mslib.msui import constants as const | ||
from datetime import datetime | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this needs to be reordered later
autoplot_treewidget_item_selected = QtCore.pyqtSignal(str, str) | ||
update_op_flight_treewidget = QtCore.pyqtSignal(str, str) | ||
|
||
def __init__(self, parent=None, parent2=None, view=None, config_settings=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parent names can become more meaningful
@@ -256,6 +256,9 @@ class MSUISideViewWindow(MSUIMplViewWindow, ui.Ui_SideViewWindow): | |||
|
|||
refresh_signal_send = QtCore.pyqtSignal() | |||
refresh_signal_emit = QtCore.pyqtSignal() | |||
item_selected = QtCore.pyqtSignal(str, str, str, str) | |||
vtime_vals = QtCore.pyqtSignal([list]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we have to check later how the list evolves
@@ -190,6 +190,9 @@ class MSUITopViewWindow(MSUIMplViewWindow, ui.Ui_TopViewWindow): | |||
sections_changed = QtCore.pyqtSignal(str) | |||
refresh_signal_emit = QtCore.pyqtSignal() | |||
refresh_signal_send = QtCore.pyqtSignal() | |||
item_selected = QtCore.pyqtSignal(str, str, str, str) | |||
itemSecs_selected = QtCore.pyqtSignal(str) | |||
vtime_vals = QtCore.pyqtSignal([list]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we have to check later how the list evolves
@@ -426,10 +455,11 @@ def level_val_changed(self, strr): | |||
|
|||
@QtCore.pyqtSlot() | |||
def styles_val_changed(self, strr): | |||
if strr is None: | |||
if strr is None or not str(strr).strip(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this can become a better name later
@@ -410,6 +410,7 @@ class WMSControlWidget(QtWidgets.QWidget, ui.Ui_WMSDockWidget): | |||
styles_changed = QtCore.pyqtSignal(str) | |||
itime_changed = QtCore.pyqtSignal(str) | |||
vtime_changed = QtCore.pyqtSignal(str) | |||
vtime_data = QtCore.pyqtSignal([list]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we have to check later how the list evolves
# Iterate over the children of the top-level item | ||
for i in range(top_item.childCount()): | ||
child_item = top_item.child(i) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
review for empty formatting lines later
self.current_sel_layer = child_item | ||
|
||
if not self.current_sel_layer: | ||
print(f"Layer '{layer_name}' not found.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when that is important only a popup reaches the user, needs to become checked later
|
||
|
||
def get_xml_data(mscolab_server_url, token, op_id): | ||
if verify_user_token(mscolab_server_url, token): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this needs a change after the merge, because in develop this verify_user_token was refactored.
|
||
def get_op_id(token, mscolab_server_url, curr_op): | ||
logging.debug('get_recent_op_id') | ||
if verify_user_token(mscolab_server_url, token): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see above
|
||
|
||
if __name__ == '__main__': | ||
main() | ||
cli_tool() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this needs an additional change in https://github.com/Open-MSS/MSS/blob/develop/setup.py#L39
I am not convinced by the new name.
import requests | ||
from urllib.parse import urljoin | ||
import json | ||
from PyQt5.QtCore import Qt | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
later imports should be sorted later, https://peps.python.org/pep-0008/#imports
Imports should be grouped in the following order:
Standard library imports.
Related third party imports.
Local application/library specific imports.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is a crash from sideview when I try to download plots to be solved after this got merged
Python 3.11.6 | packaged by conda-forge | (main, Oct 3 2023, 10:40:35) [GCC 12.3.0]
Please report bugs in MSS to https://github.com/Open-MSS/MSS
Information about the fatal error:
Traceback (most recent call last):
File "/home/reimar/PycharmProjects/2024/Preetam-Das26/MSS/mslib/msui/autoplot_dockwidget.py", line 147, in <lambda>
self.downloadPushButton.clicked.connect(lambda: self.download_plots_cli(config_settings))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/reimar/PycharmProjects/2024/Preetam-Das26/MSS/mslib/msui/autoplot_dockwidget.py", line 199, in download_plots_cli
ctx.invoke(cli_tool, **args)
File "/home/reimar/Miniforge/envs/mssdev/lib/python3.11/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/reimar/Miniforge/envs/mssdev/lib/python3.11/site-packages/click/decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/reimar/PycharmProjects/2024/Preetam-Das26/MSS/mslib/utils/mssautoplot.py", line 470, in cli_tool
side_view = SideViewPlotting(cpath, mss_url, mss_password, mss_auth)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/reimar/PycharmProjects/2024/Preetam-Das26/MSS/mslib/utils/mssautoplot.py", line 281, in __init__
super(SideViewPlotting, self).__init__(cpath)
File "/home/reimar/PycharmProjects/2024/Preetam-Das26/MSS/mslib/utils/mssautoplot.py", line 176, in __init__
self.read_operation(flight, username, password, mscolab_server_url)
File "/home/reimar/PycharmProjects/2024/Preetam-Das26/MSS/mslib/utils/mssautoplot.py", line 198, in read_operation
self.wps, self.wp_model_data = load_from_operation(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: cannot unpack non-iterable NoneType object
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is some work to do, which should be done in more than one PR.
This is a good step further and it is a nice functionality
d9ce793
into
Open-MSS:GSOC2024-PreetamSundarDas
update msui mainwindow based on left treewidget, download from operations implemented completely and prcess dialogs added, update msui mainwindow based on left treewidget,
Purpose of PR?:
Fixes #
Does this PR introduce a breaking change?
If the changes in this PR are manually verified, list down the scenarios covered::
Additional information for reviewer? :
Mention if this PR is part of any design or a continuation of previous PRs
Does this PR results in some Documentation changes?
If yes, include the list of Documentation changes
Checklist:
<type>: <subject>