-
Notifications
You must be signed in to change notification settings - Fork 100
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
Refactoring and testing of Interactor classes #1570
Closed
swsrkty
wants to merge
30
commits into
Open-MSS:GSOC2022-SreelakshmiJayarajan
from
swsrkty:Refactor-interactor-module
Closed
Changes from 27 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
3f4d33b
Incomplete refactoring of HPathInteractor
swsrkty 83670e9
Refactoring of Interactor classes and testing in plot module
swsrkty fb8532c
Testing Interactor classes
swsrkty 4d7324b
Testing side, linear view and moving plotting path to MySideViewFigur…
swsrkty ebd73d0
Plotting path using pathpatch
swsrkty 7e0b65d
Fixing class names and other errors
swsrkty a3dccc5
Fixing errors in testing
swsrkty ba27ad9
Fixing errors
swsrkty 0eaec8d
Refactoring and testing in top, side and linear views
swsrkty 60e98d0
Fixing errors
swsrkty ec41ade
Prototype CLI tool
swsrkty efde3cc
Fixing errors in refactoring
swsrkty 8f94841
Fixing more errors in refactoring
swsrkty 659fc7a
CLI tool with plotting flightpath
swsrkty 9431884
update
joernu76 cc913b1
Merge remote-tracking branch 'upstream/joern7' into Refactor-interact…
swsrkty bdb4910
Fixing errors in refactoring SideView
swsrkty cfd0019
Fixing errors in the previous commit
swsrkty 3f6d44b
Removing the use of WaypointsTableModel in plot module
swsrkty 71ccd94
update
joernu76 fedcd65
Fixing plotting of labels while testing in plot module
swsrkty 107acc2
Setting title for linear view for testing in plot module
swsrkty ba3079f
CLI tool script
swsrkty 82fa1a3
Fixing an error in calling draw method in plot module
swsrkty 9cd16a2
Adding config path parameter to the CLI tool
swsrkty a7e4083
Documentation for CLI tool
swsrkty cbe9208
Changing the directory of autoplot module
swsrkty ec7e4e5
Removing files related to the autoplot CLI tool
swsrkty d7a6f4f
Removing plot module
swsrkty b4143c0
Adding plot module
swsrkty File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
mss autoplot (CLI Tool for automation) | ||
====================================== | ||
|
||
A CLI tool which enables users to download a set of plots according to the given configuration. The configuration for downloading the plots is located in "mss_autoplot.json". In this file you can specify the default settings. | ||
|
||
How to use | ||
---------- | ||
|
||
The CLI tool has the following parameters: | ||
|
||
Parameter Type Description | ||
---------------------------------------- | ||
--cpath TEXT Path of the config file where the configuration is specified | ||
--ftrack TEXT Flight track. | ||
--itime TEXT Initial time. | ||
--vtime TEXT Valid time. | ||
--intv INTEGER Time interval. | ||
--stime TEXT Starting time for downloading multiple plots with a fixed interval. | ||
--etime TEXT Ending time for downloading multiple plots with a fixed interval. | ||
|
||
A short description of how to start the program is given by the --help option. | ||
|
||
Examples | ||
~~~~~~~~ | ||
|
||
Here are a few examples on how to use this tool, | ||
|
||
1. mss autoplot --cpath mss_autoplot.json | ||
|
||
The above command downloads the required number of plots with the default settings from mss_autoplot.json into the output folder. | ||
|
||
2. mss autoplot --cpath mss_autoplot.json --itime="" --vtime="2019-09-02T00:00:00" | ||
|
||
The above command will download all the plots configured in mss_autoplot.json of initial time "" and valid time "2019-09-02T00:00:00". This can be used to create a daily "standard set" of plots with/without an actual flight track, e.g., for daily morning briefings | ||
|
||
For downloading plots of multiple flight tracks, specify the flight track and it's configuration in mss_autoplot.json. This can be used to create a "standard set" of plots for all actual flights of a campaign. See below: | ||
|
||
"automated_plotting_flights": [ | ||
["flight1", "section1", "vertical1", "filename1", "init_time1", "time1"] | ||
["flight2", "section2, "vertical2", "filename2", "init_time2", "time2"] | ||
] | ||
|
||
3. mss autoplot --cpath mss_autoplot.json --stime="2019-09-01T00:00:00" --etime="2019-09-02T00:00:00" --intv=6 | ||
|
||
The above command will download plots of the with/without flight track from start time "2019-09-01T00:00:00" to end time "2019-09-02T00:00:00". The user would need to compulsorily specify the init_time and time in mss_autoplot.json inorder to use this functionality. | ||
|
||
|
||
Settings file | ||
-------------- | ||
|
||
This file includes configuration settings to generate plots in automated fashion. It includes, | ||
|
||
- View | ||
- URL of the WMS server | ||
- URL of mscolab server | ||
- List of layers to be plotted | ||
- Style | ||
- Elevation | ||
- List of initial time and forecast hours | ||
- List of flight paths | ||
- List of operations (from MSCOLAB) | ||
- Level | ||
- Map section | ||
- Resolution of the plot | ||
- Path of output folder | ||
|
||
|
||
If you don't have a mss_autoplot.json then default configuration is in place. | ||
|
||
Store this mss_autoplot.json in a path, e.g. “$HOME/.config/msui” | ||
|
||
**/$HOME/.config/msui/mss_autoplot.json** | ||
|
||
.. literalinclude:: samples/config/msui/mss_autoplot.json.sample |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,5 +9,6 @@ Components | |
mswms | ||
mscolab | ||
gentutorials | ||
autoplot | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
|
||
{ | ||
"view":"topview" | ||
"data_dir": "~/mssdata", | ||
"filepicker_default": "default", | ||
|
||
"import_plugins": { | ||
"FliteStar": ["fls", "mslib.plugins.io.flitestar", "load_from_flitestar"], | ||
"Text": ["txt", "mslib.plugins.io.text", "load_from_txt"] | ||
}, | ||
|
||
"export_plugins": { | ||
"Text": ["txt", "mslib.plugins.io.text", "save_to_txt"], | ||
"KML": ["kml", "mslib.plugins.io.kml", "save_to_kml"], | ||
"GPX": ["gpx", "mslib.plugins.io.gpx", "save_to_gpx"] | ||
}, | ||
|
||
|
||
"layout": { | ||
"topview": [963, 702], | ||
"sideview": [913, 557], | ||
"tableview": [1236, 424], | ||
"immutable": false | ||
}, | ||
|
||
"locations": { | ||
"EDMO": [48.08, 11.28], | ||
"Hannover": [52.37, 9.74], | ||
"Hamburg": [53.55, 9.99], | ||
"Juelich": [50.92, 6.36], | ||
"Leipzig": [51.34, 12.37], | ||
"Muenchen": [48.14, 11.57], | ||
"Stuttgart": [48.78, 9.18], | ||
"Wien": [48.20833, 16.373064], | ||
"Zugspitze": [47.42, 10.98], | ||
"Kiruna": [67.821, 20.336], | ||
"Ny-Alesund": [78.928, 11.986] | ||
}, | ||
|
||
"predefined_map_sections": { | ||
"01 Europe (cyl)": {"CRS": "EPSG:4326", | ||
"map": {"llcrnrlon": -15.0, "llcrnrlat": 35.0, | ||
"urcrnrlon": 30.0, "urcrnrlat": 65.0}}, | ||
"02 Germany (cyl)": {"CRS": "EPSG:4326", | ||
"map": {"llcrnrlon": 5.0, "llcrnrlat": 45.0, | ||
"urcrnrlon": 15.0, "urcrnrlat": 57.0}}, | ||
"03 Global (cyl)": {"CRS": "EPSG:4326", | ||
"map": {"llcrnrlon": -180.0, "llcrnrlat": -90.0, | ||
"urcrnrlon": 180.0, "urcrnrlat": 90.0}}, | ||
"04 Shannon (stereo)": {"CRS": "EPSG:77752350", | ||
"map": {"llcrnrlon": -45.0, "llcrnrlat": 22.0, | ||
"urcrnrlon": 45.0, "urcrnrlat": 63.0}}, | ||
"05 Northern Hemisphere (stereo)": {"CRS": "EPSG:77790000", | ||
"map": {"llcrnrlon": -45.0, "llcrnrlat": 0.0, | ||
"urcrnrlon": 135.0, "urcrnrlat": 0.0}}, | ||
"06 Southern Hemisphere (stereo)": {"CRS": "EPSG:77890000", | ||
"map": {"llcrnrlon": 45.0, "llcrnrlat": 0.0, | ||
"urcrnrlon": -135.0, "urcrnrlat": 0.0}} | ||
}, | ||
|
||
"new_flighttrack_template": ["Kiruna", "Ny-Alesund"], | ||
"new_flighttrack_flightlevel": 250, | ||
"num_interpolation_points": 201, | ||
"num_labels": 10, | ||
|
||
"WMS_request_timeout": 30, | ||
|
||
"default_WMS": ["http://www.your-server.de/forecasts"], | ||
"default_VSEC_WMS": ["http://www.your-server.de/forecasts"], | ||
"default_LSEC_WMS": ["http://www.your-server.de/forecasts"], | ||
|
||
"default_MSCOLAB": ["http://www.your-mscolab-server.de/"], | ||
"WMS_login": { | ||
"http://www.your-server.de/forecasts" : ["youruser", "yourpassword"] | ||
}, | ||
"MSC_login": { | ||
"http://www.your-mscolab-server.de" : ["youruser", "yourpassword"] | ||
}, | ||
|
||
"automated_plotting_flights": [ | ||
["", "", "", "", "", ""] | ||
], | ||
"automated_plotting_hsecs": [ | ||
["", "", "", ""] | ||
], | ||
"automated_plotting_vsecs": [ | ||
["","", "", ""] | ||
], | ||
"automated_plotting_lsecs": [ | ||
["", "", ""] | ||
] | ||
|
||
"MSCOLAB_mailid": "", | ||
"MSCOLAB_password": "" | ||
"MSCOLAB_operations":[] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
add a ToDo, # ToDo refactor to a function