Skip to content

Commit

Permalink
Merge pull request AlexsLemonade#653 from jashapiro/jashapiro/fix-dow…
Browse files Browse the repository at this point in the history
…nload-all

handle explicit "all" options for download scripts
  • Loading branch information
jashapiro authored Jul 23, 2024
2 parents 67472d2 + 30e31d3 commit 61a24b0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions download-data.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,11 @@ def main() -> None:
if validation_error:
sys.exit(1)

# convert "all" to empty string for later processing
if args.projects.casefold() == "all":
args.projects = ""
if args.samples.casefold() == "all":
args.samples = ""
# check project and sample names
projects = {p.strip() for p in args.projects.split(",")} if args.projects else {}
samples = {s.strip() for s in args.samples.split(",")} if args.samples else {}
Expand Down
5 changes: 5 additions & 0 deletions download-results.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,11 @@ def main() -> None:
file=sys.stderr,
)

# convert "all" to empty string for later processing
if args.projects.casefold() == "all":
args.projects = ""
if args.samples.casefold() == "all":
args.samples = ""
# check project and sample names
projects = {p.strip() for p in args.projects.split(",")} if args.projects else {}
samples = {s.strip() for s in args.samples.split(",")} if args.samples else {}
Expand Down

0 comments on commit 61a24b0

Please sign in to comment.