Add config & CLI support for .ftml path in mssautoplot
Fixes #2714
Let’s also make sure we save the file path in mssautoplot.json. We can just use self.last_save_directory for this; no need to create a new default.
the autoplot dockingwidget still does not save a path into the json configuration for the filenames, see https://github.com/Open-MSS/MSS/blob/develop/mslib/msui/autoplot_dockwidget.py#L318 The filenames can be stored on different directories. In the json file we need the file location, not only the names.
the autoplot dockingwidget still does not save a path into the json configuration for the filenames, see https://github.com/Open-MSS/MSS/blob/develop/mslib/msui/autoplot_dockwidget.py#L318 The filenames can be stored on different directories. In the json file we need the file location, not only the names.
I'm currently working on the CLI version of autoplot (not the GUI-based autoplot_dockwidget). My changes are focused on command-line behavior, so they won't affect or fix the GUI behavior related to JSON path saving? or am i missing something?
Hii @ReimarBauer I’ve added the path for the .ftml file like this:
if filename and not os.path.isabs(filename): default_dir = os.path.join(os.path.expanduser("~"), ".config", "msui") filename = os.path.join(default_dir, filename)
But I think it’s not working as expected — the file still isn’t being found. Could you please help me check if I’m missing something?
Hii @ReimarBauer I’ve added the path for the .ftml file like this:
if filename and not os.path.isabs(filename): default_dir = os.path.join(os.path.expanduser("~"), ".config", "msui") filename = os.path.join(default_dir, filename)But I think it’s not working as expected — the file still isn’t being found. Could you please help me check if I’m missing something?
When configuring the new mssautoplot.json, we should mirror the behavior of existing configurations regarding file paths. Specifically, the path used to store an FTML file should be relative to the user's designated storage location. For example, if a user saves an FTML file as /Users/reimarbauer/FTML/example.ftml, the new configuration should reflect this same path. This consistency is important because sharing my mssautoplot.json necessitates also sharing the corresponding FTML file – and knowing the storage location ensures I can easily identify the correct one among potentially many examples.
Please implement the functionality for the autoplot docking widget https://github.com/Open-MSS/MSS/blob/develop/mslib/msui/autoplot_dockwidget.py to save the FTML path/file before proceeding with CLI improvements.
Hii @ReimarBauer I noticed that running: mssautoplot --cpath ~/.config/msui/mssautoplot.json gives resource 'example_flight.ftml' not found but this works: mssautoplot --cpath ~/.config/msui/mssautoplot.json --ftml-path /home/anuu/.config/msui/example_flight.ftml
Hii @ReimarBauer I noticed that running: mssautoplot --cpath ~/.config/msui/mssautoplot.json gives resource 'example_flight.ftml' not found but this works: mssautoplot --cpath ~/.config/msui/mssautoplot.json --ftml-path /home/anuu/.config/msui/example_flight.ftml
Please share the section of your mssautoplot.json for
"automated_plotting_flights": [],
"automated_plotting_hsecs": [],
"automated_plotting_vsecs": [],
"automated_plotting_lsecs": []