Skip to content

Commit

Permalink
Change sbg:fa_icon to sbg:icon
Browse files Browse the repository at this point in the history
Fix profile parsing
  • Loading branch information
pavlemarinkovic committed Sep 25, 2023
1 parent 8de94f2 commit 0580045
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions sbpack/noncwl/nextflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def nf_cwl_port_map():
'description': 'label',
'help_text': 'doc',
'mimetype': 'format',
'fa_icon': 'sbg:fa_icon',
'fa_icon': 'sbg:icon',
'pattern': 'sbg:pattern',
'hidden': 'sbg:hidden',
}
Expand All @@ -74,7 +74,7 @@ def nf_cwl_category_map():
return {
'title': 'sbg:title',
'description': 'sbg:doc',
'fa_icon': 'sbg:fa_icon',
'fa_icon': 'sbg:icon',
}

def nf_to_sb_input_mapper(self, port_id, port_data, category=None):
Expand Down
6 changes: 4 additions & 2 deletions sbpack/noncwl/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,10 +344,12 @@ def parse_config_file(file_path):

# Extract profiles using regex
profiles = {}
pattern = re.compile(r'^\s*(\w+)\s*{([^}]+)}', re.MULTILINE | re.DOTALL)
pattern = re.compile(r'\s*(\w+)\s*{([^}]+)}', re.MULTILINE | re.DOTALL)
blocks = re.findall(pattern, profiles_text)
for name, content in blocks:
settings = dict(re.findall(r'\s*([a-zA-Z.]+)\s*=\s*(.*)', content))
settings = dict(
re.findall(r'([a-zA-Z._]+)(?:\s+|)=(?:\s+|)([^\s]+)', content)
)
profiles[name] = settings
include_path = re.findall(
r'includeConfig\s+[\'\"]([a-zA-Z_.\\/]+)[\'\"]', content)
Expand Down

0 comments on commit 0580045

Please sign in to comment.