Skip to content

Commit

Permalink
Merge pull request #73 from lunarc/develop
Browse files Browse the repository at this point in the history
Merge from develop
  • Loading branch information
jonaslindemann authored Nov 28, 2024
2 parents 2670d46 + 8891c72 commit d0ab5a7
Show file tree
Hide file tree
Showing 23 changed files with 37 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "gfxlauncher"
version = "0.9.13"
version = "0.9.16"
description = "The GFX Launcher toolkit provide the means for launching graphical applications through SLURM. The toolkit comes with a configurable launcher, graphical job monitor and tools for automatically generating menus and shortcuts for the launcher."
authors = [
{name = "Jonas Lindemann", email = "jonas.lindemann@lunarc.lu.se"},
Expand Down
Binary file added scripts/icons/abaqus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added scripts/icons/comsol.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added scripts/icons/dymola.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added scripts/icons/eclipse.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added scripts/icons/fiji.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added scripts/icons/freesurfer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added scripts/icons/idl.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added scripts/icons/jupyter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added scripts/icons/mathematica.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added scripts/icons/matlab.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added scripts/icons/meshlab.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added scripts/icons/metashape.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added scripts/icons/rstudio_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added scripts/icons/spyder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added scripts/icons/vmd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/lhpcdt/gfxconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
under certain conditions; see LICENSE for details.
"""
gfxlaunch_copyright_short = """LUNARC HPC Desktop On-Demand - %s"""
gfxlaunch_version = "0.9.14"
gfxlaunch_version = "0.9.16"

# --- Fix search path for tool

Expand Down
2 changes: 1 addition & 1 deletion src/lhpcdt/gfxlaunch.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
under certain conditions; see LICENSE for details.
"""
gfxlaunch_copyright_short = """LUNARC HPC Desktop On-Demand - %s"""
gfxlaunch_version = "0.9.14"
gfxlaunch_version = "0.9.16"

# --- Fix search path for tool

Expand Down
4 changes: 3 additions & 1 deletion src/lhpcdt/gfxmenu.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
under certain conditions; see LICENSE for details.
"""
gfxmenu_copyright_short = """LUNARC HPC Desktop On-Demand - %s"""
gfxmenu_version = "0.9.14"
gfxmenu_version = "0.9.16"


def main():
Expand All @@ -57,6 +57,7 @@ def main():
"--silent", help="Run without output", action="store_true")
parser.add_argument("--verbose", help="Verbose logging",
action="store_true")
parser.add_argument("--force", help="Force refresh menu entries", action="store_true")
args = parser.parse_args()

# ----- Show version information
Expand Down Expand Up @@ -96,6 +97,7 @@ def main():
user_menu.menu_name_prefix = cfg.menu_prefix
user_menu.desktop_entry_prefix = cfg.desktop_entry_prefix
user_menu.add_scripts(script_db)
user_menu.force_refresh = args.force
user_menu.generate()


Expand Down
2 changes: 1 addition & 1 deletion src/lhpcdt/gfxnodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
under certain conditions; see LICENSE for details.
"""
gfxlaunch_copyright_short = """LUNARC HPC Desktop On-Demand GfxNodes - %s"""
gfxlaunch_version = "0.9.14"
gfxlaunch_version = "0.9.16"

# --- Fix search path for tool

Expand Down
2 changes: 1 addition & 1 deletion src/lhpcdt/gfxusage.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
under certain conditions; see LICENSE for details.
"""
gfxlaunch_copyright_short = """LUNARC HPC Desktop On-Demand GfxUsage - %s"""
gfxlaunch_version = "0.9.14"
gfxlaunch_version = "0.9.16"

# --- Fix search path for tool

Expand Down
22 changes: 21 additions & 1 deletion src/lhpcdt/integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ def __init__(self, dryrun=False):
self.__app_location = cfg.app_location
self.__dir_location = cfg.dir_location
self.__ondemand_location = cfg.ondemand_location
self.__force_refresh = False

# self.__menu_location = "~/.config/menus/applications-merged"
# self.__app_location = "~/.local/share/applications"
Expand Down Expand Up @@ -293,6 +294,8 @@ def add_scripts(self, script_db):
desktop_entry.name = script.variables["title"]
desktop_entry.exec = script.launch_cmd
desktop_entry.changed = script.changed
if "icon" in script.variables:
desktop_entry.icon = script.variables["icon"]
menu.add_entry(desktop_entry)

self.add_menu(menu)
Expand Down Expand Up @@ -452,6 +455,14 @@ def menu_name_no_launch_suffix(self):
@menu_name_no_launch_suffix.setter
def menu_name_no_launch_suffix(self, value):
self.__menu_name_no_launch_suffix = value

@property
def force_refresh(self):
return self.__force_refresh

@force_refresh.setter
def force_refresh(self, value):
self.__force_refresh = value

class Menu:
def __init__(self, parent):
Expand All @@ -462,6 +473,7 @@ def __init__(self, parent):
self.__prefix = "lhpcdt_"
self.__filename = ""
self.__abs_filename = ""
self.__force_refresh = False

self.__last_run = 0.0

Expand Down Expand Up @@ -497,7 +509,7 @@ def generate(self):

# Only create a new desktop entry if the script has changed.

if not os.path.exists(abs_entry_filename) or (entry.changed > self.last_run):
if not os.path.exists(abs_entry_filename) or (entry.changed > self.last_run) or self.force_refresh:
with open(abs_entry_filename, "w") as f:
f.write(str(entry))

Expand Down Expand Up @@ -529,6 +541,14 @@ def last_run(self):
@last_run.setter
def last_run(self, value):
self.__last_run = value

@property
def force_refresh(self):
return self.__force_refresh

@force_refresh.setter
def force_refresh(self, value):
self.__force_refresh = value



Expand Down
8 changes: 8 additions & 0 deletions src/lhpcdt/scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ def __init__(self, filename=""):
self.__changed = None
self.__parse_metadata()
self.__parse_failed = False
self.__icon = "system-icon"

def __parse_metadata(self):
"""Parse run-script for metadata"""
Expand All @@ -27,6 +28,7 @@ def __parse_metadata(self):
##LDT part_disable = "yes"
##LDT feature_disable = "yes"
##LDT direct_launch = "yes"
##LDT icon = "system-icon"

self.__variables = {}

Expand Down Expand Up @@ -85,6 +87,8 @@ def __parse_metadata(self):
else:
self.__no_launcher = False

if "icon" in self.__variables:
self.__icon = self.__variables["icon"]

cmd_options += " --cmd %s" % self.filename

Expand Down Expand Up @@ -127,6 +131,10 @@ def parse_failed(self):
@property
def no_launcher(self):
return self.__no_launcher

@property
def icon(self):
return self.__icon

class RunScripts:
def __init__(self, script_dir=""):
Expand Down

0 comments on commit d0ab5a7

Please sign in to comment.