GUI for Automated plotting#2414
Conversation
Merge develop to stable == 9.0.0
Merge stable to develop
Occasionally the test runs on macos-13 are super slow and there is generally a lot of variation in the time required to run the test suite on those runners. I think they genuinely need more time sometimes, so this increases the timeout to accommodate.
* Run flake8 for all .py files tracked in git * Fix flake8 errors
this should keep it archived also when a server sets the threshold to a few years
* Add a codespell lint job * Fix misspellings found by codespell
* updated data base migration to current release * deprecation for manual migration added
`rtd.io` is on longer operational, according to [the project page](https://readthedocs.org/projects/mss/) the correct domain is either `rtfd.io` or the full `readthedocs.io`. Also switch to https.
* Fixed an issue with units being ignored in vertical axis * Fixed an issue with *assuming* that vertical axis is in pressure if no standard name "air_pressure" was available * Fixed an issue with extrapolating data * Fixes an issue with interpolating in pressure instead of log-pressure * Fixes an issue with ignoring jumps/extrapolation in data for missing longitudes (now it is consistent with vertical section driver)
* doc updated * indenting level fixed * add details about the wsgi modules
matrss
left a comment
There was a problem hiding this comment.
It is unclear to me how this is supposed to be used.
I've tried loading the "mssautoplot.json" shared in Slack using the "cpath" button. There is no feedback on if that has worked or not, I would have expected some of the other widgets to be prefilled with content from that configuration.
When pressing the "Store plots directory" button after loading the configuration file, with or without first selecting some settings from the dropdowns, I get (an) "Invalid STYLE and/or URL requested" message(s) in the terminal and then the GUI just closes.
I also get those messages with python mslib/utils/mssautoplot.py --cpath mssautoplot.json as suggested by https://mss.readthedocs.io/en/stable/mssautoplot.html#examples, so maybe that is an issue on my end.
mslib/utils/autoplot_gui.py
Outdated
There was a problem hiding this comment.
Please add the file header from the template (adapt the copyright information therein): https://github.com/Open-MSS/MSS/blob/develop/new_file_template.py.
This isn't required for the other files, since they are tool-generated.
mslib/utils/autoplot_gui.py
Outdated
| self.url.remove(i.text()) | ||
| self.urlListWidget.takeItem(self.urlListWidget.row(i)) | ||
|
|
||
| def layersWindow(self): |
There was a problem hiding this comment.
Please use snake_case for functions and methods as is idiomatic for python, unless something else is required by outside constraints (e.g. PyQt5 uses camelCase for its stuff, which is outside our control).
mslib/msui/qt5/ui_mss_autoplot.py
Outdated
| from PyQt5 import QtCore, QtGui, QtWidgets | ||
|
|
||
|
|
||
| class Ui_Form(object): |
There was a problem hiding this comment.
These should probably have a more descriptive name.
Merge stable to develop
|
I have not added the logging messages. I will do so in the next commit. Next click on store plots button. |
|
I get an error when trying to add the WMS server URL: We had this issue in the past already (#1815), you should be able to reuse the method from |
I'm able to get the plot from the GUI with the default configuration (by setting the cpath in the GUI and by leaving the other settings blank). The config shared by Preetam has a flight track file. Please try putting it in the root MSS directory if you haven't. The error message "Invalid STYLE ....." is not correct as there's a correction to be made here which was pointed out by you sometime ago. The 'elif' becomes true in all cases and thus the error message (#2295). I'll ask Preetam to push the corrected one with his code. |
|
the tests get triggered to show a problem https://github.com/Open-MSS/MSS/actions/runs/9810353386/job/27090313984?pr=2405#step:10:1129 |
mslib/msui/autoplot_dockwidget.py
Outdated
| fileName, _ = QFileDialog.getOpenFileName( | ||
| self, "Select .json Config File", const.MSUI_CONFIG_PATH, "JSON Files (*.json)", options=options) | ||
|
|
||
| if fileName: |
|
|
||
| # Predefined map regions to be listed in the corresponding topview combobox | ||
| predefined_map_sections = { | ||
| "01 Europe (cyl)": {"CRS": "EPSG:4326", |
There was a problem hiding this comment.
This is the reason the test fails
test_kwargs_update_does_not_harm
|
|
||
| # Predefined map regions to be listed in the corresponding topview combobox | ||
| predefined_map_sections = { | ||
| "01 Europe (cyl)": {"CRS": "EPSG:4326", |
There was a problem hiding this comment.
The position has changed
"07 Europe (cyl)":
There was a problem hiding this comment.
changing that number also affects the tutorials https://github.com/Open-MSS/MSS/blob/develop/tutorials/tutorial_hexagoncontrol.py#L46
They look for the first element on the widget
tutorials/tutorial_kml.py
Outdated
|
|
||
| def _switch_to_europe_map(): | ||
| find_and_click_picture('topviewwindow-01-europe-cyl.png', "Map change dropdown could not be located on the screen.") | ||
| find_and_click_picture('topviewwindow-07-europe-cyl.png', "Map change dropdown could not be located on the screen.") |
There was a problem hiding this comment.
this won't work
The image available is
topviewwindow-00-global-cyl.png
it can only find the first on screen visible value on a pulldown.
this can be verified by
$ export MSUI_CONFIG_PATH=/tmp/msui_tutorials
$ export XDG_CACHE_HOME=$(mktemp -d)
$ python
>>> from mslib.msui.msui import main
>>> main(tutorial_mode=True)
CTRL+H
CTRL+UP
CTRL+F
CTRL+Q
$ ls /tmp/msui-tutorials/tutorial_images/*00*.png


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>