Skip to content

Commit

Permalink
Fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
bebatut committed Oct 31, 2023
1 parent ed3faa3 commit 64f584b
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions bin/extract_galaxy_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def check_categories(ts_categories, ts_cat):
:param ts_cat: list of ToolShed categories to keep in the extraction
"""
if ts_categories is not None and len(ts_cat) > 0:
ts_cats = ts_categories.split(', ')
ts_cats = ts_categories.split(", ")
to_keep = False
for cat in ts_cats:
if cat in ts_cat:
Expand All @@ -145,7 +145,7 @@ def check_categories(ts_categories, ts_cat):


def get_tool_metadata(tool, repo):
""""
"""" "
Get tool information
- Check the `.shed.yaml` file
- Extract metadata from the `.shed.yaml`
Expand Down Expand Up @@ -174,7 +174,7 @@ def get_tool_metadata(tool, repo):
"Galaxy wrapper source": None,
"Galaxy wrapper version": None,
"Conda id": None,
"Conda version": None
"Conda version": None,
}
# extract .shed.yml information and check macros.xml
try:
Expand Down Expand Up @@ -368,18 +368,29 @@ def filter_tools(tools, ts_cat, excluded_tools, keep_tools):


if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Extract Galaxy tools from GitHub repositories together with biotools and conda metadata")
parser = argparse.ArgumentParser(
description="Extract Galaxy tools from GitHub repositories together with biotools and conda metadata"
)
subparser = parser.add_subparsers(dest="command")
# Extract tools
extractools = subparser.add_parser("extractools", help="Extract tools")
extractools.add_argument("--api", "-a", required=True, help="GitHub access token")
extractools.add_argument("--all_tools", "-o", required=True, help="Filepath to CSV with all extracted tools")
# Filter tools
filtertools = subparser.add_parser("filtertools", help="Filter tools")
filtertools.add_argument("--tools", "-t", required=True, help="Filepath to CSV with all extracted tools, generated by extractools command")
filtertools.add_argument(
"--tools",
"-t",
required=True,
help="Filepath to CSV with all extracted tools, generated by extractools command"
)
filtertools.add_argument("--filtered_tools", "-f", required=True, help="Filepath to CSV with filtered tools")
filtertools.add_argument("--categories", "-c", help="Path to a file with ToolShed category to keep in the extraction (one per line)")
filtertools.add_argument("--exclude", "-e", help="Path to a file with ToolShed ids of tools to exclude (one per line)")
filtertools.add_argument(
"--categories", "-c", help="Path to a file with ToolShed category to keep in the extraction (one per line)"
)
filtertools.add_argument(
"--exclude", "-e", help="Path to a file with ToolShed ids of tools to exclude (one per line)"
)
filtertools.add_argument("--keep", "-k", help="Path to a file with ToolShed ids of tools to keep (one per line)")
args = parser.parse_args()

Expand Down

0 comments on commit 64f584b

Please sign in to comment.