Skip to content

Commit

Permalink
add name to gallery path
Browse files Browse the repository at this point in the history
  • Loading branch information
gadfort committed Oct 14, 2023
1 parent 4575ff6 commit e87a05e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scgallery/apps/sc_gallery.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# Find class which is a Gallery class
def __process_cli_class(name):
module = importlib.import_module(name)
for name, obj in inspect.getmembers(module):
for _, obj in inspect.getmembers(module):
if inspect.isclass(obj):
if obj is Gallery:
continue
Expand Down
4 changes: 3 additions & 1 deletion scgallery/gallery.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,11 @@ def set_remote(self, remote):
self.__remote = remote

def argparse(self):
default_path = 'gallery'
desc = "Gallery generator for SiliconCompiler"
if self.name:
desc = f"{self.name} {desc}"
default_path = f"gallery-{self.name}"
parser = argparse.ArgumentParser(
prog='sc-gallery',
description=desc
Expand All @@ -125,7 +127,7 @@ def argparse(self):
parser.add_argument('-gallery',
metavar='<path>',
help='Path to the gallery',
default=os.path.join('gallery', siliconcompiler.__version__))
default=os.path.join(default_path, siliconcompiler.__version__))

parser.add_argument('-remote',
metavar='<path>',
Expand Down

0 comments on commit e87a05e

Please sign in to comment.